Topics
Replies
andi21
18 Aug 2023, 12:55
Dear Xavier R,
please have a look at the latest answer here for an update of this problem:
cTrader Forum - Symbol 'XAUUSD t1' cached data not available or corrupted
Best Regards,
Andi21
@andi21
andi21
18 Aug 2023, 12:53
Dear cTrader Team and Traders,
cTrader Team was able to find the problem. There is a problem with access permissions while reading the tick-Data when the bot has AccessRights.None set.
So as a temporary “workaround” - while the problem is further investigated and fixed - you can adjust the robot annotation of the bot:
[Robot(AccessRights = AccessRights.FullAccess)] // Instead of AccessRights.None
public class NewcBot : Robot
{
…
Best Regards,
Andi21
@andi21
andi21
04 Sep 2020, 12:49
RE:
PanagiotisCharalampous said:
Hi andi21,
This is not a bug, it works by design. SL is set on the requested distance from the position's entry price. StopTriggerMethod affects only the trigger method, not the SL price level.
Best Regards,
Panagiotis
Hi Panagiotis,
yes, i am aware of that.
But the key point is (in the example above with the sell position and triggermethod opposite), that the sl is discarded by the ExecuteMarketOrder-Method, although it should accept it, because the requested sl is though BELOW Ask, but ABOVE Bid and triggering is done by Bid with triggermethod opposite in sell positions.
Best Regards,
andi21
@andi21
andi21
27 May 2020, 13:28
RE:
PanagiotisCharalampous said:
Hi Andreas,
We have investigated this issue and we understand the problem you are facing. However GetBars() works as designed. When you get bars from other timeframes, you get all the finalized bars and finalized values. You should be aware of this fact when you use these values. We do not plan to change the way it works at the moment. Hence if this functionality does not fit the needs of your indicator then you will need to redesign your indicator and code it in a different way.
Best Regards,
Panagiotis
Hi Panagiotis,
in this case i have to think about how to workaround this behaviour.
Nevertheless i thank you for your answer and that you have taken time to investigate this issue.
Best Regards,
Andreas
@andi21
andi21
25 May 2020, 12:44
RE: RE:
Hi Panagiotis,
is there any update on this subject?
I think this is very important, because it affects all customers who are using an indicator with a timeframe other than the chart-timeframe and who are relying on the data which is calculated through the initial calculate from cTrader (past until now).
Best Regards,
Andreas
@andi21
andi21
24 Apr 2019, 16:41
Hi Panagiots,
ah, i see.
Ok, that is good like i would expect it.
In my cBot i use the OnTick-override though, but within the method i execute code only if a new bar is processed (bar index has changed). So my bot processes something only once per new bar.
I know that i could use the OnBar-override instead, but i prefer the OnTick-override.
So the conclusion is, that - also in my case (using OnTick-override, but internal processing within my method is done only once per new bar) - SL and TP are triggered correctly so not depending only on open prices if using "only open prices"-mode.
Thank you for your fast and purposeful help.
Best regards,
andi21
@andi21
andi21
08 Nov 2017, 10:02
RE: RE:
itmfar said:
andi21 said:
Or more easy: just remember the incoming index parameter in the calculate method and if this index changed then it is a new bar (it is late so this easier solution came a little later than my previous answer ;) ).How we can save old index and comparing with new one? because as result of each tick both parameters in Calculate would be update and reffer to same index
You could do something like this:
public int lastCalculatedIdx = -1; public override void Calculate(int index) { bool gotANewIdxSoANewBar = index > lastCalculatedIdx; if (gotANewIdxSoANewBar) { lastCalculatedIdx = index; // Do some calculations } }
@andi21
andi21
06 Nov 2017, 17:57
Hi Panagiotis,
thank you for the answer.
MarketSeries for the selected symbol are updated on scrolling on the chart while other MarketSeries for other symbols are not
But in my example i am using only one symbol for all marketseries and the chart-symbol is also the same. So only one symbol is used over all.
Best Regards,
andi21
@andi21
andi21
18 Aug 2023, 12:55
Dear noolohp,
please have a look at the latest answer here for an update of this problem:
cTrader Forum - Symbol 'XAUUSD t1' cached data not available or corrupted
Best Regards,
Andi21
@andi21