Hello, differentiated closing is possible for Long and Short operations.
If possible, I would like to close the open transaction by the end of the day.
If it’s Long At 20.30
If it’s Short at 21.30
Using ( DEFPARAM FlatAfter ) you can only close at one time.
Thank you
Use
IF LongOnMarket AND Time = 203000 THEN
SELL AT MARKET
ELSIF ShortOnMarket AND Time = 213000 THEN
EXITSHORT AT MARKET
ENDIF
of course you must use a TF whose candle closes at the said times.
Thanks, it works perfectly