[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 238

 

Good evening ! Could you please tell me where the error is... ? I am creating a graphical text object :

int Время_фрактала=Time[ФрВверх];           // Определение места обозначения фрактала по времени
       double Цена_рисунка=High[ФрВверх];          // Определение места обозначения фрактала по цене
       string Номер_свечи = Время_фрактала ;       // Назначение имени метки надписи фрактала
       ObjectFind(Номер_свечи);
       ObjectCreate(Номер_свечи,OBJ_TEXT,0,Время_фрактала,Цена_рисунка+10*PointX); // Создание надписи исторического Фр вверх
       ObjectSetText(Номер_свечи,"Фривв",14,"Arial",DarkViolet); // Задание свойств надписи
       int Error=GetLastError();                                 // Назначение имени функции проверки ошибок

The object is drawn. Then I create another object:

Время_фрактала=Time[i];            // Рисуем Фр-отмену для Фр Вверх
                   Цена_рисунка=High[i];
                   отмена_вниз = Время_фрактала;
                   ObjectCreate(отмена_вниз,OBJ_TEXT,0,Время_фрактала,Цена_рисунка+2*PointX);   // Создание надписи номера свечи С1
                   ObjectSetText(отмена_вниз,"Отмена дввниз",14,"Arial",Yellow);      // Задание свойств надписи
                   Error=GetLastError();                                  // Назначение имени функции проверки ошибок
                   Print("Error рисунка = ", Error);

By the time they should be drawn, these two objects coincide. And I want to draw them one below the other, which I do by spreading them over different horizons . But in the end the second object is drawn at the level of the first, and the first object disappears. And I get error 4200 that the object already exists. But I've spread them out on different levels. Is there something wrong...?

 
volshebnik:

Good evening ! Could you please tell me where the error is... ? I am creating a graphical text object :

The object is drawn. Then I create another object:

By the time they should be drawn, these two objects coincide. And I want to draw them one below the other, which I do by spreading them over different horizons . But in the end the second object is drawn at the level of the first, and the first object disappears. And I get error 4200 that the object already exists. But I've spread them out on different levels. Is there something wrong...?

Objects are not identified by price, colour, type, etc., but by name. In your case, you assign the name to the time. If the time is the same, then the object names ("candlestick_number" and "undo_down") will naturally be the same. This will result in an error 4200.
 
MaxZ:
Objects are not identified by price, colour, type, etc., but by name. In your case, you assign the name to the time. If the time is the same, then the object names ("candlestick_number" and "undo_down") will naturally be the same. This will result in an error 4200.
Thanks Max ! Assigned the name to the price level - and everything worked )
 
volshebnik:
Thanks Max ! Put the name at the price level and it all worked out )
Danger!!! Because the price level can repeat itself and you'll run into the same rake...
 
MaxZ:
Dangerous!!! Because the price level can repeat itself and you'll run into the same rake...
I assign time to one object's name and price level to another. The time will never match the price.
 
volshebnik:
I assign time to one object's name and price to another object's name. Time is never the same as price.
Got it... For two objects it's more or less acceptable! :)) But I would never do that! ;D
 
MaxZ:
Got it... For two sites, it's more or less acceptable! :)) But I would never do that! ;D
How better and with what ? )
 
The leverage used in the client terminal is 200. Is it possible to decrease it to, say, 20 when setting an order using the script? What does the parameter dMyLeverage mean in the scripts?
 
belck:

this is how the orders are opened:

I want to make the script calculate a lossless script like this:

if

if

if

how to insert this code to determine the line without loss in the EA:


made it like this and it worked, just like I wanted it to)

//---------------------
        if (totalSell > 1)
        {
   
   LastSellPrice = FindLastSellPrice();
        if ((SLs < Bid && SLs > LastSellPrice) || (LastSellPrice > SLs && SLs > Bid)
    {
    CloseAllSell();
    }
   }
  if (totalBuy > 1)
  {
  LastBuyPrice = FindLastBuyPrice();
   if (SLb > Ask && LastBuyPrice > SLb)
    {
    CloseAllBuy();
    }
  }
//-----------------------
 

1, Window with ticks. Is there any way to set it to fill to full depth?

2, Is there any way to disconnect the terminal from the server without closing it? (Switching to a non-existent account does not work).