Hi
You all coders ;>)
I want this to happen in sideways markets to minimize size of losses but my code skills are below par.
// Stops and targets
IF pPROFIT =< 10
THEN SET STOP pLOSS 0
ENDIF
SET STOP pLOSS 50
SET TARGET pPROFIT 250
JSParticipant
Senior
Hi @OMXet
Is it the intention that you measure the “Range” of the sideways movement and when it is too narrow / small that you then set your stop loss to zero …?
Hi
Noooo, I just want to SET STOP LOSS = 0 as fast as my profit is over 10 points!!!
JSParticipant
Senior
Hi @OMXet
You can then use “Close-TradePrice” to see if your profit is larger than 10.
Instead of “Set Stop pLoss 0” you can set the “Set Stop” to the level of the “TradePrice”… (BreakEven)
If Close - TradePrice > 10 then
Set Stop Price TradePrice
Set Target pProfit 250
Else
Set Stop pLoss 50
Set Target pProfit 250
EndIf
Thx JS
Exactly what I was looking for ;>))