Hi,
I would appreciate some help in code creating with the purpose of closing an open position that is losing if the volume during a candle stick exceeds a certain limit. Is that possible?
As an example, I have an opened a buy order at 16.00. Timeframe is set to 15 minutes. If that position is generating a loss after 15 minutes, when the candlestick closes, I want the open position to be closed.
BR
Harry
…I want to close that position if it is generating a loss and the volume is above a certain limit… Sorry, I was not able to edit my message.
JSParticipant
Senior
Hi @123harry
You can try this…
If NOT OnMarket and OpenTime=160000 then
Buy at Market
EndIf
If OnMarket and PositionPerf<0 and Volume>10000 then
Sell at Market
EndIf