My Trailing stop is not working well

MQL4 Experts

Trabalho concluído

Tempo de execução 41 minutos
Comentário do cliente
Exellent programmer I recommend thank you :)
Comentário do desenvolvedor
Good Customer

Termos de Referência

Hello,
my trailing stop does not fix it.
 
example:
when my order at 0.32lots opens to bull and it goes up my trailing stop also
goes up and it's good but it also goes down when it should not.

all this in the strategy tester,
test it on the week 2011/01/31 at the GBPUSD and you'll understand


void Trailing()
  {
   double tstart=0; double tstop=0; double tstep=0; double SL=0;
   
   tstart=TrailingStart*10; tstop=TrailingStop*10; tstep=TrailingStep*10;

   for(int i=0; i<OrdersTotal(); i++)
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic_5)
           {
            if(OrderType()==OP_BUY)
              {
               if(Bid-OrderOpenPrice()>=tstart*_Point)
                 {
                  if(OrderStopLoss()<Bid-(tstop+tstep)*_Point || OrderStopLoss()==0)
                  SL=NormalizeDouble(Bid-(tstop*_Point),_Digits);
                  bool modify=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,clrNONE);
                 }
              }

            if(OrderType()==OP_SELL)
              {
               if(OrderOpenPrice()-Ask>=tstart*_Point)
                 {
                  if(OrderStopLoss()>Ask+(tstop+tstep)*_Point || OrderStopLoss()==0)
                  SL=NormalizeDouble(Ask+(tstop*_Point),_Digits);
                  bool modify1=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(),0,clrNONE);
                 }
              }
           }
  }


Respondido

1
Desenvolvedor 1
Classificação
(620)
Projetos
680
57%
Arbitragem
25
16% / 60%
Expirado
228
34%
Livre
2
Desenvolvedor 2
Classificação
(212)
Projetos
246
45%
Arbitragem
42
10% / 57%
Expirado
5
2%
Livre
3
Desenvolvedor 3
Classificação
(554)
Projetos
765
46%
Arbitragem
23
39% / 13%
Expirado
63
8%
Livre
4
Desenvolvedor 4
Classificação
(117)
Projetos
138
41%
Arbitragem
30
7% / 77%
Expirado
17
12%
Livre
5
Desenvolvedor 5
Classificação
(173)
Projetos
201
49%
Arbitragem
18
11% / 44%
Expirado
1
0%
Livre
6
Desenvolvedor 6
Classificação
(130)
Projetos
184
32%
Arbitragem
16
31% / 63%
Expirado
27
15%
Livre
7
Desenvolvedor 7
Classificação
(365)
Projetos
412
36%
Arbitragem
35
26% / 57%
Expirado
63
15%
Livre
Pedidos semelhantes
I need help fixing my EA for MT5. It’s a very simple EA, and I currently cannot solve an issue where webrequest communicates with OpenAi API without error. Please only apply if you can help solve this issue
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA. # MANUAL ZONE MARKING # THREE TYPES OF ENTRIES (
p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131} p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131} li.li1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 14.0px 'Trebuchet MS'; color: #313131} ol.ol1 {list-style-type: decimal} I have an EA that open trades when my entry conditions are met. It usually executes one trade per day. I'd like to add an option
у нас есть стратегия, нам нужно написать mql5-код ​​для тестера стратегий МТ5,Цена договорная. Мой контакт @abbosaliyev из Telegram Программист должен знать РУССКИЙ ИЛИ УЗБЕКСКИЙ язык. Задание: разработать тестер, который использует шаблон условий на открытие и проверит весь исторический график на всех доступных таймфреймах. Остальная информация будет предоставлена ​​после согласования цены
a coder is required to add an indicator to existing ea The new indicator will work as 1. option to combine with exiting indicator to open trade 2. it will be used as alternative BE point 3. It can also be used to close order or combine with other to close trade The second Job is telegram bot to get alert fr news trade and others Details when you apply i will test the ea work on live market and all bug is fixed before
Hello, I want to make an EA based on SMC and a developer that is familiar with the concept and full understanding of this. Must have done similar jobs before and be able show it. I only want to work with developer that has good track record and is precise. Further information will be handed when contact is made. Developers that has zero rating will not be considered. Listed price is a base point. The project can also
EA DEJA FABRIQUE ? MODIFIER QUELQUE LIGNE POUR LE RENDRE RENTABLE /////////////////////++++++++++++++++++++++++++++++++++ EA AVEC UN SYTEME SIMPLE ; SEULEMENT A MODIFIER %%%%%%%%%%%%%%%%%% SI PERSONNE SACHANT CODER CORRECTEMENT , CE TRAVAIL EST POUR TOI
Trade methodology based on Red and Green lines entering Overbought / Oversold zone. Using confluence of Higher time frame, Moving Average a trade can enter when there is a strong slope angle. Market Base Line is used to determine overall market sentiment. This is designed to be an established trend scalping strategy on lower time frames. To be used initially on demo then real account when settings have been fine
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function (A) Add Transform combine the 4 Expert Advisors into just 1 Expert Advisor, maintaining the individuality of each one Leave in extern (false) or (true)
Description: I am seeking an experienced MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5 based on a specific trend-following strategy. The strategy includes precise risk management, advanced trade management features, and additional risk management tools. The EA should be adaptable to any timeframe on which it is attached. Below are the detailed requirements and parameters for the EA: Strategy

Informações sobre o projeto

Orçamento
30+ USD
IVA (20%): 6 USD
Total: 36 USD
Desenvolvedor
27 USD
Prazo
para 3 dias