Trailing Stop

MQL4 Эксперты

Работа завершена

Время выполнения 19 часов
Отзыв от исполнителя
Thank you for your order.

Техническое задание

I need a Trailing Stop that is based on the highest high or the lowest low after the order is opened. 

For the long trade, I need the trailing stop to move the stop loss price to the highest high price after the order is opened minus the 2 Average True Range. For the long trade, if the bar that the trade is entered is the highest bar (the system usually enters a trade at the opening of the bar) after the trade is entered, the trailing stop should include the bar that the trade is entered.  As for short trade, I need the trailing stop to move the stop loss price to the lowest low price after the order is opened plus the 2 Average True Range. For the short trade. if the bar that the trade is entered is the lowest bar (the system usually enters a trade at the opening of the bar) after the trade is entered, the trailing stop should include the bar that the trade is entered. 

To make this trailing stop more flexible, I need you to make number of ATRs as an input as well. 

The function should include the code attached. 

void AdjustTrail()
{

//buy order section
   for(int b=OrdersTotal()-1;b>=0;b--)
                {
      if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES))
         if(OrderMagicNumber()==MagicNumber)
            if(OrderSymbol()==Symbol())
               if(OrderType()==OP_BUY)
                   if(OrderStopLoss()< B_ATRStop)
                        {                                                                                               OrderModifyResult=OrderModify(OrderTicket(),OrderOpenPrice(),BATRStop,OrderTakeProfit(),0,Orange);
                        }
                }

for(int s=OrdersTotal()-1;s>=0;s--)
                {
      if(OrderSelect(s,SELECT_BY_POS,MODE_TRADES))
         if(OrderMagicNumber()==MagicNumber)
            if(OrderSymbol()==Symbol())
               if(OrderType()==OP_SELL)
                  if(OrderStopLoss()> S_ATRStop)
                        {                                                                       OrderModifyResult=OrderModify(OrderTicket(),OrderOpenPrice(),SATRStop,OrderTakeProfit(),0,Orange);
                        };
                }

If there is an error code in sending the order, the function should be able to resend the order 3 times with a 1sec pause in between. 






Откликнулись

1
Разработчик 1
Оценка
(584)
Проекты
915
46%
Арбитраж
31
39% / 29%
Просрочено
93
10%
Работает
2
Разработчик 2
Оценка
(33)
Проекты
35
40%
Арбитраж
11
9% / 91%
Просрочено
4
11%
Свободен
3
Разработчик 3
Оценка
(488)
Проекты
1014
58%
Арбитраж
29
28% / 24%
Просрочено
131
13%
Работает
4
Разработчик 4
Оценка
(277)
Проекты
334
55%
Арбитраж
14
36% / 29%
Просрочено
1
0%
Свободен
Похожие заказы
AMBER HEADSTONE EA STEP ONE : On the 1H time frame draw a horizontal line at the end of the 7 th candle after the period separator STEP TWO : Wait for the close of the 8 th either above or below the horizontal line. When the 8 th candle of the 1H time frame closes above the horizontal line it is our first signal of buy while, when the 8 th candle of the 1H time frame closes bellow the horizontal line it is our first
I need to resolve some bugs that my indicator presents and convert it to mql5 , it task is remote via "anydesk" The task will be done alone and only through "anydesk", it is my way of working, if you do not have a problem with it, write to me privately to start working
Hi i need a indicator be turned into forex robot THOSE TWO INDICATORS ARE REVERSAL INDICATORS I WANT THEM TO BE COMBINED BUY ON UPTREND SELL ON DOWNTREND CONTINUE TO OPEN TRADES ACCORDING TO THE TREND USING BUILT-IN RISK 1% OF THE ACCOUNT PARAMETER LOTS SIZE, STOPLOSS THE EA MUST WORK ON EVERYTIME FRAME BE ABLE TO TRADE INDICES, FX PAIRS, COMMODITIES
I want someone who can turn my trading strategy in a bot.... To execute automated trades... Strategy is simply based on two moving averages, when they cross pass. Bot must be fully automated
I have the ea with me , can you please change the comment? i only got the ex4 file with me , please do chnage the comment only and i need you to put license and cloud lock to this ea can any body do it
Hello, I am looking for someone that can develop for me a trading bot, that can trade on Crash 500 and 1000, and also on Boom 500 and 1000. The bot must buy on Crash 500 and 1000 and sell on Boom 500 and 1000. The indicator we use is the Awesome Oscillator. The CRASH 500/1000 we scalp it by buying. We only place our ENTRY that is to BUY when the Awesome Oscillator changes from VALUE DOWN to VALUE UP and by changing I
Hi there, I need a profitable MT5 trading robot with confirmed profitable results. It can be for any major pair, I just need a profitable bot, on autopilot. If you have a profitable bot, please contact me. And if possible, will need to test it for sometime before I purchase it
1. I want function that will use the totalBuyLots and totalSellLots to place trades when there is reverse trade direction. For example, if there is an open trade of buy, 0.1, 0.1, 0.1, then if the trade direction change to sell, meaning a sell trad is opened, then the totalBuyLots which now 0.3 will be used to open the sell of 0.3 lots. Same if a sell trade is opened first, then total lots will be use d when
Please make a new pending order software and add it to the each of the Ea's that I would send the source codes. If any of the settings of the usual pattern of the Ea's have there in the EA's are not clear to you, then I will explain that part
I wan to oder a product for copytrade online like that : - master on mt4 - slaver (copier) by python that mean MT4 open an oder, python will open the same on client account => python will click the mouse then results will show manual (not expert) value : autolot (ratio with receiver balance) - fixed lot - Smart ratio (ratio with master account) trade on many pairs get source for manage license hide everything that

Информация о проекте

Бюджет
30+ USD
Исполнителю
27 USD
Сроки выполнения
до 1 дн.