Using a time filter to limit trading hours

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Educational Resources > Reference Samples > Strategy >

Using a time filter to limit trading hours

Previous page Return to chapter overview Next 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 Tools > Import > NinjaScript
3.Select the downloaded file

 

SampleTimeFilter_NT8.zip