at the moment I am testing strategies for certain stock universes such as the SP500.
I use daily bars, signals occur at the close and I want to open the trade at the next bar's open. I am able to this by setting Fill=3.
However, this has unintended consequences. I've restricted NumOpenTotal < 5; This works when Fill is set to its default value but when I set Fill to DELAYED (in order to enter at the open) the more than 5 trades are opened.
Has anyone an idea what the reason for this is?
Re: Issue with Fill and restricting trade numbers
[Re: Ger1]
#471759 03/19/1811:0003/19/1811:00
If I write the code as above a trade in NAS100 will never be entered as at least 2 pending trades were already entered for SPX500 and US30 (regardless of whether SPX500 and US30 fulfill their entry condition the following bar).
However, that's not what I want. I want to enter 3 pending order but only open maximum 2 trades.
How can that be achieved? I could not find a way with Fill=3.
Thank you.
Re: Issue with Fill and restricting trade numbers
[Re: Ger1]
#471825 03/21/1812:4703/21/1812:47
As in the example above, my intention is following:
1) enterLong at the next day's bar but only if the price is 0.8% lower than today's close
2) do not open more than 2 trades
How can this be achieved. If I use ...Long and ...Short instead of ...Total 2 trades per asset would be opened which ads up to 6 in total.
A specific example, what if only "US30" and "NAS100" fall another 0.8% at the next bar. I only want those 2 to be entered.
What if all 3 fall 0.8% at the next bar. In this case I'd only like to enter "SPX500" and "US30" as I do not want to open more than 2 trades and those 2 assets are the first in the loop.
Thanks a lot!
Re: Issue with Fill and restricting trade numbers
[Re: Ger1]
#471859 03/21/1821:4903/21/1821:49