- ago
HI, I am trying to understand what i am doing wrong with this strategy.
Using SPY 15-minute bars and just trying to enter at market at 3:30 and close at EOD.

Here is the strategy:


the trades at 3:30 look correct but why am i getting the other trades at market open?
0
143
Solved
2 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.07% )
- ago
#1
Keep in mind that a MarketClose order fills at the Close of the next [intraday] bar - it's really only the close of the session for Daily bars (or for intraday bars if the next bar happens to be the last one).

Consequently, with the 15 minute bars ending at 1530, the strategy triggers a Market order, which buys the at 15:30:00.01, the start of the 1545 bar. At 1545, the strategy triggers to sell the next bar at the Close, which fills at the market aution at or after 1600. However, the 1600 bar is after 1525, so it triggers to buy at market - so you open another trade at the open the next day, which is the 0945 bar.

You can fix that by adding another time constraint (< 1600) to the entry signal, or probably more easily by just adding the "One Entry Per Day" condition.
1
Best Answer
- ago
#2
Thank you! Now that I understand it should be easy to fix.
0

Reply

Bookmark

Sort