Hi All,
I’m new to automated trading so your kind help would be much appreciated.
I want to provide a stop loss at the last swing low, for example just below the low (e.g. 2 points) of the last 3 bars, however, I want the stop to be fixed at that price and not trail (not last 3 bars from current bar as time passes).
Thanks very much 🙂
Kindest Regards,
George
You have to set your Stop Loss when you place an order, so it will not move (LONG example):
IF MyLongConditions AND Not OnMarket THEN
BUY 1 CONTRACT AT MARKET
SET STOP LOSS abs(close - (lowest[3](low) - 3 * pipsize))
ENDIF
Hi Roberto,
Thank you very much, I will give it a shot.
George
Hi Roberto,
Yep, that works.
And if I wanted to set my profit say 2 times my risk?
Thanks again.
George
Then you have to save your stop loss in a variable, then use it with a multiplier:
[scode]
IF MyLongConditions AND Not OnMarket THEN
BUY 1 CONTRACT AT MARKET
SL = abs(close – (lowest[3](low) – 3 * pipsize))
SET STOP LOSS SL
SET TARGET PROFIT SL * 2
ENDIF
[/scode]