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%
空闲
相似订单
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
Hello everyone, I need a simple Hedging EA that won't open opposing trades right away. The key is to avoid Hedging with the aim to lock in a price/spread arbitrage. If you already have a profitable EA that is similar and that has result I would be more than welcome to take a look at it or if you can build one for me I am more than welcome to pay for it. It must be an MT5 EA
Spike EA 41+ USD
Hi coder in the house i need an experience coder who can make two indicators into EA The ea will open on joint signal and also on single indicator signal details of open order strategy and closing will be discussed inside THE ea will have able to work on all asset on mt5 platform, Money Mgt/Manual Lot size, Auto Stop lot etc Trailing , Breakeven and profit locked and partial close etc Trading Days, and others feature

项目信息

预算
30+ USD
开发人员
27 USD
截止日期
 1 天