Page 1 of 1

Trailling stop loss,problem

Posted: Tue Feb 15, 2022 11:03 pm
by yisrael
I use a tp of 1.5 the atr and a 1 atr stoploss
So I deployed a trailing stop that activates when the price has traveled 3 times the atr.
But there is a problem.....how many pips,distance should the trailing stoploss be adjusted...I other words how much do I move the trailing stoploss and when?

Re: Trailling stop loss,problem

Posted: Mon Feb 21, 2022 10:38 am
by yisrael
because i got so high reward/risk ratio (1.5)....it is considered a trending style...
so the trailing stop loss should have a trending style.....

the old code looks something like ...which in may opinion it is a thin way to update the trailing stop loss

Code: Select all

//for buy order
if (OrderStopLoss()<NormalizeDouble(current_ask4-1.0*stoploss_buy,Digits))
    if(!OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(current_ask4-1.0*stoploss_buy,Digits),OrderTakeProfit(),0))
      return;

//for sell order

if (OrderStopLoss()<NormalizeDouble(current_bid4-1.0*stoploss_sell,Digits))
    if(!OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(current_bid4-1.0*stoploss_sell,Digits),OrderTakeProfit(),0))
      return;

now the new updating of trailing stop loss is more flexible...in that, it is not so thin and it can handle a minor retracement

Code: Select all

// for buy
if (OrderStopLoss()<NormalizeDouble(OrderStopLoss()+0.10*(current_ask4-OrderStopLoss()),Digits))
    if(!OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(OrderStopLoss()+0.10*(current_ask4-OrderStopLoss()),Digits),OrderTakeProfit(),0))
      return;

//for sell
if (OrderStopLoss()>NormalizeDouble(OrderStopLoss()-0.10*(OrderStopLoss()-current_bid4),Digits))
   if(!OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(OrderStopLoss()-0.10*(OrderStopLoss()-current_bid4),Digits),OrderTakeProfit(),0))
    return;

now the dilemma is should i keep the nnfx rule of activating the trailing stop when price has traveled in my favor to 3 times the atr.
it sounds stupid to me to wait that long...in my opinion i should have it active from the start

Re: Trailling stop loss,problem

Posted: Mon Feb 21, 2022 4:14 pm
by yisrael
I will test activation with 3 atr vs 2 atr

Re: Trailling stop loss,problem

Posted: Mon Feb 21, 2022 4:54 pm
by yisrael
here are the results....
ACTIVATION AT 3 ATR
3ATR 3ATR
HERE IS ACTIVATION AT 2ATR
2ATR 2ATR
THEY APPEAR EQUAL TO ME....WHAT THE DUCK!!!

Re: Trailling stop loss,problem

Posted: Mon Feb 21, 2022 6:40 pm
by trailingedge
No offence and to save you time and hope, but your modelling quality in your back tests should be 99% and the horizontal line all green rather than 25% and red.
Pointless testing your hard work against misleading results
Regards.

Re: Trailling stop loss,problem

Posted: Mon Feb 21, 2022 6:51 pm
by yisrael
trailingedge wrote: Mon Feb 21, 2022 6:40 pm No offence and to save you time and hope, but your modelling quality in your back tests should be 99% and the horizontal line all green rather than 25% and red.
Pointless testing your hard work against misleading results
Regards.
I tested it....I get a 25% quality with NO visual mode...
And I get a 90% percent quality with visual mode...
The only deference is the visuals......but with visual mode you are sacrificing testing speed.
In visual mode and with no visual mode...I noticed the graph and the report I get in the two different modes is the same ...so it is pointless to see that bar get filled to 90%