
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
What the hell is the matter with you!
You quoted my post and added code that was not mine.
I am not the OP, so why am I supposed to try Raptor's code
Yes I bothered to read and understand the posts
Nothing about "only externals are reset" is unclear
My post was
"Just to be clear, Changing timeframes in an EA resets externals but not globalscope/statics.
But in an indicator,Changing timeframes resets externals, globalscope and statics."
No code at all!
Ok, not quarrel whatever, since it benefit nobody and nothing. All of us come here to enhance our skill of using MT4 and help each other.
I don't know whether externals, globalscope and statics will be reset in an indicator when changing timeframe, but I think it deserve to confirm by some tests(I will, but now trading close, and I can't use "tester" well. so tomorrow I will test ).
In addition, now I know how to let us set variables' value when EA is being attached like B and the variables can never been changed when shift time frame like in A; and I write the code as C:
C:
A:
B:
GumRai:
I am not the OP, so why am I supposed to try Raptor's code
"Just to be clear, Changing timeframes in an EA resets externals but not globalscope/statics.But in an indicator,Changing timeframes resets externals, globalscope and statics."
You may not realise that your sarcastic posting style, using phrases such as "What part of "Only externals are reset" was unclear?", "RTFM" and "Did you miss.....?" can get people's backs up.
You are an extremely talented and knowledgeable person and I understand that it can be irritating when so many people post nonsense. But do you really need to be so condescending?
That is a good idea about using bolding/highlighting to make a statement clearer, I will try to remember that in future, thank you.
The above code in an indicator results in
As you can see, changing tf in an indicator will reset extern, globalscope and static variables, but the same code in an EA will only reset the extern variable
In addition, now I know how to let us set variables' value when EA is being attached like B and the variables can never been changed when shift time frame like in A; and I write the code as C:
C:
A:
B: