It seems there is bug with BarStatus(1)=2 when used with IntraBarOrderGeneration enabled.
I ran following code as a strategy with IntraBarOrderGeneration settings.
If lastBarOnChart print(BarNumber,BarStatus(1)=2);
with following results.
Bar=1345,BarStatusStrategy=FALSE
Bar=1345,BarStatusStrategy=FALSE
Bar=1345,BarStatusStrategy=FALSE
Bar=1345,BarStatusStrategy=TRUE
Bar=1345,BarStatusStrategy=FALSE
The BarStatus should never turn "TRUE" within a bar, it should only happen on last tick of the bar. This happens as soon as you load the strategy and it works propely on subsequent bars, it's begining of the bar you will observe this problem. As further evidence, I ran same code as an indicator and the results are perfect, clearly pointing to a bug with intrabarordergeneration.
Results of Indicator:
Bar=1395,BarStatusIndicator=FALSE
Bar=1395,BarStatusIndicator=FALSE
Bar=1395,BarStatusIndicator=FALSE
Bar=1395,BarStatusIndicator=FALSE
Bar=1395,BarStatusIndicator=FALSE
Will appreciate comments.
Regards
SUPER
BarStatus(1)=2...Bug?
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Marina,
Thanks for your feedback, I hope it gets fixed in your next release.
There is also bug with BarStatus(1)=1 and it behaves in similar fashion.
within the bar you get following values at begining stage:
BarNumber 1395 True
BarNumber 1395 True
BarNumber 1395 True
BarNumber 1395 False
BarNumber 1395 True
Regards
SUPER
Thanks for your feedback, I hope it gets fixed in your next release.
There is also bug with BarStatus(1)=1 and it behaves in similar fashion.
within the bar you get following values at begining stage:
BarNumber 1395 True
BarNumber 1395 True
BarNumber 1395 True
BarNumber 1395 False
BarNumber 1395 True
Regards
SUPER