I will write an advisor free of charge - page 137

 
Valeriy Yastremskiy:

In EA, only a modification to Staploss makes the trawl. There is no other way.

how is this done? can i have a sample line?

 
Сергей Дыбленко:

how? can i have a sample line?

I think you looked at the code from kodobase, where the orders are opened by time.)

bool ModifyTral()                                     // Спец. функция start
  {

//------------------------------------------------------ 3 --
   while(true)                            // Цикл модификации
     {
      double TS=Tral_Stop;                // Исходное значение
      double Min_Dist=MarketInfo(Symb,MODE_STOPLEVEL);//Миним. дист
      if(TS<Min_Dist)                     // Если меньше допуст.
         TS=Min_Dist;                     // Новое значение TS
      //--------------------------------------------------- 4 --
      Modify=false;                  // Не назначен к модифи
      switch(Tip)                         // По типу ордера
        {
         case 0 :                         // Ордер Buy
            if(NormalizeDouble(SL,Digits)<  // Если ниже желаем.
               NormalizeDouble(Bid-TS*Point,Digits))
              {
               SL=Bid-TS*Point;           // то модифицируем его
               Text="Buy ";        // Текст для Buy
               Modify=true;               // Назначен к модифи.
              }
            break;                        // Выход из switch
         case 1 :                         // Ордер Sell
            if(NormalizeDouble(SL,Digits)>  // Если выше желаем.
               NormalizeDouble(Ask+TS*Point,Digits)
               || NormalizeDouble(SL,Digits)==0)//или равно нулю
              {
               SL=Ask+TS*Point;           // то модифицируем его
               Text="Sell ";              // Текст для Sell
               Modify=true;               // Назначен к модифи.
              }
        }                                 // Конец switch
      if(Modify==false)                   // Если его не модифи
         break;                           // Выход из while
      //--------------------------------------------------- 5 --
      TP    =OrderTakeProfit();    // TP выбранного орд.
      Price =OrderOpenPrice();     // Цена выбранн. орд.
      Ticket=OrderTicket();        // Номер выбранн. орд.

      Alert("Модификация ", Text,Ticket,". Ждём ответ..");
      Ans=OrderModify(Ticket,Price,SL,TP,0);//Модифи его!
      //--------------------------------------------------- 6 --
      if(Ans==true)                       // Получилось :)
        {
         Alert("Ордер ",Text,Ticket," модифицирован:)");
         break;                           // Из цикла модифи.
        }
      //--------------------------------------------------- 7 --
      if(Fun_Error(GetLastError())==1) // Обработка ошибок
         continue;                           // Повторная попытка
      break;                              // Из цикла модифи.
     }                                    // Конец цикла модифи.
//------------------------------------------------------ 8 --

//--------------------------------------------------------------- 9 --
   return(Modify);                                     // Выход из ModifyTral()
  }
 
Valeriy Yastremskiy:

I think you looked at the code from kodobase, where the orders are opened by time. there it was)

THANK YOU!!!!!!!!!!!!!!!

 
Valeriy Yastremskiy:

manually set when the order is clicked, programmed by modifying the stop loss. There is no separate command/function.

Sergey Dyblenko:
Is there a floating trailing stop rather than a fixed one in the EA?
Yes, of course. As many as you like. For example, with every minute the stop changes by N*Y, not by N pips. Or a degree or another law.
 
Guys Please!!! Screw "REVERSE OF WORK" to this robot!
Files:
HAN_916.mq4  10 kb
 
Progetto 46:
Guys Please !!! Screw "REVERSE OF WORK" to this robot

That's about it, if you're quick

Files:
HAN_916.mq4  19 kb
 
Programmers handy, please add the Breakeven function to the board, I'm itching to get it right now. I myself have tried it and did not get anywhere. I am asking for help from someone knowledgeable.
Files:
FO.mq4  120 kb
 
Сергей Баженов:
Programmers handy, please add the Breakeven function to the board, I'm itching to get it right now. I myself have tried it and did not get anywhere. Here, I ask for help from the knowledgeable.
Screwed. Author Kimiv. A little tweak.
Files:
FO-1.mq4  151 kb
 
Александр:
Screwed it on. Author Kimiv. Fixed it a bit.
Alexander, thank you very much! Thank you so much!
 
Сергей Баженов:
Alexander thank you so much ! Thank you so much!
You're welcome.