BarStatus(1)=1... bug

Questions about MultiCharts and user contributed studies.
SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

BarStatus(1)=1... bug

Postby SUPER » 13 Apr 2009

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

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 15 Apr 2009

We confirm it. It is a different case and not related to past issues.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 16 Apr 2009

This is a signiificant bug. It explains why some of my MC work load reduction tools do not work on a random basis. It also adds to my decision to remain discretionary since I can see the problem and easily work around it manually.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 25 May 2009

Andrew,

Bug not fixed in Gold 5 :(

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 28 May 2009

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.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 28 May 2009

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

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 28 May 2009

Yes, you can.


Return to “MultiCharts”