Download MetaTrader 5

Expert advisor variable

To add comments, please log in or register
Minh
140
Minh  

Is there any way to store a variable value in expert advisor for further calculation?

Let say I have

int var = 0;
int start()
  {
       //Do some calculation with var
       //Now var has a value of 10
       //How can I store this value 10? Next time expert advisor run, var no longer 0, but it will be 10?
  }

or do I have to create a separate custom indicator to store the value?

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
Use Global Variables.
Minh
140
Minh  
No. I tried that. The value go back to 0
Minh
140
Minh  
Hmm. Ok there must be something wrong with the code. I tried global var in simple program and it does store the value. Thanks deysmacro
To add comments, please log in or register