top of page
Capstone Trading

Don’t Trade On Holidays NinjaTrader function

We are adding the Dont Trade On Holidays function to our NinjaTrader strategies. We have already done this for Tradestation and MultiCharts and you can read about it here.

The latest DontTradeOnHolidays file has been updated for the current holiday through January 2, 2021.

You can download the Example NinjaScript here and the Holidays.txt file here.

This Example NinjaScript shows you how to add this Holiday function class to your files.

You will need to put the Holidays.txt file in the C:UsersYourNameDocuments or in general your Documents folder (since some use different drives or formats).

You will need to update the Holidays.txt file and add dates going forward. It is updated through January 2, 2021 for the upcoming holiday weekends in 2020 including New Years 2021. We do not trade the portfolios when the stock market is closed or closes early (on day trade strategies but keep swing positions open). The futures can still trade on stock market holidays for a brief session. It is difficult to manage systems around different early closes, so we backtest without these days and do not trade them going forward.

Additional open code examples to set this up in NinjaTrader can be found in our Crude Oil After Hours and Crude Oil Weekly Inventories trading system from our membership site at https://algorithmictradingsystems.com

4 views0 comments

Opmerkingen


bottom of page