Breakeven stoploss

MQL4 指标 专家

指定

As you can see from the EA I have attached. The stop moves to breakeven + 5pips when the price moves in the direction of profit by 7 pips + 5 pips. The issue with this stop is it moves from entry price(openorderprice) due to slippage sometimes entry price is not always candlestick open(which is when the trade is supposed to open.


I want the code changed so that breakeven stoploss to be set from candlestick open.


he stoploss code I am using at the moment is shown below.


void TrailingStopBE(int type, double profit, double add) //set Stop Loss to open price if in profit

  {

   int total = OrdersTotal();

   profit = NormalizeDouble(profit, Digits());

   for(int i = total-1; i >= 0; i--)

     {

      while(IsTradeContextBusy()) Sleep(100);

      if(!OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) continue;

      if(OrderMagicNumber() != MagicNumber || OrderSymbol() != Symbol() || OrderType() != type) continue;

      RefreshRates();

      if((type == OP_BUY && Bid > OrderOpenPrice() + profit && (NormalizeDouble(OrderStopLoss(), Digits()) <= 0 || OrderOpenPrice() > OrderStopLoss()))

      || (type == OP_SELL && Ask < OrderOpenPrice() - profit && (NormalizeDouble(OrderStopLoss(), Digits()) <= 0 || OrderOpenPrice() < OrderStopLoss())))

         myOrderModify(OrderTicket(), OrderOpenPrice() + add, 0);


 TrailingStopBE(OP_BUY, 70 * myPoint, 0 + 50 * myPoint); //Trailing Stop = go break even + fixed value

   TrailingStopBE(OP_SELL, 70 * myPoint, 0 - 50 * myPoint); //Trailing Stop = go break even - fixed value

附加的文件:

反馈

1
开发者 1
等级
(595)
项目
927
46%
仲裁
31
39% / 29%
逾期
93
10%
工作中
2
开发者 2
等级
(169)
项目
204
30%
仲裁
25
40% / 44%
逾期
12
6%
空闲
3
开发者 3
等级
(93)
项目
133
35%
仲裁
13
38% / 31%
逾期
32
24%
空闲
4
开发者 4
等级
(24)
项目
28
32%
仲裁
1
0% / 0%
逾期
0
空闲
5
开发者 5
等级
(19)
项目
35
26%
仲裁
10
30% / 70%
逾期
5
14%
空闲
6
开发者 6
等级
(108)
项目
138
43%
仲裁
19
16% / 53%
逾期
20
14%
已载入
7
开发者 7
等级
(21)
项目
24
17%
仲裁
15
20% / 40%
逾期
6
25%
空闲
8
开发者 8
等级
(26)
项目
29
45%
仲裁
0
逾期
1
3%
空闲
9
开发者 9
等级
(63)
项目
84
26%
仲裁
23
22% / 48%
逾期
23
27%
空闲
10
开发者 10
等级
(87)
项目
114
26%
仲裁
7
29% / 57%
逾期
5
4%
空闲
相似订单
I have the mq5 file, I need a buffer adding to the indicator, so it appears in the data window so I can reference it later in an EA. As the below screenshot shows, there is a median ray line from yesterday (the dashed horizontal line) - I want this value in the data window called Median Ray. I want this to be a single value per day, so todays Median Ray would be 17868, and so on each day. So I want all the Developing
I would like to develop my own indicator on metatrader 4 and tradingview. We would start with a basic version that we would improve later. It is an indicator based on several analyses and which would provide several indications. I am looking for someone who can develop on MT4 and Mt5, initially I would like to do it on mt4 and then on mt5. If you have expertise in pinescript it is a plus because I would like to
I urgently require swift assistance to convert a complex indicator into a fully functional scanner, capable of automatically sending real-time data, alerts, and notifications via email, ensuring seamless integration and prompt delivery of critical information to facilitate informed decision-making and timely action
I need to improve the code of an indicator that is too heavy and slow when running and when used with iCustom in an EA. No other changes to the indicator are requested: the original features of the indicator should remain as theay are. I'll provide the indicator after job acceptance. I request final source code mq5 file. Thank you Regards
I have a mt5 indicator that is working perfectly but I will like to make it an expert advisor to have an automated trade. I will be glad if I can get a well experienced developer to execute this project. Thanks
O TRABALHO CONSISTE NA MUDANÇA DO HISTOGRAMA DO INDICADOR TREDN DIRECTION AND FORCE DSEMA SMOOTHED PARA O HISTOGRAMA DA FOTO ANEXA, OBEDECENDO AS TRES CORES VERDE (UP, VERMELHOR(DOWN) E CINZA(TREND). O MESMO TEM QUE ODECER O MESMO CALCULO E COLORIR DA MESMA FORMA POREM COM HISTOGRAMA DDE FORMATO DIFERENTE
If you are knowledgeable in hedging strategy we can chat. I created my simple EA using Fxdreema , so you only need to modify it for me. There are two parts of the EA , 1. Is the execution strategy 2. Is the money management strategy (hedging). I already created number 1 which is the execution of trades , I only need someone who can implement hedging in every orders the EA create. Additional Parameters needed. Trade
We are interested in a TradingView indicator that reads candlestick pattern shapes and shows the location of entry and exit points on a candlestick chart. What services do you provide related to this
Hello Im looking for professional trading developer who htf ready made trading with best and working strategy with low risk level with average of 30 to 60 percent profit margin, broker is not problem, any broker is welcomed and any trading pairs are welcomed as well
the sl doesnt work i want the tp logic to remain i need the trend direction fucntion tow ork i the trend is up then only buys if down only sells i need the fibo nacci fucntion to work as well and the flat zone function to work as well and i need the code to trade 1% of the balance //+------------------------------------------------------------------+ //| US500_EA.mq4 | //|

项目信息

预算
30+ USD
VAT (23%): 6.9 USD
总计: 36.9 USD
开发人员
27 USD
截止日期
 1  3 天