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.
    Josh P.NinjaTrader Customer Service

Latest Posts

Collapse

Topics Statistics Last Post
Started by thanajo, 05-04-2021, 02:11 AM
3 responses
469 views
0 likes
Last Post tradingnasdaqprueba  
Started by Christopher_R, Today, 12:29 AM
0 responses
10 views
0 likes
Last Post Christopher_R  
Started by sidlercom80, 10-28-2023, 08:49 AM
166 responses
2,237 views
0 likes
Last Post sidlercom80  
Started by thread, Yesterday, 11:58 PM
0 responses
4 views
0 likes
Last Post thread
by thread
 
Started by jclose, Yesterday, 09:37 PM
0 responses
9 views
0 likes
Last Post jclose
by jclose
 
Working...
X