Off-topic MT4/mql4 questions. - page 37

 

hi i have some error, fix please

'iCCI' - wrong parameters count
//+------------------------------------------------------------------+
//|                                                      mmmccc1.mq4 |
//|                        Copyright 2022, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int start()
{
  double maPeriodFast = 21;
  double maPeriodSlow = 9;
  double maFast = iMA(NULL, 0, maPeriodFast, 0, MODE_EMA, PRICE_CLOSE, 0);
  double maSlow = iMA(NULL, 0, maPeriodSlow, 0, MODE_EMA, PRICE_CLOSE, 0);
  double atrValue = iATR(NULL, 0, 14, 0);
  double macd = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_MAIN, 0);
  double macdSignal = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, 0);
  double cci = iCCI(NULL, 0, 14, PRICE_TYPICAL, MODE_MAIN, 0);

  if (maFast > maSlow && macd > macdSignal && cci > 100) {
    // bullish market, place a buy order
    double stopLoss = Bid - atrValue*2;
    double takeProfit = Bid + atrValue*4;
    int result = OrderSend(Symbol(),OP_BUY,1,Ask,3,stopLoss,takeProfit,"My EA Buy Order",16384,0,Green);
    if(result>0) {
      Print("Buy order placed successfully");
    }
  } else if (maFast < maSlow && macd < macdSignal && cci < -100) {
    // bearish market, place a sell order
    double stopLoss = Ask + atrValue*2;
    double takeProfit = Ask - atrValue*4;
    int result = OrderSend(Symbol(),OP_SELL,1,Bid,3,stopLoss,takeProfit,"My EA Sell Order",16384,0,Red);
    if(result>0) {
      Print("Sell order placed successfully");
    }
  }

  return(0);
}

//+------------------------------------------------------------------+ 


Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • 2023.01.31
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
 
Maurojose1989 #: hi i have some error, fix please 'iCCI' - wrong parameters coun
//|                                                      mmmccc1.mq4 |

  double maSlow = iMA(NULL, 0, maPeriodSlow, 0, MODE_EMA, PRICE_CLOSE, 0);
  ⋮
    int result = OrderSend(Symbol(),OP_SELL,1,Bid,3,stopLoss,takeProfit,"My EA Sell Order",16384,0,Red);

Those are MT4 calls. You can't compile them with the MT5 compiler.

Also:

          Migrating from MQL4 to MQL5 - MQL5 Articles № 18 (2010)
          Transferring Indicators from MQL4 to MQL5 (2010)
          MQL's OOP notes: Converting MetaTrader 4 indicators to MetaTrader 5 (2016)
          Market Condition Evaluation based on standard indicators in Metatrader 5 - Trading Systems - MQL5 programming forum - Page 222 #2218 (2017)
          Problem with drawing indicators in mql5 - General - MQL5 programming forum #2 (2021)

 
Can I use paid signals in mql5 to trade on a demo account?
I want to use the signal to pass prop trading firms account?
 
Richard Nukpezah #:
Can I use paid signals in mql5 to trade on a demo account?
I want to use the signal to pass prop trading firms account?
As far as i know copy trading is against the rules in most prop firms.
 

does anyone know how to troubleshoot message that says license verification failed when I try to drag and drop ********* on to the chart?

 
faroq moonda #:

does anyone know how to troubleshoot message that says license verification failed when I try to drag and drop ********* on to the chart?

If you have purchased a product elsewhere and are having problems with it, we cannot help you.

 
Miguel Angel Vico Alba #:

If you have purchased a product elsewhere and are having problems with it, we cannot help you.

I bought the product directly form ******...
 
faroq moonda #:
I bought the product directly form ******...

And you are in the MetaQuotes forum .... as I told you we can't help you here.

 
How do I start this trading
 
535238 #:
How do I start this trading

Find Metatrader broker (there are a lot of Metatrader brokers, use google to find), and open the account according to their condition on their websites.
Try with demo first.

1. The article - MQL5.community - User Memo 

2. MetaTrader 5 Help - Open an Account

3. Where Do I start from?
https://www.mql5.com/en/forum/212020 

4. MetaTrader 5 Help - Trading Platform — User Manual 

5. How to make a search on the forum
https://www.mql5.com/en/forum/193510 

MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
Reason: