[MQL4 Coding Help] exceed 64 parameters - wrong parameters count

shanmugapradeep

Active Trader
Dec 18, 2020
166
13
34
40
Hello,

I am unable to add more to comment.

MQL4:
string commentText = StringConcatenate(" ---------------------------------------------",
           "\n :: ===>EA<===",
           "\n :: Spread                 : ", MarketInfo(Symbol(), MODE_SPREAD),
           "\n :: Leverage               : 1 : ", AccountLeverage(),
           "\n :: Account Type           :", TradingAccountType,
           "\n ------------------------------------------------"
           "\n :: License                :", UserTradeAccount,
           "\n :: Trade mode             :", Trade_Mode_Status,
           "\n ------------------------------------------------",
           "\n :: News Closing           :", News_Trade_Closing,
           "\n :: News Status            :", News_Trade_Status,
           "\n :: nfs.faireconomy.media  :", NewsURLChecking,
           "\n :: Last News Downloaded   :", XMLDownloadTime,
           "\n :: Last News Checked      :", XMLReadTime,
           "\n :: Last News Updated      :", XMLUpdateTime,     
           "\n ------------------------------------------------",
           "\n :: PC Timezone (GMT)      :", localHours, ":", localMinutes,
           "\n :: Broker Timezone (GMT)  :", brokerHours, ":", brokerMinutes, " (GMT: ", brokerTZ , ")",
           "\n ------------------------------------------------",
           "\n :: DiMarti                :", DiMarti,
           "\n :: LevelMax               :", Level_Max,
           "\n :: Range                  :", Range,
           "\n :: Star_ModifTpSL         :", Star_ModifTp,
           "\n :: Lot                    :", G_lots_400,
           "\n :: SL                     :", SL,
           "\n :: TP                     :", TP,
           "\n :: Tp_in_money            :", Tp_in_money,
           "\n ------------------------------------------------",
           "\n :: ", currentSymbol, " Floating P/L   :", symbolfloatingBalance,
           "\n :: Account Balance        :", Account_balance,
           "\n :: Account Equity         :", Account_equity,
           "\n :: Floating P/L           :", floatingBalance,
           "\n ------------------------------------------------",
           "\n :: ==>HAPPY TRADING<==",
           "\n ------------------------------------------------",
           "\n :: Contact: admin@example.com",
           "\n ------------------------------------------------");
           Comment(commentText);
  }

It keep giving me an error wrong parameters count. How to solve this?
 
You can divide this into two calls of StringConcatenate(). For example, the first time your add everything up to Broker Timezone and then call it like this:
Yes, it already fixed. This is how i divided and now it working without any issue 🙂. Thanks again

MQL4:
string partOne = " ---------------------------------------------"
           "\n :: ===>EA<==="
           "\n :: Spread                 : "+MarketInfo(Symbol(), MODE_SPREAD)+
           "\n :: Leverage               : 1 : "+ AccountLeverage()+
           "\n :: Account Type           :"+TradingAccountType+
           "\n ------------------------------------------------"
           "\n :: License                :"+UserTradeAccount+
           "\n :: Trade mode             :", Trade_Mode_Status+
           "\n ------------------------------------------------"
           "\n :: News Closing           :"+News_Trade_Closing+
           "\n :: News Status            :"+News_Trade_Status+
           "\n :: nfs.faireconomy.media  :"+ NewsURLChecking+
           "\n :: Last News Downloaded   :"+ XMLDownloadTime+
           "\n :: Last News Checked      :"+ XMLReadTime+
           "\n :: Last News Updated      :"+ XMLUpdateTime+
           "\n ------------------------------------------------",
 
             partTwo = "\n :: PC Timezone (GMT)      :"+ localHours+ ":"+ localMinutes+
           "\n :: Broker Timezone (GMT)  :"+ brokerHours+ ":"+ brokerMinutes+ " (GMT: "+ brokerTZ+, ")"
           "\n ------------------------------------------------"
           "\n :: DiMarti                :"+ DiMarti+
           "\n :: LevelMax               :"+ Level_Max+
           "\n :: Range                  :"+Range+
           "\n :: Star_ModifTpSL         :"+ Star_ModifTp+
           "\n :: Lot                    :"+ G_lots_400+
           "\n :: SL                     :"+ SL+
           "\n :: TP                     :"+ TP+
           "\n :: Tp_in_money            :"+ Tp_in_money,
             partThree =  "\n ------------------------------------------------"
           "\n :: ", currentSymbol+ " Floating P/L   :"+ symbolfloatingBalance+
           "\n :: Account Balance        :"+ Account_balance+
           "\n :: Account Equity         :"+ Account_equity+
           "\n :: Floating P/L           :"+ floatingBalance,
             partFour =            "\n ------------------------------------------------"
           "\n :: ==>HAPPY TRADING<=="
           "\n ------------------------------------------------"
           "\n :: Contact: admin@example.com"
           "\n ------------------------------------------------";
           Comment(partOne+PartTwo+PartThree+PartFour);
 
@shanmugapradeep @Enivid
can anyone help me .
how i can solve this problem
i have more than 63 parameters
//-----


reduce the parameters......

without seeing all the code, a wild guess is that a lot of those "" are just unnecessary information strings .......

you can make a copy of the indicator, rename it, and remove the extern inputs, so the new iCustom indicator will have no user parameters.....

unless the inputs are actually needed, you do not have to include them.... mq4 should use the default settings......

quite often, the icustom indicator name, period(), buffer and shift are all thats needed.....h

//------




such as,
//-----

MQL4:
//---- indicator parameters  
 
//-----  parameters.....               iCustom(NULL, "alma", "", 0,  0,  9,  6.0,  0.85,  0,  0,  0,  1,  0, 0,  0, 1)
extern string  info  = "Parameters for alma";
extern int     Price             =   0;  //Price Mode (0...6)
extern int     WindowSize        =   9;  //Window Size
extern double  Sigma             = 6.0;  //Sigma parameter
extern double  Offset            =0.85;  //Offset of Gaussian distribution (0...1)
extern double  PctFilter         =   0;  //Dynamic filter in decimal
extern int     Shift             =   0;  //
extern int     ColorMode         =   0;  //0-on,1-off
extern int     ColorBarBack      =   1;  //
extern int     AlertMode         =   0;  //Sound Alert switch (0-off,1-on)
extern int     WarningMode       =   0;  //Sound Warning switch(0-off,1-on)
 
//---- vs this version which has no user parameters.....
 
//---- indicator parameters now   iCustom(NULL, 0,  "almav2",   0, 1)
 
 
int     Price             =   0;  //Price Mode (0...6)
int     WindowSize        =   9;  //Window Size
double  Sigma             = 6.0;  //Sigma parameter
double  Offset            =0.85;  //Offset of Gaussian distribution (0...1)
double  PctFilter         =   0;  //Dynamic filter in decimal
int     Shift             =   0;  //
int     ColorMode         =   0;  //0-on,1-off
int     ColorBarBack      =   1;  //
int     AlertMode         =   0;  //Sound Alert switch (0-off,1-on)
int     WarningMode       =   0;  //Sound Warning switch(0-off,1-on)
 
as an extreme example, some of the zup indicators have over 300 parameters....... you can still call them with icustom......

somewhere here on this forum, i have posted how.......h
 
hey amrmenam...... that robo rei das deal you sent is the ex file...... can't tell much without the mq4......

what are you wanting , expecting and/or needing the comp29 indicator to do......

listing all the parameters as done in indi1up and down, does not appear to be how that indicator was intended to be used......h