Steve Cartwright Trader Camel CCI MACD - MetaTrader 5 Expert
The author of the idea — John Smith , the author of the MQL5 code — Barabashkakon .
The Expert Advisor is configured to trade USDJPY on the H1 time frame.
The EA uses two moving averages, a MACD and a CCI. OnTradeTransaction is used to receive the position opening time.
All indicator values are from bar chart 1 with index.
//--- Indicator setting CAMELHIGHP1=iMAGet(handle_iMA_PRICE_HIGH, 1 ); CAMELLOWP1=iMAGet(handle_iMA_PRICE_LOW, 1 ); // MACDSP1=iMACDGet( signal line , 1 ); MACDSP2=iMACDGet( Signal Line , 2 ); // MACDHP1=iMACDGet( MAIN_LINE , 1 ); MACDHP2=iMACDGet( MAIN_LINE , 2 ); // CCIP1=iCCIGet( 1 );
Proper control is performed: whether a position is already opened on the current bar, so there is no need to check all positions (since other Expert Advisors can run on the same trading account).
The position opening time is controlled by OnTradeTransaction. If a closing position is recorded, the opening time will be reset:
Attachment download
📎 steve_cartwright_trader_camel_cci_macd.mq5 (31.67 KB)
Source: MQL5 #17841
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •