sure, you can always use "i=i-20" (or "i-=20") instead of "i--" (which is actually i=i-1) like this:
double lows[]; for(int i=1000;i>0;i-=20){ lows[i]=Low[i];}
thank you
Automated
--
real time grid trading video, +531 pips in 24 hours:
http://www.gridtradingcourse.com/videos/news_grid_trading_chfjpy_3/Grid_Trading_CHFJPY.html
http://grid9.forexmosaic.com/ - 8621 pips in 7 weeks of grid trading
Is it possible to have a for loop that cycles in intervals as opposed to going through all numbers in a range?
For example if I had this loop
and I wanted to add Low prices for 0, 40,80,120,... up to 1000. How would I go about this?
Try this:
int i,j; double lows[25]; for(j=0,i=0;i<=1000;i+=40,j++){ lows[j] = Low[i]; //This will put the value you need from 0-24 in lows[] array in chronological order (0 being current Low[]) }
sure, you can always use "i=i-20" (or "i-=20") instead of "i--" (which is actually i=i-1) like this:
thank you
Automated
--
real time grid trading video, +531 pips in 24 hours:
https://www.mql5.com/go?link=http://grid9.forexmosaic.com// - 8621 pips in 7 weeks of grid trading
Thanks Automated
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is it possible to have a for loop that cycles in intervals as opposed to going through all numbers in a range?
For example if I had this loop
and I wanted to add Low prices for 0, 40,80,120,... up to 1000. How would I go about this?