Question: //+------------------------------------------------------------------+ //| RoyalCakeTrading | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright Copyright 2023, MetaQuotes Ltd. #property link https://www.mql5.com #property version

//+------------------------------------------------------------------+ //| RoyalCakeTrading | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+

#property copyright "Copyright 2023, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00"

// Indicator Inputs input int ema_period = 9; input int smma_period_1 = 21; input int smma_period_2 = 50; input int ema_period_long = 200;

// Strategy Inputs input bool trading_enabled = true; input int stop_loss = 40; input int short_stop_loss = 35; input int take_profit = 50; input int trailing_stop_loss = 40;

// Strategy Variables bool long_entry = false; double long_stop_price = 0.0; double range_start = 0.0; bool short_entry = false; double short_stop_price = 0.0;

// Initialize the indicators int OnInit() { return(INIT_SUCCEEDED); }

// Enter and exit trades on each tick void onTick() { double ema_9 = iMA (_Symbol, Period(), ema_period, 0, MODE_EMA, PRICE_CLOSE, 0); double smma_21 = iMA(_Symbol, PERIOD_CURRENT, smma_period_1, 0, MODE_SMA, PRICE_CLOSE, 0); double smma_50 = iMA(_Symbol, PERIOD_CURRENT, smma_period_2, 0, MODE_SMA, PRICE_CLOSE, 0); double ema_200 = iMA(_Symbol, PERIOD_CURRENT, ema_period_long, 0, MODE_EMA, PRICE_CLOSE, 0);

'iMA' - wrong parameters count RoyalCakeTradingStrategy.mq5 40 20

idk what it is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!