Would love some insight into running multiple strategies simultaneously. I have a single strategy that I’m trying to run using different parameters and data series timeframe for each part of the trading day. I have 7 “trading windows” during the day, each of which requires a different set of parameters and data series timeframe, but using the same strategy. The most optimal way I could think of was to add a trading window parameter to the strategy and then run 7 instances of the same strategy, each with its unique parameters, and mutually exclusive trading window. i.e. each strategy can only ENTER a position if it’s within its own unique trading window. All entries are accompanied by a target and trailing stop, however, when one strategy gets into its trading window there’s usually an open position from the previous strategy instance. Despite checking for status of ‘position.MarketPosition’ before any conditions, I was still getting multiple positions opened in the same direction, even when ‘EntriesPerDirection’ is set to 1 and ‘EntryHandling’ is set to ‘EntryHandling.UniqueEntries’. I then revised the script to check open positions using the ‘Account.Positions’ property instead. This got rid of the multiple positions being opened, however, targets and stop-losses look like they’re being carried over resulting in a single position being opened while multiple targets and stop-losses are still there. This resulted in the strategy sometimes thinking there are multiple positions open when in fact there’s only 1 or none.
My objective is to have a trading system running 24/7 with the same strategy but using different parameters during each trading window. Doing this with one single script doesn’t seem possible since the parameters are set in the ‘State == State.SetDefaults’ section of the script. Or is it?
Would appreciate any input on how to best deal with this.

Comment