I have a problem due to this. My indicator (the called one = A) only run one time for CurrentBar == 0 and no more, when called from another indicator (the calling one = B).
My problem is that I do stuff in State.Transition assuming that Ind-A has run for all CurrentBars [0,lastindex]. When that is not the situation (only run one time for CurrentBar == 0), I will have problem in my State.Transition!
Second question: What is the design-rule for an indicator to avoid this problem?
Thank you/andbro
Ind-A:
else if (State == State.Transition)
Print("At this point I have no idea whether the statement 'if (CurrentBar == 999)' has been excecuted or not");
}
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
items[0] = 1;
if (CurrentBar == 999)
Print("Call your wife at her birthday. VERY IMPORTANT");
}
Ind-B
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
foo[0] = A().Items[0];
}
Comment