Kindly I need some help.
I would like to prevent a position from closing at certain times.
For example do not close a position from 01 to 06 in the morning.
Thank you
Well… if you have set some TP, the trade will be closed when it’s hit and you can’t help it.
If you have conditions to exit a trade, then you can prevent it from being closed:
// LONG entry
If close crosses over average[20] and not OnMarket then
Buy at market
Endif
// LONG exit
If close crosses under average[20] and LongOnMarket and time >= 070000 and time < 220000 then
Sell at market
Endif
So you can’t use TP conditions as below Roberto?
If Time > 070000 and Time < 210000 Then
Set target %profit 1
Endif
Yes, indeed it’s possible, 0 should disable it.
Thanks, it works well unfortunately the performance deteriorates.