I want my indicator to ignore the current bar and only calculate entry conditions on previous bar. This is the boilerplate code I have for my loop:
but the current ticks are causing havock with my Tracking Lines that I have wrapping an MA...All I need to know for my signal is whether the previous bar closed in a particular range.
</PRE>
<!-- / message -->
Inserted Code
[left]int limit=0,i=0; int counted_bars=IndicatorCounted();[/left] [left]//---- check for possible errors if(counted_bars<0) return(-1);[/left] [left]//---- last counted bar will be recounted[/left] [left]if(counted_bars>0) counted_bars--; [/left] [left]limit=Bars-counted_bars;[/left] [left]//---- main loop //if (i==0)i=limit; [/left] [left] [/left] [left]for(i=limit; i>0; i--)[/left]
but the current ticks are causing havock with my Tracking Lines that I have wrapping an MA...All I need to know for my signal is whether the previous bar closed in a particular range.
</PRE>
<!-- / message -->