Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Steve Cartwright Trader Camel CCI MACD - MetaTrader 5 Expert

author EAcpu | 5 reads | 0 comments |

The author of the ideaJohn Smith , the author of the MQL5 codeBarabashkakon .

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

Verification code Refresh