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?
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?
Rename
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.
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.
Thank you! Now that I understand it should be easy to fix.
Your Response
Post
Edit Post
Login is required