NinjaScript > Educational Resources > Reference Samples > Strategy >

Using a time filter to limit trading hours

Print this Topic Previous pageReturn to chapter overviewNext page

A common observation many traders have made is that certain hours of the day are more volatile than others.

Depending on the trader’s style they may want to trade only during the volatile hours of the day or the less volatile days of the week.

 

Key concepts in this example

Comparing days of the week
Comparing the time of day

 

Important related documentation

DayOfWeek
Time
ToTime()
ToDay()

 

Import instructions

1.Download the file contained in this Help Guide topic to your PC desktop
2.From the Control Center window, select the menu File > Utilities > Import NinjaScript
3.Select the downloaded file and click Import.

 

SampleTimeFilter_NT7.zip