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

shanmugapradeep

Active Trader
Dec 18, 2020
119
5
34
39
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?
 

shanmugapradeep

Active Trader
Dec 18, 2020
119
5
34
39
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);