Is this possible within a candle. Dont wait untill candleclose
if X% in profit and Bear1 then
sell at market
Endif
This code is not what i need, though it waitns untill candleclose:
if longonmarket and bear1 and (close > positionprice * 1.01) then
SELL AT MARKET
endif
JSParticipant
Senior
If LongOnMarket and Bear1 and Close > PositionPrice * 1.01 then
Sell at (PositionPrice * 1.01) Stop
EndIf
Thanks JS, but does this mean I have to wait for the candleclose?
JSParticipant
Senior
No, you don’t have to wait because it’s a STOP order…
If I do understand You correct then A=1 and A=2 would give the same result but it does not.
if A=1 then
posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
IF LONGONMARKET AND (posProfit > 0) and Bear1 THEN
SELL AT MARKET
ENDIF
endif
if A=2 then
IF LONGONMARKET AND Bear1 THEN
SELL at (positionprice*1) stop
ENDIF
endif
JSParticipant
Senior
Hi @SnorreDK
You can’t compare them because a “Market” order always gives a different result than a “Stop” order…
If A=2 then
IF LONGONMARKET AND Bear1 and Close > (PostionPrice * 1.01) THEN
SELL at (PositionPrice * 1.01) stop
EndIf
EndIf