Hello All !
I would like to set a stop loss based on the last bar close instead of the position opening.
I am currently using an algo that stops once my current profit target is reached (thanks @robertogozzi !) but I often miss bigger profit opportunities when the trade keeps going in my direction.
That is why I would like to tweak it a bit
FROM
“Once my daily target is reached, close position and stop for the day”
TO
“Once my daily target is reached, set a STOP LOSS 10 points below close and stop for the day once the strategyprofit is reached (will close when the next condition is met).
That is what I use now (works well):
ONCE MyGOAL = 50 //50 pips Daily
IF OnMarket AND (Tally + ((PositionPerf * PositionPrice / PipSize)) >= (MyGOAL * PipSize)) THEN
SELL AT Market
EXITSHORT AT Market
TradeON = 0
I would like to replace it with 2 components that would be:
ONCE MyGOAL = 60 //60 pips Daily
IF OnMarket AND (Tally + ((PositionPerf * PositionPrice / PipSize)) >= (MyGOAL * PipSize)) THEN
SET STOP pLOSS (close - 10)
ENDIF
IF STRATEGYPROFIT > 50 THEN
QUIT
ENDIF
2 questions
– Would a STOP LOSS set up as above work? (“Close – 10”)? Or should I write “Close[1] – 10”?
– Would the combination of both work the way I want it to?
Your help would be appreciated!
Enjoy your day
Replace line 3 of the second code snippet with this new instruction added a few months ago:
Set Stop Price (close - 10*PipSize)