Just use this Universal Expert Advisor scheme and put your conditions here:
double Strategy_001(int COMMAND) { string _SYMBOL = Symbol(); int _TIMEFRAME = getStrategyTimeframeByNumber(_STRATEGY_TIMEFRAME); double result = 0; int i; switch(COMMAND) { case _OPEN_LONG: { // break; // if(!OpenNewBar()) // break; if(Open long condition is true) result = 1; break; } case _OPEN_SHORT: { // break; // if(!OpenNewBar()) // break; if(Open short condition is true) result = 1; break; } case _CLOSE_LONG: { // break; if(Close long condition is true) result = 1; break; } case _CLOSE_SHORT: { // break; if(Close short condition is true) result = 1; break; }
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
Hi all,
I am newbie for MQL4.
I would like to program Exper Advisor with condition as follow:
1. If RSI(14) > 70 --> Sell
2. If RSI(14) < 30 --> Buy
Please help me.
Thanks