I'm backtesting a strategy where multiple orders can be triggered and opened in the same direction and in the opposite direction at the same time. I'm having dramas, and just discovered because positions are not being opened in the opposite direction if I have one or more positions open in one direction.
For example if I have 2 separate Long positions open and a short is triggered, this position isn't taken /shown on the backtest chart or trade results.
If I have a short (or more than one) open. no longs are taken.
I have these parameters set in the init function:
EntriesPerDirection = 10;
EntryHandling = EntryHandling.AllEntries; // total of # (EntriesPerDirection) trades open at once
Also I am naming every position I open with a unique signal name for setting the profit target and stops for each which is working fine.
I am using the functions EnterLongLimit and EnterShortLimit to take the trades.
Can you please advise what is happening in the background here to prevent the trades executing. Is there a parameter that needs to be set to allow this.
thanks

Comment