This article explains how trading hours work in Riskanto, FlowBots' risk-management add-on for NinjaTrader 8: choosing an account's trading days and time windows (for example, to only trade the New York session), a scheduled close that flattens the account at a set time (end-of-day flatten), the time zone, and what you see outside the hours.
Short answer
In the Hours tab of an account's rules you choose the Days it may trade, up to 5 time Windows, what happens At the end of a window, and an optional Close everything at time. Times are the exchange's, not your PC's. Outside its hours the account refuses new entries; open positions are kept unless you chose to close them, and closing orders still work. The hours apply only while the account is On.
How to set the trading hours
- Make sure the account is Off. Its rules cannot be changed while it is On (monitored) or locked.
- In the Riskanto window, right-click the account and choose Rules for <account>..., then open the Hours tab. The card is called Trading hours; its top right shows the time zone, for example Exchange time (Central Time, now 09:42).
- Days: tick the days the account may trade, Monday to Sunday. These are trading days: Sunday evening is Monday. On a day not ticked, new entries are refused all day; positions are not closed. At least one day must be ticked.
-
Windows: click + Add window and type a start and an end as
HH:mm, for example08:30to11:00. Up to 5 windows; none means open all day. The end minute itself is outside the window. An end before the start runs past midnight, so22:00to02:00is one window. - At the end of a window: choose Keep positions, refuse new entries (the default) or Close positions.
-
Close everything at: type a time such as
15:55or15:55:30, or leave it empty for no scheduled close. - The Today track draws the day's windows and close. Click Save and switch the account On.
Which time zone the times are in
Every time you type is exchange time: the time zone of the Trading Hours template chosen in Riskanto's Settings, under Trading day. It is not your PC's clock, and it is the same for every account. With NinjaTrader's default CME template the exchange time is US Central Time (CT); the trading day opens at 17:00 and the market closes at 16:00. Messages that say until ... or opens ... show your PC's local time.
What happens outside the hours
- New entries are refused inside NinjaTrader. Positions can always be reduced or closed.
- Working orders that would open or add to a position are cancelled. Open positions are kept, unless the window end or the scheduled close is set to close them.
- The account opens again at the next window's start or the next trading day's open.
At the end of a window, and Close everything at
- Keep positions, refuse new entries: New entries are refused until the next window opens; open positions are kept.
- Close positions: At each window's end the positions are closed and the working orders cancelled; new entries are refused until the next window opens.
-
Close everything at: at that time Riskanto cancels the working orders and closes the positions, then refuses new entries until the next trading day opens. A message titled <account>: scheduled close says Scheduled close at 15:55 (exchange time).
With NinjaTrader's default CME template (times in CT):
- A close typed from 16:00 up to the 17:00 open, such as
16:30, runs 2 minutes before the market's close, at 15:58. - The close runs the first time that clock time comes after the trading day opens at 17:00.
18:00means that same evening, one hour after the open, not the next afternoon. For an afternoon close, type a time before 16:00, such as15:55.
What you see on screen
- The account's Status shows Closed until .... Its tooltip says why, for example Outside its trading windows (exchange time); it opens ..., Not one of its trading days; it opens ... or Its scheduled close at 15:55 (exchange time) holds it closed; it opens ...
- A new entry is refused with Riskanto: order refused, the account is outside its trading hours. Closing orders still work.
Example
With NinjaTrader's default CME template (times in CT): Days Monday to Friday, one window 08:30 to 11:00, Keep positions, refuse new entries, no scheduled close.
- Tuesday 07:00: Status Closed until ..., outside its trading windows; new entries are refused.
- 08:30:00 to 10:59:59: the account trades normally.
- 11:00: closed again. An open position is kept and can still be closed; new entries are refused until Wednesday 08:30.
If a scheduled close was missed
A close only runs while NinjaTrader is running and the account is connected. If they were not ready at the time, Riskanto still runs the close within the Scheduled close window (minutes) in Settings > Rules (1 to 60, 5 by default). Past it, the close is missed and never run late: the positions are kept and new entries stay refused. If positions are open, a message titled <account>: scheduled close missed tells you why (for example, Riskanto was not running or the account was not connected) and asks you to close them by hand if needed. The same applies to a window end set to Close positions.
Example, with NinjaTrader's default CME template, the default of 5 minutes and a close at 15:55 CT: if the connection comes back at 15:58, the close runs; if it comes back at 16:01, it is missed. If you switch the account On after the close time, that day's close is skipped, nothing is closed, and new entries are refused.
Not the same as the Trading Hours template
The account's hours decide when this account may open new trades. The Trading Hours template in Settings > Trading day defines the trading day for all accounts: its time zone, when it opens and closes, and when the daily PnL resets and daily locks end. See When a Riskanto daily lock ends and how to unlock.
When you can change the hours
- Normally only while the account is Off and not locked. On an On account the editor says The account is monitored: its rules cannot be changed while it is On. Switch it off (On > Off), change them, and switch it on again.
- On a Committed account, today's hours stay as they are: What you save here applies from the next trading day (...). See How to commit to your daily loss limit in Riskanto.
Comments
0 comments
Article is closed for comments.