Breakeven stoploss

MQL4 Indicators Experts

Specification

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

Responded

1
Developer 1
Rating
(586)
Projects
918
46%
Arbitration
31
39% / 29%
Overdue
93
10%
Free
2
Developer 2
Rating
(169)
Projects
204
30%
Arbitration
25
40% / 44%
Overdue
12
6%
Free
3
Developer 3
Rating
(92)
Projects
132
35%
Arbitration
13
38% / 31%
Overdue
32
24%
Free
4
Developer 4
Rating
(24)
Projects
28
32%
Arbitration
1
0% / 0%
Overdue
0
Free
5
Developer 5
Rating
(19)
Projects
35
26%
Arbitration
10
30% / 70%
Overdue
5
14%
Free
6
Developer 6
Rating
(105)
Projects
135
42%
Arbitration
19
16% / 53%
Overdue
20
15%
Loaded
7
Developer 7
Rating
(21)
Projects
24
17%
Arbitration
15
20% / 40%
Overdue
6
25%
Free
8
Developer 8
Rating
(26)
Projects
29
45%
Arbitration
0
Overdue
1
3%
Free
9
Developer 9
Rating
(62)
Projects
84
26%
Arbitration
23
22% / 48%
Overdue
23
27%
Working
10
Developer 10
Rating
(87)
Projects
114
26%
Arbitration
7
29% / 57%
Overdue
5
4%
Free
Similar orders
Hi there, I need a very highly skilled mt4 programmer to code and design an EA from scratch. The logic of the EA will be discussed with you in comments section, only reach out if you can code perfectly for mt4 using MQL4 coding solutions language, EA must be able to run well without any problems and work according to the logic thanks
I came across an indicator that's perfectly good in catching spikes in boom amd crash but i would want it to be modified and to improve accuracy As a professional you will have to go through the indicator and explain to me the strategy with which the indicator was buid and tell me the possibility of improving it better
### Summary of EA Requirements 1. **Time Period**: - The EA should operate on the H4 timeframe. 2. **RelicusRoad MACD v2 Indicator**: - **Parameters**: - Fast EMA Period: 12 - Fast EMA Type: Close price - Slow EMA Period: 24 - Slow EMA Type: Close price - Signal SMA Period: 9 - The EA should use this indicator to determine the crossover condition between the MACD line and the signal line. 3
An EA that executes when the 21 and 55 SMA Cross on certain time frame also the EA will understand supply and demand levels and executes when price reacts on this levels specified and target/stoploss levels will be predetermined...also the robot will also comprise stochastic oscillator
Ind V5 TV Strategy Requirements: Instruments: Forex pairs, Crypto and Stocks across exchanges TimeFrame: Multi-Time Frame comparisons, details below Indicators: Ichimoku Cloud, ATR & Choppiness Index Trade times: First Order: Day of Week Start Time, Day of Week First Order time, Day of Week Last Order Time and Day of Week Square Off Time Intraday TF: 1 min, 3 mins, 9 mins, 27 mins and 81 mins Position Size (Lots)
I want this EA in mql4. The two indicators are written in pinescript Developer should please understand it to develop the EA. One of the indicator will be used as direction and the other for entry. The should have code that it can be used for( only one PC and an expiration date. ; this the developer should show me how to adjust it, so that I can adjust to my preference). Parameters:number of trades.lotsize, SL pips
I need a robot for forex trading~~The way the robot should work is that when I put it into a 5 minute chart, the chart will show 15 minutes, one hour, Regardless of whether they are buying or selling, they must buy or sell in the same color at the same time~~~ Use the following indicators: HalfTrend 1 & alerts mtf Trafficlight indicator.MQ4 When placed into a 5 minute chart ~ the chart will show 15 minutes, one
I am looking for a programmer to do EA trader. If you can understand what I want from the video i do and you can do it, contact me because you will be able to do what I want. https://drive.google.com/file/d/1wbHxbUQQqCkdpr0-pHfIh2b288LzYTV2/view?usp=sharing maximum budget = 150$ Preference is given to someone who: -speaks Arabic so I can explain it clearly to him - And the lowest price
I SIMPLY NEED SOMEONE TO INTEGRATE THESE OPTIMIZATION ALGOS INTO MY EA. THE LIBRARY IS ATTACHED BELOW. NEED THIS DONE FAST. LET ME KNOW IF YOU HAVE OTHER QUESTIONS A list of implemented optimization algorithms: BGA (binary genetic algorithm) ANS (across neighbourhood search) CLA (code lock algorithm) P_O_ES ((P+O) evolution strategies) CTA (Comet Tail Algorithm) SDSm (stochastic diffusion search M) ESG (evolution of
Create a robot like this live on YouTube, it is a simple hedge system that does not have martingale or other risky means of.making money.... please check out the link and if it is possible for you to repeat this then reach out with a sample and price. YouTube: https://www.youtube.com/live/cT_42RWzq_0?si=Z8M5mKkAMGZhxdTL

Project information

Budget
30+ USD
VAT (23%): 6.9 USD
Total: 36.9 USD
For the developer
27 USD
Deadline
from 1 to 3 day(s)