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