Breadandbutter2 - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources

Author of the idea : Screenwriter
MQL5 code author : Balabashka Kong
This EA is based on the iADX (Average Directional Movement Index, ADX) and iAMA (Adaptive Moving Average, AMA) indicators. The EA only runs when a new bar appears. When a trading signal is received, the opposite position is closed.
The search for the best parameters for the symbol and time frame should be done in two ways:
Manual - Edit the "<">" characteristics in the signal equation:
if (adx_0 < adx_1 && ama_0 > ama_1) { Close position( POITION_TYPE_SELL ); Double sl=(Inp stop loss == 0 )? 0.0 :m_symbol. ask ()-ExtStopLoss; if (sl>= m_symbol.bid ()) // Event: The position has not been opened yet and must have been closed { Previous article = 0 ; return ; } Double tp=(InpTakeProfit== 0 )? 0.0 :m_symbol. ask ()+ExtTakeProfit; OpenBuy(sl,tp); return ; } if (adx_0 > adx_1 && ama_0 < ama_1) { Close position( POITION_TYPE_BUY ); Double sl=(Inp stop loss == 0 )? 0.0 :m_symbol. Bid ()+ExternalStop; if (sl<= m_symbol.ask ()) // Event: The position has not been opened yet and must have been closed { Previous article = 0 ; return ; } Double tp=(InpTakeProfit== 0 )? 0.0 :m_symbol. bid ()-ExtTakeProfit; OpenSell(sl,tp); return ; }
Automatic - selection of Stop Loss, Take Profit and AMA indicator horizontal movement:

Attachment download
📎 breadandbutter2.mq5 (32.66 KB)
Source: MQL5 #22003
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •