[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 582

 
But here's a question:
is it possible to pass a negative profit parameter into it to control loss rather than profit?
 
artmedia70 >>:
Только вот вопрос:
а в неё можно передавать отрицательный параметр профита, чтобы контролировать не прибыль, а убыток?
you can't send anything to it, it has no incoming ones. If the order has a loss instead of a profit, it will simply return a negative value. (Number of loss)
 
Techno >>:
в нее ничего нельзя передавать, она не имеет входящих. Если у ордера будет не профит, а убыток, она просто вернет отрицательное значение. (число убытка)
Will it return -1?
Or will it return exactly the amount of the loss, no matter what
 
artmedia70 >>:
Она вернёт -1 ?
Или она вернёт именно размер убытка, не важно в чём...
the amount of the loss in the currency of the deposit.
 
When I work inside the channel, if I have an open position and the price went out of the channel up or down, when the loss of this open position reaches a certain amount of points, I have to turn it over: from Sell to Buy and vice versa...
 
Techno >>:
размер убытка в валюте депозита.
Sens... :) Now that's a thing!!!
Good luck!
 
artmedia70 >>:
Мне необходимо при работе внутри канала, если открыта позиция и цена вышла за пределы канала вверх, либо вниз, при достижении определённого кол-ва пунктов убытка этой открытой позиции, тупо её перевернуть: была Sell, стала Buy и наоборот...
Wouldn't it be easier to deduct the current price from the opening price? The difference would already be in pips.
 
artmedia70 >>:
И вот ещё, напоследок и вдогонку:
У Игоря Кима есть библиотека функций b-Lots.mqh. Она используется в некоторых кодах, приведённых здесь на данном ресурсе. Мне всё время казалось, что я имею все библиотеки Игоря, ан-нет... именно её у меня наблюдается полнейшее отсутствие. И самое ужасное, что не могу её нигде найти. Даже поиск мне не помог и его личный сайт...
Если кто в курсе где это чудо неуловимости всё-таки уловить, буду весьма признателен... :)
How you look for it, I don't know...
 
Something like that:
CurAsk=MarketInfo(Symbol(),MODE_ASK);
   CurBid=MarketInfo(Symbol(),MODE_BID);
   OpnPrice=iOpen(NULL,0,0);

//--------------------------------------------------------------- 5 --

   Magic=54;
   if (Use_Treiling_M5_Str_4) TrailingPositionsTLE_54();
   tr=Trend_PSAR(0,5);
   pt=Point;   

//==============================================================================================
   // Проверка лосевых Buy
//====================================================================

if (
      PriceOpenLastPos(NULL, OP_BUY, 54)-CurAsk>=10*pt &&      // Есть убыточная поза по Buy
      AntiLoss==false                                          // при неработающем антилосе
   )
      {
         AntiLoss=true;                                        // Врубаем антилося по открытой убыточной Buy
         ClosePositions(NULL, OP_BUY, 54);                     // Закрываем нахрен убыточный Buy
         Magic=54;                                                                 // Задаём магик... 54
         Lots_New=NormalizeLot(0.5, 0, NULL) ;                                      // Задаём лот == 0.5
         New_Comm="Strategy_4_M5_AntiLoss";                                         // Задаём комментарий для позиции
         OpenPosition(NULL,OP_SELL,Lots_New,StopLoss,TakeProfit,Magic,New_Comm);    // Открываем Sell
      }
I made this from Kim's functions... Checking for loss of the last Buy position and its reversal...
 
granit77 >>:
Как вы ищете, ума не приложу...
Holy crap...
I kneel...
I've never been able to find anything quickly with a search...
It's like a spell for me.
From the realm of mysticism...
I respect people dedicated to the mysteries of this priesthood...
Thank you very much. Three days... Oh, man...
Reason: