Работа завершена
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Техническое задание
Hi There,
I'm looking for a basic 3MA strategy to be coded, that has a time sensitive rule and a RSI cutoff point. I've had this coded (in Pinecode) recently for TradingView strategy backtester, but just found out you cant live trade with automation on TradingView, so here I am with MT5.
Attached are the rules for the bot, some clarification of the 5 bar rule, and the TradingView code that was written and works perfectly. I'm not sure if this will be of any help, but you never know...
Rules:
BUY & SELL SIGNALS:
When the 5MA and 20MA are above the 50MA, and the 5MA is above the 20MA, then buy.
When the 5MA crosses under the 20MA, close the trade.
If the 5MA recrosses over the 20MA, and both the 5MA and 20MA are still above the 50MA, then trigger another buy.
Please note that only one trade should be in progress at a time.
This applies in reverse for a sell trade, with the MA's crossing below each other instead of above.
One caveat that needs to be added however, is once either the 5MA or 20MA crosses the 50MA, the subsequent MA must also cross the 50MA within 5 bars.
Additionally, if in a buy trade and the RSI hits 83, then close the trade, and for a sell, if the RSI hits 17, close the trade.
Happy to answer further questions on this, would this be possible?