1. Previous Candle Bullish: The main instrument go LONG and the secondary instrument go SHORT at the start of the candle 3:30 PM
2. Both positions exit at the start of the next candle. 4:00 PM
3. Previous Candle Bearish: The main instrument go SHORT and the secondary instrument go LONG at the start of the candle 4:30 PM
4. Both positions exit at the start of the next candle. 5:00 PM
5. Previous Candle Bearish: The main instrument go SHORT and the secondary instrument go LONG at the start of the candle 5:30 PM
6. Both positions exit at the start of the next candle. 6:00 PM
So this is what it is doing: Enter trade at 3:30, exit positions at 4:00, Enter trade at 4:30, exit positions at 5:00, Enter trade at 5:30, exit positions at 6:00
WHAT I WANT IS:
I want the system to take another trade based on the logic when both positions exit at the start of the candle. Here is what I want it to look:
1. Previous Candle Bullish: The main instrument go LONG and the secondary instrument go SHORT at the start of the candle 3:30 PM
2. Both positions exit at the start of the next candle. 4:00 PM, THEN the system checks the previous bar again and takes the trade at 4:00 PM on both instruments on the same candle.
3. Both Positions exit at 4:30. After this the system again checks thecandle, and The main instrument go SHORT and the secondary instrument go LONG at the start of the candle 4:30 PM (after reviwing the last candle)
4. Both positions exit at the start of the next candle. 5:00 PM THEN the system checks the previous bar again and takes the trade at 5:00 PM on both instruments on the same candle
AND SO ON ...
However, I can't open a trade on the same candle. (Cant make the system to trade again after the exit of the previous position at the start of the candle.)
Attached are the code and the chart that I am working on
NEED HELP!

Comment