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

 
And how do you know if your offer to order is chosen by the customer? :) :) :) Is there a notification?)
[Deleted]  

If there's no picture, write down how to insert it properly.

Currently trying to paste by copying. BMP file is 725kb.EURUSD chart, M5, 2014.01.12 13:59 UTC, Alpari Limited, MetaTrader 4, Real

 
Trader7777:
Guys, I've encountered a strange problem. At this part of the code, the tester just hangs: no errors in the log, the processor is running at maximum, but the tester does nothing.

Don't forget to check division by zero
[Deleted]  

It worked. VladislavVG's pictures are different. The last ZZ (red) ray was not formed.

The indicator data is different. We did not understand each other.

I don`t know the reason, but I looked stupid.

I will not worry, maybe it is still a white streak!

[Deleted]  
sergeev:
where is the code ?
it hangs on it, not in the modification

maybe it hangs on it too.


void CloseHalfOrders(int otype) // ф-ция закрытия половины ордеров сетки
{
  int count = 0; double CTbuy = CountTrades(OP_BUY); double CTsell = CountTrades(OP_SELL);
  double n = NormalizeDouble (CTbuy/2,1); double k = NormalizeDouble (CTsell/2,1); 
  for (int i =0; i<=OrdersTotal(); i++)
  {
    if (OrderSelect(i, SELECT_BY_POS,MODE_TRADES))
    {
       if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
       {
         if (OrderType() == otype)
         { 
           if (otype == OP_BUY)
           {
             if (count<n)
                      
               OrderClose(OrderTicket(),OrderLots(),Bid,0,Lime);
               count++;
               i--; //              ВЕРНУТЬСЯ НА ПОЗИЦИЮ УДАЛЁННОГО ОРДЕРА
               Sleep(1000);
           
             }
               if (otype ==OP_SELL)
               {
                 if (count<k)
            
                 OrderClose(OrderTicket(),OrderLots(),Ask,0,Lime);
                 count++;
                 i--; //              ВЕРНУТЬСЯ НА ПОЗИЦИЮ УДАЛЁННОГО ОРДЕРА
                 Sleep(1000);
               }
             }
       }
     }
   }
   
 }
[Deleted]  
Vinin:

Don't forget to check the division by zero

what does that mean?
 
kosmos0975:


The new text will erase the old one by itself. Where needed, place Comment(" New text ");

It is possible to write several lines: Comment("mas[00]= ",mas[0],"\n",

--- by analogy ---

"mas[01]= ",mas[1]);


Thank you for your help.
 
Can you tell me if the budget(credits) under the price in the "Jobs" section means the price of the job in USD?
 
vitali-attila:
Can you tell me if the budget(credits) under the price in the theme "Jobs" means the price of the job in USD?

yes - 1 credit - 1 USD
 
Trader7777:

what does it mean?

If there are no open orders, then you will have a division of zero, because the number of lots will be zero