Modify existing trailing stop snipet

MQL4 Indicatori Esperti

Lavoro terminato

Tempo di esecuzione 1 ora
Feedback del cliente
Thanks for the fast and well done job! I will happily work again with you!
Feedback del dipendente
old customer nice to meet again :)

Specifiche

Hello, 

I am looking for a programmer who can modify an existing code for trailing SL (below you see the example for sell trades).

This code will add a trailing SL if a certain price has reached (see yellow part of code)

      if ( nsell(Magic1)>0 )
        {
         for(int j=0;j<OrdersTotal();j++)
           {
            if(OrderSelect(j,SELECT_BY_POS,MODE_TRADES))
              {
               if(OrderType()==1 && OrderSymbol()==Symbol() && OrderMagicNumber()==Magic1)
                 {
                  double _commission=(OrderCommission()*-1/OrderLots()/MarketInfo(Symbol(),MODE_TICKVALUE)*MarketInfo(Symbol(),MODE_TICKSIZE));
                  double _trailmove=(Trail_Start*point);
                  double _spreadmove=((Trail_Start+MarketInfo(Symbol(),MODE_SPREAD))*point);
                  double _minmove=MathMax(_trailmove,_spreadmove);
                  double _totalmove=NormalizeDouble((_commission+_minmove),5);
                  if ( (OrderStopLoss()>Close[0]+(Trail_Start+Trail_Steps)*point || OrderStopLoss()==0) 
                    && (OrderOpenPrice()-Close[0])>=(_minmove) )
                    {
                     bool sb=OrderModify(OrderTicket(),OrderOpenPrice(),Close[0]+(_totalmove),OrderTakeProfit(),0,clrMagenta);
                     if(sb)
                       {
                          hsb=Close[0]+(_minmove);
                          Print("Move TSL Sell "+StringSubstr((string) _totalmove,0,6)+" pips");
                        }
                    }
                 }
              }
           }
        }
     }

Right now the code will only add the SL to sell trades which have:

(OrderOpenPrice()-Close[0])>=(_minmove)


The code should be changed so the same SL will added to all open sell trades, so they will be closed at the same time when SL is hit (basket close). 

Please understand that this is just the snipet for the trailing stop function.


If you have questions then dont hesitate to ask me.


Kind regards,

silverchair


Con risposta

1
Sviluppatore 1
Valutazioni
(2)
Progetti
4
25%
Arbitraggio
2
50% / 50%
In ritardo
1
25%
In elaborazione
2
Sviluppatore 2
Valutazioni
(35)
Progetti
64
22%
Arbitraggio
10
0% / 60%
In ritardo
18
28%
Gratuito
3
Sviluppatore 3
Valutazioni
(356)
Progetti
632
26%
Arbitraggio
89
73% / 13%
In ritardo
12
2%
Gratuito
4
Sviluppatore 4
Valutazioni
(71)
Progetti
97
43%
Arbitraggio
2
50% / 0%
In ritardo
2
2%
Gratuito
5
Sviluppatore 5
Valutazioni
(466)
Progetti
697
56%
Arbitraggio
43
30% / 33%
In ritardo
113
16%
In elaborazione
Ordini simili
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
Hello Every one, Good day, I want from someone professional to create an EA is working on Mt5, This EA is working by depend on some indicators, and all those indicators must be working on MACD window, not on the chart, for more details please read my attached pdf file carefully. Many Thanks
I'm looking for an expert MQL5 developer that can create an EA that's based on my price action trading strategy with no indicators. The EA must analyze trades based on my price action rules, enter trades based on my price action rules, manage trades based on my price action rules and exit trades based on my price action rules
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
I need stochastic div (hidden &regular ea) that should perform task in all tf's ..divergence is a repaint stly so i want to use it with candlestick flips .. so bet for it
Hello, I have an indicator from a friend and I'd like to replicate it on my own TradingView or MT5 platform. Could you assist me with that?. Here is the link
so basically I have an EA(mql5), AI script(python), flask server and socket server both on python. Now this is an experimental script as I am trying to learn. However the EA is not entering any trades. How much would it cost for you to troubleshoot this for me? Thank you in advance
NEW FUNCTION 50+ USD
La idea es la siguiente, sería un EA semi automático. Yo como trader opero en zonas. En adelante las vamos a denominar ``zonas calientes´´. El EA debe que necesito debe operar conforme a 4 zonas calientes que yo configure en el mismo. ¿Qué hará el EA en cada una de esas zonas calientes que yo he configurado? En cada una de estas zonas el EA debe realizar hedging (crear un rango en el cual el EA entrara en sell o en
I have the bot just over half made, from another developer who let me down and decided they no longer wished to finish the project, so I have a basic example of the fundamentals of what it could look like, although multiple functions I require do not work, but I can show this to you on request. There are multiple features that I require, so please read the in depth requirement sheet on the attachment. Function: To

Informazioni sul progetto

Budget
30+ USD
IVA (19%): 5.7 USD
Totale: 35.7 USD
Per lo sviluppatore
27 USD
Scadenze
da 1 a 2 giorno(i)