I do-not understand why are you using this flag. Are you trying to stop something from happening when the program goes through a de-init and re-init cycle? Is this for an indicator... is this for an expert advisor? Please list the cases you're trying to avoid by using that variable.
If you want persistant data write it to a file or set a global variable.
Haven't you already covered this here?
yes, i am
but this problem can't be resolve until now
so i list it here more clearly.
vx0532:
Perhaps you should re-read the advices already given?
yes, i am
but this problem can't be resolve until now
so i list it here more clearly.
vx0532: So how to set variables' value when EA is being attached like B and the variables can never been changed when shift time frame like in A?
When in doubt, THINK.bool isFirst = true; // Can't be changed by human. extern datetime initial_time; // Can be changed whenever, but used on first load only. datetime time_current; // Can't be changed = initial_time on first load. int init(){ if(isFirst) { isFirst = false; time_current=initial_time }Don't double post.
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