Mq4 need a code that makes my EA only work on EURUSD M30
- Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6.
- Universal MA Cross EA
- can i code the EA that attach in EURUSD chart to open or do something with GBPUSD ?
Hi put this in the beginning of your code.
// Check if current symbol is different then EURUSD. // Check if current chart period is different then M30 if(Symbol() != "EURUSD" || Period() != PERIOD_M30) { Alert("Wrong symbol or chart period."); return; }
put the code in the beginning of start() function.
if(Symbol() != "EURUSD" || Period() != PERIOD_M30) { Alert("Wrong symbol or chart period."); return(0); }
put the code in the beginning of start() function.
As you need it to be printed in the journal, Print( ) is used instead of Alert( ) ...
if(Symbol() != "EURUSD" || Period() != PERIOD_M30) { Print("Wrong symbol or chart period."); return(0); }
Yes, just read the following post: https://www.mql5.com/en/forum/215391#comment_5738146
My code at that post includes a function "boolRestrictSymbols()" for doing exactly what you described!
- 2017.09.10
- www.mql5.com
is it possible to convert demo ea to live? i have a good script
I believe the minimum budget is now $30.