Andrew,
There is a bug with BarStatus(1)=1
Test code: Strategy
[IntrabarOrderGeneration = true]
Print(barnumber, barstatus(1)=1);
result:
------
459.00 true
459.00 true
459,00 false
460.00 false
460.00 false
460.00 true
output indicated in red should not be false. The first and second tick of the new bar 460 should be true.
Similar results were found with indicator study.
I remember that barstatus had problems in much earlier versions but they were corrected, it seems the bug has come back again.
Regards
Super
BarStatus(1)=1... bug
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
SUPER and John,
It was my mistake when I confirmed that it is a bug. This is not a bug; this is the way MC work. Our Barstatus function works little bit different compared to TS8 one. Our barstatus returns 0 on open tick always, but TS8’s barstatus returns 0 only for strategies using Open Next Bar order actions.
So if this status is critical for you, consider the difference and make appropriate adjustments to your code.
I hope this helps and I apologize for the confusion.
It was my mistake when I confirmed that it is a bug. This is not a bug; this is the way MC work. Our Barstatus function works little bit different compared to TS8 one. Our barstatus returns 0 on open tick always, but TS8’s barstatus returns 0 only for strategies using Open Next Bar order actions.
So if this status is critical for you, consider the difference and make appropriate adjustments to your code.
I hope this helps and I apologize for the confusion.
Andrew,
Thanks for letting us know that we have to find a work around.
Please can you confirm if following work around will produce results similar to TS8.
Example: TS8
BarStatus(1)=1
Suggestion for MC
[IntrabarOrderGeneration = true]
Vars: Intrabarpersist NewBarStatus(true);
NewBarStatus=BarStaus(1)=2;
if NewBarstatus=false then .....
Can I safetly replace BarStauts(1)=1 with NewBarStatus=false ?
Look forward to your feedback.
Regards
Super
Thanks for letting us know that we have to find a work around.
Please can you confirm if following work around will produce results similar to TS8.
Example: TS8
BarStatus(1)=1
Suggestion for MC
[IntrabarOrderGeneration = true]
Vars: Intrabarpersist NewBarStatus(true);
NewBarStatus=BarStaus(1)=2;
if NewBarstatus=false then .....
Can I safetly replace BarStauts(1)=1 with NewBarStatus=false ?
Look forward to your feedback.
Regards
Super
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact: