Download MetaTrader 5

Expert Advisor - How to retain a value in a variable outside of the loop

To add comments, please log in or register
Do you want to write a trading robot? Find solution in MQL5 Reference!
jeannie
36
jeannie 2016.02.12 01:55 

Hi All,

I need some assistance in coding in EA.

I've a variables that has a value after using a loop condition.

 

Is there a way to retain the value after finish loop the condition and use the value outside the loop?

I would like to use the variables to compare with other indicator.

 

Many Thanks,

Jeannie 

Keith Watford
Moderator
9627
Keith Watford 2016.02.12 02:15  
Declare the variable outside of the loop
To add comments, please log in or register