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
It is better that MetaQuotes gives the ability so that user can decide either he wants to reset or not after recompiling, right ? Yes I agree.
// #define EXTERN extern EXTERN typename var1=...; EXTERN typename var2=...;
WHRoeder... I'm still a little confused to what you are saying...
So how would the code be written - to force variable changes in the charts on re-compile?
This is a BIG deal to many of us - I think from BOTH perspectives...
Some people don't want the variables to change on recompile - and I TOTALLY understand...
But for others - who have 30+ pairs running - having to click "reset" in each chart is a DISASTER...
Anyway, I think what you're saying is the above code change will either force variable changes, or not...
Could you please give an example kinda like:
Force variable change:
(example here)
No force variable change:
(example here)
I think the above would be very helpful to both sides of this scenario...
Thanks so much for your help!
Also - If we do want to force the variable changes in the active charts (eas) - Isn't there a cache file we can just delete to force the variable change on recompile?
I've tried to find it - but the stored values seem to be hidden in a mystery file somewhere...
Thanks again for your help...
The above code examples would do the trick too, but it would be nice to know where to find the cache settings - as another workaround....
So also...
If I change the line
#define EXTERN extern
extern typename var1=...;
to
#define EXTERN extern
define extern typename var1=...;
I get an error reading - external variables have already been defined...
So - I guess - your workaround seems confusing, could you please clarify..
Thanks so much.
So also...
If I change the line
extern typename var1=...;
to
define extern typename var1=...;
I get an error reading - external variables have already been defined...
So - I guess - your workaround seems confusing, could you please clarify..
Thanks so much.
Try this:
#define EXTERN and put nothing here
EXTERN bool trade1 =true; <= Add EXTERN where you would normally have extern
EXTERN bool trade2 = true;
EXTERN bool trade3 = false;
When you want to add the externs to the beginning do this :
#define EXTERN extern
When you want to remove extern do this:
#define EXTERN make sure your remove extern like below
#define EXTERN
Andy
Manual input dialogue is not usually neccessary during the coding stage so just dont use the extern modifier until coding changes are completed.
Awesome stuff.. Thanks so much...
I removed extern and recompiled, but when I launched MetaTrader and looked at the EA settings from the chart - the variables I removed extern from had disappeared completely... I closed MetaTrader, and then relaunched MetaEditor...
I added back in extern - recompiled again - and then relaunched MetaTrader - the variables were added back into the EA - and the variables had been updated to the new variable settings...
So - it worked - THANKS A TON! :) Soopa stahs!
// #define EXTERN extern EXTERN typename var1=...; EXTERN typename var2=...;
#define EXTERN extern EXTERN typename var1=...; EXTERN typename var2=...;
#define EXTERN /*EMPTY*/ EXTERN typename var1=...; EXTERN typename var2=...;
Hi!
After re-compiling (F5), go to EA, open Inputs (F7) - there is 'Reset' button at bottom right. Clicking this resets EA to (hard-)coded values.
It took me a while to figure this out... LOL. Miracles do happen. So does s**t. LOL
Best regards,
Simon
S love nia