From eebeb200604eefe9c7ec71f531962bfa64bbc380 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Tue, 3 Sep 2024 06:27:31 -0700 Subject: [PATCH] Add note to documentation mentioning the use of 1-minute bars to work around issue of not being able to enter positions on the close of daily bars --- strategies/overnight/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/strategies/overnight/README.md b/strategies/overnight/README.md index 82d0dc0..ace0f4c 100644 --- a/strategies/overnight/README.md +++ b/strategies/overnight/README.md @@ -7,6 +7,10 @@ This strategy was taken from chapter 7 of [Short Term Trading Strategies That Wo 1. Go long SPY on the close. 2. Sell on the following open. +It is not possible to enter positions on the close of a bar in NinjaScript, so I have worked around this by incorporating a 1-minute data series into the strategy and entering on the open of the last bar of the day. + +The position is exited on the open of the following day as expected. + ## Parameters **Use Trend Filter**: Whether to use a trend filter to decide when to enter long positions. (Default: false)