instrument 0 is on 30minute timeframe
instrument 1 is on 1minute.
Orders will be triggered on barClosing every 30 minutes.
My IF condition compares intrument 0 with intrument 1,
IF Medians[0][0] -Medians[1][0] < -X
{
ifposition == long ->close position
ifposition ==flat --> sell short
}
IF Medians[0][0] -Medians[1][0] > X
{
ifposition == short->close position
ifposition ==flat --> go long
}
My problem is I am short and then on Bar close, position is closed and I go short again almost at miliseconds after.
My question is: how can I avoid double trade and stay short wirhout close my short position? (save commisions). This weird reaction could be due the contrary condition was reacted in the middle of 30 minutes bar?
Comment