Use Print function for debugging
Thank you! Problem solved - I had been working on tick level, so the variables were shifted every tick and of course all was overwritten. Limiting processing to the beginning of the bar solved the problem.
btw Slawa - any plans for a real debugger someday soon?
TIA,
m
TIA,
m
May be in MT5.
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
Whenever I identify a new peak or valley, i need to adjust the three most recent variables. I tried to to add this new value to my three variables and shift the previous data accordingly.
For example, when the condition for a new event is fulfilled, i programmed:
...
if ( ...)
{
variable_3 = variable_2;
variable_2 = variable_1;
variable_1 = iLow(Null,0,0) ;
}
...
Unfortunately, this does not seem to move the older data back into the next variable. The result is that all variables get the same value iLow(Null,0,0).
Does anyone know how to update variables and move the values accordingly?