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

Secondary Series More Data

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

    Secondary Series More Data

    Is it possible to, for example, draw a line from a daily bar 100 days ago onto a current 5 min chart that's only showing 5 days? Seems like the draw objects will only show up if I have 100 days also loaded on the 5 min.

    Currently have this in State.Configure
    AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Day, Value = 1 }, 365, "CME US Index Futures ETH",false);
    Last edited by shildebrand324; 12-08-2022, 05:34 PM.

    #2
    Hello shildebrand324,

    You would need at least that amount of days on the primary series to be able to draw something that far back. The drawing objects use anchors which target specific bars ago or times and if that bars ago or time is not on the chart it won't be able to draw.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Okay, and if I want to make those rectangles extend 365 days into future? I've tried -365, but it doesn't seem to extend that far.

      Draw.Rectangle(this, CurrentBars[1].ToString() + "VOL",false,1,Closes[1][1],-365,Opens[1][0],BoxOutlineColorShort,BoxFillColorShort,BoxColorOp acity,true);

      Comment


        #4
        Hello shildebrand324,

        There wouldn't be a way to project that far into the future, you can technically use negative BarsAgo to project a short time in the future for the small amount of empty slots that are already on the chart. The small amount of empty slots allow the chart bars to be dragged to the left of the chart. Anything beyond that would not be able to be used. If you want to project something to the edge of the chart you can use a Ray drawing object.

        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Kaledus, Today, 01:29 PM
        5 responses
        12 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Waxavi, Today, 02:00 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        5 responses
        23 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by PhillT, Today, 02:16 PM
        2 responses
        7 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X