Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Tell indicators what type of bar, time frame, time to begin the calculations, and . .

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

    Tell indicators what type of bar, time frame, time to begin the calculations, and . .

    Hi:

    How can we tell each indicators to use:

    1. What time frame to calculated on (if different from the primary time frame)? So, if the primary is on 5 min, I may want the indicator to calculate on Daily, 60 min, or Weekly etc. instead.

    2. What bar type to use (if different from the primary bar type)? So, if the primary is candlesticks, I may want the indicator to calculate on Line Breaks, Renko, Range etc. instead.

    3. What day and time to actually begin the calculations from? So, if I want to begin the calculations from a specific time. For example, begin calculations from the default of today and at 9:30 am est (NY open) to present, or from 7:00 am today to present, or from 2:00 am est today to present etc. Once could also calculate from selecting a day in the past to present like calculate from Monday at 9:30 am to present as well.

    How can I do this?

    Where are indicators that inherently have these type of parameters already setup?

    What code can I add in the each indicator IF a indicator does not already have it for each of the 3 things above?


    #2
    Hello birdog,

    1. You may use the Add() method to define multiple time periods and then use the BarsArray object to reference these different time frames for indicator(s).

    You may see our Help Guide at the following link for an example of this.
    Add: http://www.ninjatrader.com/support/h....html?add3.htm
    BarsArray: http://www.ninjatrader.com/support/h...?barsarray.htm

    Our SampleMultiTeimFrame Strategy uses this as well that you may view under Tools -> Edit NinjaScript -> Strategy.

    2. Inside of the Add() method you may select a PeriodType.

    3. The Added series will start at the same time as your primary series does.

    Inside of your Indicator that you are calling all of these one from you may want to Add all of your different Time Frames and Bar Types so that once it has access to all of them you may use each series in any one of your Indicators.

    Using a Multi-series approach I would also recommend reading our Multi-Time Frame and Instruments section of our Help Guide as it will go over this indepth.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    4 responses
    542 views
    0 likes
    Last Post PaulMohn  
    Started by GLFX005, Today, 03:23 AM
    0 responses
    3 views
    0 likes
    Last Post GLFX005
    by GLFX005
     
    Started by XXtrader, Yesterday, 11:30 PM
    2 responses
    11 views
    0 likes
    Last Post XXtrader  
    Started by Waxavi, Today, 02:10 AM
    0 responses
    7 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    14 views
    0 likes
    Last Post TradeForge  
    Working...
    X