Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 138

 
void DeletePendingOrders()
{
    int NumberOfTry,
        err,
        ticket;

   for (int i=OrdersTotal()-1; i>=0; i--)
   {
      if (!OrderSelect(i, SELECT_BY_POS,MODE_TRADES)) continue;
      if (OrderMagicNumber() != i_magic) continue;
      if (OrderSymbol() != Symbol()) continue;
      if (OrderType() > 1)
      {
         ticket = OrderTicket();
      	 NumberOfTry=0;

         while (NumberOfTry < 3)
         {
            while (!IsTradeAllowed()) Sleep(5000);
      
            if (OrderDelete(ticket, Red))
                NumberOfTry = 3;
            else
                err = GetLastError();
      
            if (err > 0)
            { 
              Print(NumberOfTry," #",ticket," Error modifing order: (", err , ") ");
              Sleep(5000); RefreshRates(); NumberOfTry++;
            }
         }
      }
   }
}
я только вторую неделю изучаю язык,писал себе индикаторы, а вот с ТС еще неочен знаком, так что .... сотрите сами)))
 

ALXIMIKS:

I'm only in my second week of learning the language, I've been writing indicators for myself but I'm not yet familiar with the TS, so .... (erase it yourself)))
I'd say that for the second week it's a great observation)) It all worked. It seems to be the easiest thing to do, but I struggled for a while.
 
Hello, dear forum users, question about iforce function, I can't figure out how to control its angle of inclination relative to zero line, i.e. the trend, I tried to write code, this is what I got, can you tell me if I'm doing it right? Thanks in advance
double FI=iForce(NULL, 0, 13,MODE_EMA,PRICE_CLOSE,1);            // FI   
  double FI_5=iForce(NULL, 0, 13,MODE_EMA,PRICE_CLOSE,2);             
  double HA1=iCustom(NULL, 0, "Heiken_Ashi_Smoothed", 2, 6, 3, 2, 0, 1);
  double HA2=iCustom(NULL, 0, "Heiken_Ashi_Smoothed", 2, 6, 3, 2, 1, 1);
  double HA3=iCustom(NULL, 0, "Heiken_Ashi_Smoothed", 2, 6, 3, 2, 2, 1);
   
   if (FI>0 && FI>FI_5 && HA1 < HA2 && HA3 < HA2)
   {
      int F=FileOpen( "eurjpy.txt",FILE_WRITE, ';') ;
      FileWrite(F, "buy");
      FileClose(F);
       
   }              
   if (FI<0 && FI<FI_5 && HA1 > HA2 && HA3 > HA2)
   {
      int H=FileOpen( "eurjpy.txt",FILE_WRITE, ';') ;
      FileWrite(H, "sell");
      FileClose(H);
       
   }
    
  
   
   }
 

Can someone explain why during the optimisation period there appear settings of the EA where there is no profitability. What does this mean????

 
nikelodeon:

Can someone explain why during the optimisation period there appear settings of the EA where there is no profitability. What does this mean????


Too perfect trading, no losses, so all the money banks pumped ))))

 
nikelodeon:

Can someone explain why during the optimisation period there appear settings of the EA where there is no profitability. What does this mean????

If there are no losing orders, it is impossible to calculate profitability.
 
Can you tell me how to find the absolute maximum and minimum on history with the strategy tester?
 

People, can you suggest a free volume program? By way of example ClusterDelta Online.....

 
nikelodeon:

Can someone explain why during the optimisation period there appear settings of the EA where there is no profitability. What does this mean????

Few trades, max 8. Run it through more history.