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

Combining Indicators on different Time frames

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

    Combining Indicators on different Time frames

    Good day to everybody,

    I have a question related to the multi time frame setup.
    Let's assume I have an indicator which uses daily bars only and I like to use this in an other indicator that will work with 15min series.

    How does the OnBarUpdate work within the 15min indicator? Should I use Closes[0][0] to access the latest close of the 15Min series or can I use Close[0] to get the correct close value?

    thx for any helpful answer.
    Cheers
    Markus

    #2
    Hello Markus,

    Thanks for your post.

    Just to keep things clear, Indicator1 = daily bar indicator, Indicator 2 = 15 m bar indicator.

    If you modify Indicator 2 by calling Indicator 1, you would have to add a daily bar series to indicator 2 as otherwise you would get an error concerning "A hosted indicator tried to load additional data....".

    In indicator 2 then you can either uses Closes[0][0] to access the 15 minute bar close or isoloate by BarsInProgress, for example

    if (BarsInProgress == 0)
    {
    Close[0] // would point to the 15 minute data series, assuming this is a 15 minute chart
    }
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X