NinjaScript > Educational Resources > Reference Samples > Indicator > Getting indicator values from a specified time |
|
Sometimes, you may want to access a value from a historical point in time, but have not kept track of the value to make this readily available. With NinjaScript, it is possible to pick a bar based on time to access that value. GetBar() returns the number of bars ago that holds the same timestamp of the time you request. This sample demonstrates how to get an indicator value from 9:30AM of the previous trading day.
Key concepts in this example
Important related documentation
Import instructions
|