Hi,
Am analyzing the MGE gap for some of the strategies I run Am trying to tweak some code to set the Stop Loss to equal MFE less N points, to avoid sudden market reversals but I can’t seem to get it to trigger.
Can someone please advise how this should be?
if longonmarket then
mfe = highest[max(1,barindex-tradeindex)](high)
endif
StopLossMFE = MFE - 25
Thanks very much
First, use 25 * PipSize, instead of 25. It will affect results when price-to-pip ratio is different from 1:1.
Try using this as line 2:
mfe = max(mfe,highest[max(1,barindex-tradeindex)](high))
and make sure your Stop Loss is not negative.
Thank you Sir, very much appreciated.