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 alifarahani, Today, 09:40 AM
    6 responses
    30 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X