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

Multitime frame indicator

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

    Multitime frame indicator

    Hello

    I am developing indicator that uses more than one time frame, let' s say that my main time frame is 5 minutes, and I added second time frame 60 minutes.

    Let's say that current time is 141000, if I want to access HLC for the second time frame I would use Highs[1][0] etc. However, this value will correspond to high value achieved between 130000 and 135900.

    My question is how I can access current HLC for 60 minute bar from 140000 until 141000 (current time), is there a way to use Highs[1][-1]?

    Thank you
    Sergey.

    #2
    Hello Sergey,

    Unfortunately there's no way to access the future value of a secondary series in historical data.

    Use the following Print() statement to get a feel for what is available.

    Print("BIP: " + BarsInProgress + " PrimarySeries: " + Time[0] +" Secondary Series: " + Times[1][0]);
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by trilliantrader, Today, 03:01 PM
    0 responses
    2 views
    0 likes
    Last Post trilliantrader  
    Started by pechtri, 06-22-2023, 02:31 AM
    9 responses
    122 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by frankthearm, 04-18-2024, 09:08 AM
    16 responses
    67 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by habeebft, Today, 01:18 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by benmarkal, Today, 12:52 PM
    2 responses
    19 views
    0 likes
    Last Post benmarkal  
    Working...
    X