You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello forum, good day.
Is it possible to iterate a for loop in both directions from a certain point in it until certain criteria is met?
For example, lets say that I have a condition inside a for loop where a Moving Average meets criteria at bar 16. At this moment, I assign the value of the Moving Average to a variable (i_val[i] = MA_Value[i]). After this, I need to go back and forth from this point inside the loop subtracting i_val[i] - the Moving Average value of every bar until criteria is met.
Here is what I have so far:
Your help will be much appreciated.
Best regards and thank you in advance,
Gerardo