I've got a weird problem (at least I think it's weird).
In a separate file I have:
//beginBluePeriod if(CrossAbove(stoch.K, 50, 1)){ beginBluePeriod = CurrentBar; } //Set IntSeries beginUpPeriod.Set(beginBluePeriod);
if(stochDirection.DownPeriod[0]){ //Find highest value of blue period sd_HighestHigh_Bar = HighestBar(High, (CurrentBar - stochDirection.BeginUpPeriod[0])); sd_HighestHigh_Value = High[sd_HighestHigh_Bar]; }
sd_HighestHigh_Bar = HighestBar(High, (CurrentBar - stochDirection.BeginUpPeriod[0]));
When I Print();
Print("BarNumber = " + (CurrentBar - stochDirection.BeginUpPeriod[0]));
I have verified that stochDirection.BeginUpPeriod[0] is starting on the proper bar.
Again this ONLY happens when the beginBluePeriod condition is only true for one bar.
Any help would be much appreciated!
Comment