[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 414

 

Here's an EA to make the order opens on the CLOSE of the candle, not just a cross.

Who will help in advance thank you.

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

//| RSI_MA.mq4 |

//| Copyright © 2008, AEliseev k800elik@gmail.com |

//| http://www.metaquotes.net |

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

#property copyright "Copyright © 2008, Andrey E. k800elik@gmail.com"

#property link "http://www.metaquotes.net"


//---- input parameters

extern CCI_Per=14;

extern MA_Per=20;

extern CCI_close_Per=14;

extern double TakeProfit=500;

extern double StopLoss=150;

extern double Lots=0.01;

extern inttern Deposit=1000;

extern bool MM=false;

extern inttern _MagicNumber=131313;

extern int_Sleep=5000;


int LotA=1, Err=0;

int j=0; var2,var1;

int counter=0;

int ticket;

bool var3;


bool order=false;


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

//| expert initialisation function |

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

int init()

{

Comment("CCI_MA v1.5 © 2008, Andrey E. k800elik@gmail.com");

return(0);

}

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

//| expert deinitialisation function |

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

int deinit()

{

/* int i, a1, a2;

//----

if (OrdersTotal()>0)

{

for (i=0; i==OrdersTotal(); i++)

{

OrderSelect(i,SELECT_BY_POS);

if (OrderMagicNumber()==131313)

{

a1=OrderClose(LotA*Lots,Ask,5,Red);

//a2=OrderClose(var1,LotA*Lots,Ask,5,Red);

}

}

} */

return(0);

}

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

//| expert start function |

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

int start()

{

//----

if (isNewBar()) EveryBar();

EveryTick();

//----

return(0);

}

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


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

//| Check for new bar |

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

bool isNewBar()

{ static datetime TimeBar=0;

bool flag=false;

if(TimeBar!=Time[0])

{

TimeBar=Time[0];

flag=true;

}

return(flag);

}

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

//| Execute action when new bar appears |

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

void EveryBar()

{

// Print("A NEW BAR has arrived!)

double MA[100], CCI[100], CCIclose[100], StandDevi[100];

int i,limit=ArraySize(CCI);

double SL, TP;

Sleep(_Sleep);

SL = NormalizeDouble(Ask - StopLoss*Point, Digits);

TP = NormalizeDouble(Ask + TakeProfit*Point, Digits);

for(i=0; i<limit; i++)

{

CCI[i]=iCCI(NULL,0,CCI_Per,PRICE_CLOSE,i);

CCIclose[i]=iCCI(NULL,0,CCI_close_Per,PRICE_CLOSE,i);

MA[i]=iMAOnArray(CCI,0,MA_Per,0,MODE_SMA,i);

}

// check if there is enough money to open a new order

if(AccountFreeMargin()<(1000*Lots))

{

Print("We have no money. Free Margin = ", AccountFreeMargin());

return(0);

}

//=================================================================================

int _GetLastError = 0, _OrdersTotal = OrdersTotal();

//---- go through all open positions

for ( int z = _OrdersTotal - 1; z >= 0; z -- )

{

//---- if an error occurs while selecting the position, continue to the next one

if ( !OrderSelect( z, SELECT_BY_POS ) )

{

_GetLastError = GetLastError();

Print("OrderSelect( ",z, ", SELECT_BY_POS ) - Error #", _GetLastError);

continue;

}

// if a position is opened not for the current symbol, it is skipped

if ( OrderSymbol() != Symbol() ) continue;

// if the MagicNumber is not equal to _MagicNumber, skip

// this position

if ( OrderMagicNumber() != _MagicNumber ) continue;

//---- if a BAY position is open,

if ( OrderType() == OP_BUY )

{

//---- if CCI crosses line 190 downwards

if (((CCIclose[2]>190) && (CCIclose[1]<=100)) || (CCI[1]<MA[limit-MA_Per-1]) && (CCI[2]>=MA[limit-MA_Per-2])

{

//---- close position

if ( !OrderClose( OrderTicket(), OrderLots(), Bid, 10, Green ) )

{

_GetLastError = GetLastError();

Print("OrderClose error # , _GetLastError );

Err=1;

return(-1);

}

}

// if the signal did not change, exit - it is too early to open

//new position

else

{ return(0); }

}

//---- if a Sell position is opened,

if ( OrderType() == OP_SELL )

{

//---- if CCI crosses line -190 upwards,

if (((CCIclose[2]<-190) && (CCIclose[1]>=-300)) || ((CCI[1]>MA[limit-MA_Per-1]) && (CCI[2]<=MA[limit-MA_Per-2]))

{

//---- close position

if(!OrderClose( OrderTicket(), OrderLots(), Ask, 10, Red ) )

{

_GetLastError = GetLastError();

Print("OrderClose error # ", _GetLastError );

Err=2;

return(-1);

}

}

// if the signal did not change, exit - it is too early to open

// new position

else return(0);

}

}

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

//| if execution has reached this point, there is no position open

//| check if it is possible to open a position |

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

Sleep(_Sleep);

//---- if CCI has crossed the MACD from bottom to top,

SL = NormalizeDouble(Bid - StopLoss*Point, Digits);

TP = NormalizeDouble(Bid + TakeProfit*Point, Digits);

if ((CCI[1]>MA[limit-MA_Per-1]) && (CCI[2]<MA[limit-MA_Per-2])

{

//---- open BAY position

if(OrderSend( Symbol(), OP_BUY, LotA*Lots, Ask, 5, SL, TP, "CCI_test_buy", _MagicNumber, 0, Green ) < 0 )

{

_GetLastError = GetLastError();

Print( "OrderSend OP_BUY error # ", _GetLastError );

Err=3;

return(-1);

}

return(0);

}

//---- if CCI has crossed the MACD from top to bottom,

SL = NormalizeDouble(Ask + StopLoss*Point, Digits);

TP = NormalizeDouble(Ask - TakeProfit*Point, Digits);

if ((CCI[1]<MA[limit-MA_Per-1]) && (CCI[2]>MA[limit-MA_Per-2])

{

//---- open a sell position

if(OrderSend( Symbol(), OP_SELL, LotA*Lots, Bid, 5, SL, TP, "CCI_test_close", _MagicNumber, 0, Red ) < 0 )

{

_GetLastError = GetLastError();

Print("OrderSend OP_SELL error # ", _GetLastError );

Err=4;

return(-1);

}

return(0);

}

}

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

//| Perform calculations at every price change |

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

void EveryTick()

{

int i;

if (MM==true)

{

if (AccountBalance()>(2*Deposit)) LotA=2;

if (AccountBalance()>(3*Deposit)) LotA=3;

if (AccountBalance()>(4*Deposit)) LotA=4;

if (AccountBalance()>(5*Deposit)) LotA=5;

if (AccountBalance()>(6*Deposit)) LotA=6; if (AccountBalance()>(6*Deposit); LotA=6;

if (AccountBalance()>(7*Deposit)) LotA=7;

if (AccountBalance()>(8*Deposit)) LotA=8;

if (AccountBalance()>(9*Deposit)) LotA=9;

if (AccountBalance()>(10*Deposit)) LotA=10;

if (AccountBalance()>(11*Deposit)) LotA=11;

if (AccountBalance()>(12*Deposit)) LotA=12;

if (AccountBalance()>(13*Deposit)) LotA=13;

if (AccountBalance()>(14*Deposit)) LotA=14;

if (AccountBalance()>(15*Deposit)) LotA=15;

if (AccountBalance()>(16*Deposit)) LotA=16;

if (AccountBalance()>(17*Deposit)) LotA=17;

if (AccountBalance()>(18*Deposit)) LotA=18;

if (AccountBalance()>(19*Deposit)) LotA=19;

if (AccountBalance()>(20*Deposit)) LotA=20;

}

int _GetLastError = 0, _OrdersTotal = OrdersTotal();

int z;

double SL, TP;

double MA[100], CCI[100], CCIclose[100], StandDevi[100];

int limit=ArraySize(CCI);

for(i=0; i<limit; i++)

{

CCI[i]=iCCI(NULL,0,CCI_Per,PRICE_CLOSE,i);

CCIclose[i]=iCCI(NULL,0,CCI_close_Per,PRICE_CLOSE,i);

MA[i]=iMAOnArray(CCI,0,MA_Per,0,MODE_SMA,i);

}

switch(Err)

{

case 1:

for ( z=_OrdersTotal - 1; z >= 0; z -- )

{

if ( !OrderSelect( z, SELECT_BY_POS ) )

{

_GetLastError = GetLastError();

Print("OrderSelect( ",z, ", SELECT_BY_POS ) - Error #", _GetLastError);

continue;

}

if ( OrderSymbol() != Symbol() ) continue;

if ( OrderMagicNumber() != _MagicNumber ) continue;

if ( OrderType() == OP_BUY )

{

if (((CCIclose[2]>300) && (CCIclose[1]<=300) || (CCI[1]<MA[limit-MA_Per-1]) && (CCI[2]>=MA[limit-MA_Per-2])

{

if ( !OrderClose( OrderTicket(), OrderLots(), Bid, 5, Green ) )

{

_GetLastError = GetLastError();

Print("CASE OrderClose error # , _GetLastError );

Err=1;

return(-1);

}

else Err=0;

}

}

}

break;

//=============================================================================

case 2:

for ( z=_OrdersTotal - 1; z >= 0; z -- )

{

if ( !OrderSelect( z, SELECT_BY_POS ) )

{

_GetLastError = GetLastError();

Print("OrderSelect( ",z, ", SELECT_BY_POS ) - Error #", _GetLastError);

continue;

}

if ( OrderSymbol() != Symbol() ) continue;

if ( OrderMagicNumber() != _MagicNumber ) continue;

if ( OrderType() == OP_SELL )

{

if (((CCIclose[2]<-300) && (CCIclose[1]>=-300) || ((CCI[1]>MA[limit-MA_Per-1]) && (CCI[2]<=MA[limit-MA_Per-2]))

{

if(!OrderClose( OrderTicket(), OrderLots(), Ask, 5, Red ) )

{

_GetLastError = GetLastError();

Print("CASE OrderClose error # ", _GetLastError );

Err=2;

return(-1);

}

else Err=0;

}

}

}

break;

//==============================================================================

case 3:

SL = NormalizeDouble(Bid - StopLoss*Point, Digits);

TP = NormalizeDouble(Bid + TakeProfit*Point, Digits);

if(OrderSend( Symbol(), OP_BUY, LotA*Lots, Ask, 7, SL, TP, "AI_test_buy", _MagicNumber, 0, Green ) < 0 )

{

_GetLastError = GetLastError();

Print( "CASE OrderSend OP_BUY error # ", _GetLastError );

Err=3;

return(-1);

}

else Err=0;

break;

//===================================================================================

case 4:

SL = NormalizeDouble(Ask + StopLoss*Point, Digits);

TP = NormalizeDouble(Ask - TakeProfit*Point, Digits);

if(OrderSend( Symbol(), OP_SELL, LotA*Lots, Bid, 7, SL, TP, "AI_test_close", _MagicNumber, 0, Red ) < 0 )

{

_GetLastError = GetLastError();

Print("CASE OrderSend OP_SELL error # ", _GetLastError );

Err=4;

return(-1);

}

else Err=0;

break;

}

}

 
Neo777:

Here's an EA to make the order opens on the CLOSE of the candle, not just a cross.

I would like to know how to open the order.


And how do you plan to know that the bar will close with this tick? Maybe by the opening of a new bar?

The code is inserted by button SRC

 

OK.

Yeah, the new bar.

 
Neo777:

OK.

Yeah, the new bar.

https://www.mql5.com/ru/articles/1494 here are ways of determining that a new bar has started. How it has started - check your conditions
 

Good afternoon.People, someone please help me with the WindowScreenShot function. For the 3rd day no one is answering((. Wrote the following script (see attached file).

In 2 words about the script. The script is intended for making screenshots of the current chart of the client terminal window. In the external variable extern datetime Time_bar the time of bar from which and up to the zero bar will be created (taking into account the right indent on the chart) is specified. In the line

int bar_number=iBarShift(NULL,0,Time_bar,true)

the serial number of the bar we have specified in the external variable extern datetime time_bar is searched for. The function itself, in the line

bool f=WindowScreenShot(name+".gif",1024,768,bar_number,Scale,View_graph)

Now here's the question... For simplicity, let's assume that we need to create a screenshot of the last two bars. Then, if the line

int bar_number=iBarShift(NULL,0,Time_bar,true)

is left unchanged, the result will be the following screenshot


That is, there is no bar in the screenshot (although the string

int bar_number=iBarShift(NULL,0,bar_time,true)

the bar number by time should be calculated)

If this line is presented in the following way

int bar_number=iBarShift(NULL,0,Time_bar,true)+2

you'll get the screenshot we wanted:

Question: why in case this string has the following form

int bar_number=iBarShift(NULL,0,Time_bar,true)

the screenshot is taken with a shift of 2 bars to the right of the one specified in the above line?

P.S. In order not to litter the forum, thanks in advance for the answer

Files:
 
ilunga:
show code + what input parameters are in the indicator

I checked it 20 times, I wouldn't write without checking it 20 times, all parameters are correct as in the indicator. The problem may be elsewhere, maybe you've encountered such a problem?
 

Colleagues!!! Good evening!

I've discovered an amazing QQE indicator and decided to find an Expert Advisor based on this indicator.... and could not find it. However, on this forum I found a message from user POZITIV.

He wrote the following logic: "when the red line crosses yellow line upwards, one order on Buy should open, when the red one crosses yellow line upwards - one order on Sell".

As a result, he had a half-finished code of the Expert Advisor.

I have calculated another logic: when the bold curve crosses the dotted line from top to bottom - one must sell and close that lot (buy), when the bold red one crosses the dotted line from bottom to top. And at the same moment to open immediately another lot (buy), which should close (sell) when the opposite situation happens.....-so constantly open one lot, and each crossing of the lines is used to close one and simultaneously open another lot. And the intersection probably should be considered by their values after closing one bar, ie if the 20 minutes (after closing), bold had a value of 51 (conditional), and the dotted 50, and 21 minutes (after closing), bold 50 and the dotted 51, then you have to sell. No SL or TP.

In principle the logic is simple. No arrows, no alarms and messages. Only trade in automatic mode in its pure form.

Please help me refine this code (below) to this logic. And it would be possible to adjust the period (from 1 minute to 1 day) and the SF parameter (smoothing).

For the second day I've been trying to understand the code and correct it, but I'm not a programmer(((((((((((


I'm really hoping for your help!

//--- input parameters
extern double MaxRisk=1.0;
extern double FixLot = 0.01;
extern double Exponent=2.0;
extern int Magic=888;

// костыли

extern int TakeProfit=100;
extern int StopLoss=100;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int deinit()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
//----
   int Count=0;
   double b0,b1;
   int ticket;

// параметры индикатора
   int SF=5; // original 5
   int RSI_Period=14; // original 14
   double DARFACTOR=4.236; //original 4.236

//------------ Параметры из индикатора QQEA -----------------------
// Buffer0 -- красная жирная
   string Buffer0=iCustom(NULL,0,"QQEA",SF,RSI_Period,DARFACTOR,0,0);
// Buffer1 -- жёлтый пунктир
   string Buffer1=iCustom(NULL,0,"QQEA",SF,RSI_Period,DARFACTOR,1,0);

   b0=StrToDouble(Buffer0);
   b1=StrToDouble(Buffer1);


   double Lot=GetLot(MaxRisk);
// если лот <0 выводим сообщение об ошибке
   if(Lot==0)
     {
      Alert("Недостаточно средств!");
      return(0);
     }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
   if(Lot!=0 && b0>b1) // если лот <> 0 и красная выше жёлтой
     {
      ticket=NewOrder(OP_BUY,Lot);
      if(ExistOrders(Symbol(),1,888,0)==true) // проверяем наличие ордера sell
        {
         CloseOrder();
        }
     }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
   if(Lot!=0 && b0<b1) // если лот <> 0 и красная выше жёлтой
     {
      ticket=NewOrder(OP_SELL,Lot);
      if(ExistOrders(Symbol(),0,888,0)==true) // проверяем наличие ордера buy
        {
         CloseOrder();
        }
     }

   Comment("Red line: ",b0,"Yellow line: ",b1);
   return(0);
  }
//-------------------------------------------------------------
//расчёт лота

double GetLot(int Risk)
  {
   double Free=AccountFreeMargin();
   double One_Lot =MarketInfo(Symbol(),MODE_MARGINREQUIRED);
   double Min_Lot =MarketInfo(Symbol(),MODE_MINLOT);
   double Max_Lot =MarketInfo(Symbol(),MODE_MAXLOT);
   double Step=MarketInfo(Symbol(),MODE_LOTSTEP);
   double Lot =MathFloor(Free*Risk/100/One_Lot/Step)*Step;
   if(Lot<Min_Lot) Lot=Min_Lot;
   if(Lot>Max_Lot) Lot=Max_Lot;
   if(Lot*One_Lot>Free) return(0.0);
   return(Lot);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool ExistOrders(string sy="",int op=-1,int Magic=-1,datetime ot=0)
  {
   int i,k=OrdersTotal(),ty;

   if(sy=="0") sy=Symbol();
   for(i=0; i<k; i++)
      //+------------------------------------------------------------------+
      //|                                                                  |
      //+------------------------------------------------------------------+
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         ty=OrderType();
         if(ty>1 && ty<6)
           {
            if((OrderSymbol()==sy || sy=="") && (op<0 || ty==op))
              {
               if(Magic<0 || OrderMagicNumber()==Magic)
                 {
                  if(ot<=OrderOpenTime()) return(True);
                 }
              }
           }
        }
     }
   return(False);
  }
//открытие нового ордера
int NewOrder(int Cmd,double Lot)
  {
   double TP=0; //тейкпрофит
   double SL=0; //стоплосс
   double PR=0; //Цена
   while(!IsTradeAllowed()) Sleep(100);
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
   if(Cmd==OP_BUY)
     {
      PR=Ask;
      if(TakeProfit>0) TP=Ask+TakeProfit*Point;
      if(StopLoss>0) SL=Ask-StopLoss*Point;
     }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
   if(Cmd==OP_SELL)
     {
      PR=Bid;
      if(TakeProfit>0) TP=Bid-TakeProfit*Point;
      if(StopLoss>0) SL=Bid+StopLoss*Point;
     }
   if(GetOrdersCount(Magic,Cmd)>0)return(0);
   int tic=OrderSend(Symbol(),Cmd,Lot,PR,3,SL,TP," ",0,0,Green);
   if(tic<0) Print("Ошибка открытия ордера: ",GetLastError());
   return(tic);
  }
// закрытие ордера
void CloseOrder()
  {
   double PR=0;
   while(!IsTradeAllowed()) Sleep(100);
   if(OrderType()==OP_BUY) PR=Bid;
   if(OrderType()==OP_SELL) PR=Ask;
   if(!OrderClose(OrderTicket(),OrderLots(),PR,3,Red))
      Print("Ошибка закрытия ордера: ",GetLastError());
   return;
  }
//+------------------------------------------------------------------+
// подсчет кол-ва открытых позиций
int GetOrdersCount(int MagicNumber,int Type)
  {
   int count=0;

   for(int i=0; i<OrdersTotal(); i++)
     {
      // already closed
      if(OrderSelect(i,SELECT_BY_POS)==false) continue;
      // not current symbol
      if(OrderSymbol()!=Symbol()) continue;
      // order was opened in another way
      if(OrderMagicNumber()!=MagicNumber) continue;

      if(OrderType()==Type)
        {
         count++;
        }
     }

   return(count);
  }
//-------------------------------------------------------
 
sss2019:

Well, I have checked everything 20 times myself, without checking 20 times I would not write, all the parameters are correct as in the indicator. The problem probably lies elsewhere, maybe someone has encountered such a problem?
Nothing but wrong parameters entered in iCustom and can't be. Search for it.
Spent an evening trying to solve it myself. I mixed up the parameter sequence when transferring the extern from an indicator to an EA. I was almost crazy, the sequence of parameters was the same :))
 
granit77:
Nothing but incorrect parameter entry in iCustom and it can't be. Look it up.
I myself spent an evening fighting with it the other day. I mixed up the sequence of parameters when transferring the external parameters from the indicator to the Expert Advisor. I was almost crazy, the sequence of parameters was the same :))

iCustom(Symbol(),0,"RMRCS_entry-point"," ",5,6,7,62,-62,57,-57,54,-54,0.7,1.1,1.07," ",1,9,6,1,34,6,0,4,89,1,3,3.0,2.0,0.5,3.0," ",6,6,70,30,0.0,6,3.0," ",1,21,1,45,89,1,35,89,1,9," ",4,2,5,1," ",49,-49,0,0,0,0,0,0,0,0," ",0,34,200,150,1,100," ",1,3,1,1,2," ",1.4,3.7,0,1);


And here are the parameters

extern string REI_str = "";
extern int REI1_Per=5; 
extern int REI2_Per=6;     
extern int REI3_Per=7;     
extern int REI1_up=62;    
extern int REI1_dn=-62;    
extern int REI2_up=57;     
extern int REI2_dn=-57;            
extern int REI3_up=54;     
extern int REI3_dn=-54;            
extern double REI1_ct=0.7;  
extern double REI2_ct=1.1;  
extern double REI3_ct=1.07;
extern string MACD_str = "";
extern int MACD_FastMA_Meth=1;   
extern int MACD_FastMA_Per=9;    
extern int MACD_FastMA_Price=6; 
extern int MACD_SlowMA_Meth=1;   
extern int MACD_SlowMA_Per=34; 
extern int MACD_SlowMA_Price=6; 
extern int MACD_SL_Meth=0;      
extern int MACD_SL_Per=4;       
extern int MACD_Diap_Per=89;    
extern int MACD_Slope_Meth=1;   
extern int MACD_Slope_Per=3;  
extern double MACD_ct_1 = 3.0; 
extern double MACD_ct_2 = 2.0;  
extern double MACD_ct_3 = 0.5;  
extern double MACD_ct_4 = 3.0;  
extern string RSI_str = "";
extern int RSI_Per = 6;     
extern int RSI_Price = 6;  
extern int RSI_up = 70;      
extern int RSI_dn = 30;     
extern double RSI_ct1 = 0.0; 
extern int RSI_ct2 = 6;      
extern double RSI_ct3 = 3.0;
extern string CHO_str = "";
extern int  CHO_FastMA_Meth=1;      
extern int  CHO_FastMA_Per=21;      
extern int  CHO_SlowMA_Meth=1;      
extern int  CHO_SlowMA_Per=45;      
extern int  CHO_DiapVal_Per=89;     
extern int  CHO_MADiapVal_Meth=1;   
extern int  CHO_MADiapVal_Per=35;    
extern int  CHO_SlopeDiapVal_Per=89;  
extern int  CHO_MASlope_Meth=1;      
extern int  CHO_MASlope_Per=9;       
extern string Stoch_str = "";
extern int Stoch_KPer=4;       
extern int Stoch_DPer=2;        
extern int Stoch_Slow=5;        
extern int Stoch_SL_MA_Meth=1; 
extern string EntryLevel_str = "";
extern int REI_SvS_up = 49;  
extern int REI_SvS_dn = -49; 
extern int MACD_SvS_up = 0; 
extern int MACD_SvS_dn = 0;  
extern int RSI_SvS_up = 0;  
extern int RSI_SvS_dn = 0; 
extern int CHO_SvS_up = 0;  
extern int CHO_SvS_dn = 0;  
extern int STO_SvS_up = 0; 
extern int STO_SvS_dn = 0;  
extern string EntryOther_str = "";
extern int MALgthBar_Meth=0;
extern int MALgthBar_Per=34;
extern int MAXLgthBar = 200;
extern int TtS_MinABS = 150; 
extern int Shift_Points = 1; 
extern int Start_Calc = 100;   
extern string EntryCondition = "";
extern bool Ban_InvEntry = true;    
extern int InvEntry_Bars = 3;        
extern bool Ban_TtS_Decline=true;   
extern bool Ban_Entry_Series = true; 
extern int MAX_Entry_Series=2;      
extern string Gen_str = ""; 
extern double DiapBar_CtSl = 1.4;
extern double TakeProf_CtSl = 3.7;
 
sss2019:
Can you tell me if there is a limit to the number of parameters in a non-standard indicator, when connected via iCustom?

I have there is an indicator with about 8 parameters I input all the parameters correctly, I checked it several times, but error ')' still appears at compilation - wrong parameters count D:\InstaTrader\experts\Expert_2.mq4 (11, 280)

I'd say "about 80"