• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator: Exposing indicator values that are not plots

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Indicator: Exposing indicator values that are not plots

    There may be cases where you want to have your indicator calculate non-plotted values that you will want to access when using this indicator inside of another indicator or strategy.

    Key concepts in this example:
    • Creating exposed BoolSeries objects
    • Storing and retrieving values from BoolSeries objects


    Important related documentation:

    NinjaTrader 8
    For NT8 We suggest using and avaliable class that implements the Series interface.

    NinjaTrader 7

    For NT7 We suggest using any available class that implements the IDataSeries interface. These include the following:

    NT7 Notes:
    There is an indicator and a strategy in the attached file used to demonstrate this concept. Please be sure to review both files.

    Using these classes will provide you with a way to store calculated values associated to each bar in a chart. This will allow any referencing objects to access the historical calculated values. These classes hold internal logic that ensure that the OnBarUpdate() method of the indicator is processed prior to accessing the current bar’s value. This guarantees you will receive up-to-date values when retrieving the calculations.

    In the event that an IDataSeries type class does not exist for the object type you wish to expose, you will need to use the Update() method within the property “getter” to ensure that OnBarUpdate() is processed and your calculated value is up-to-date.


    Import instructions:

    NinjaTrader 8
    1. Download the file contained in this thread to your PC desktop
    2. From the Control Center window, select the menu Tools > Import > NinjaScript
    3. Select the downloaded file


    NinjaTrader 7
    1. Download the file contained in this thread 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.
    Attached Files
    Last edited by NinjaTrader_Jesse; 06-06-2016, 03:07 PM.
    JoshNinjaTrader Customer Service

Latest Posts

Collapse

Topics Statistics Last Post
Started by Leope, Today, 05:39 AM
0 responses
1 view
0 likes
Last Post Leope
by Leope
 
Started by memonic, Today, 05:14 AM
0 responses
1 view
0 likes
Last Post memonic
by memonic
 
Started by svadukia, Today, 04:38 AM
0 responses
1 view
0 likes
Last Post svadukia  
Started by dadarara, Today, 04:19 AM
0 responses
2 views
0 likes
Last Post dadarara  
Started by Shansen, Today, 04:13 AM
0 responses
2 views
0 likes
Last Post Shansen
by Shansen
 
Working...
X