Finding Range over all bars in a chart for N periods...High to Lowest ??? New comment [Deleted] 2007.01.27 10:44 int limit, records, N=2; int counted_bars = IndicatorCounted(); limit = Bars - counted_bars; if ( counted_bars < 0 ) return(0); if ( counted_bars ==0 ) limit=Bars-1; double EUR; for(int i = 0; i < limit; i++) { EUR = (iHigh("EURUSD", 0, i) - Low[iLowest("EURUSD", 0, MODE_LOW, N, i )] ); } I am trying to find the range from the current bar high to the lowest low over N periods, Including current bar,,,the above does seam to work ?? Any ideas... Finding Range over all bars in a chart for N periods...High to Lowest ??? Finding Range over all bars in a chart for N periods...High to Lowest ??? MT4 Advise- checking next few candles after 2 MAs cross over New comment
int limit, records, N=2;
int counted_bars = IndicatorCounted();
limit = Bars - counted_bars;
if ( counted_bars < 0 ) return(0);
if ( counted_bars ==0 ) limit=Bars-1;
double EUR;
for(int i = 0; i < limit; i++)
{
EUR = (iHigh("EURUSD", 0, i) - Low[iLowest("EURUSD", 0, MODE_LOW, N, i )] );
}
I am trying to find the range from the current bar high to the lowest low over N periods, Including current bar,,,the above does seam to work ??
Any ideas...