Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

priordayOHLC

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

    priordayOHLC

    Hello,

    I´m discussing right now in one of the traderooms I´m in that its possible in NinjaTrader to plot OHLC not only from prior day but also from the day before yesterday (as this is needed in this room and drawn there manually always). But now I dont know how I could change the priordayOHLC to have OHLC from the day before (to be accurate to have today Friday the OHLC from Wednesday). Can someone help me out please?

    Thank you!
    Tony
    Last edited by tonynt; 11-20-2020, 02:22 PM. Reason: typo

    #2
    Hello tonynt, thanks for writing in.

    The PriorDayOHLC indicator updates it's plot values at the beginning of each session of the intraday chart. So you would need to save the current values every other time the current prices are updated to save the daily values two days ago. Another way of doing this would be to add a daily bar series to a new indicator with AddDataSeries and wait for CurrentBars[1] to be greater than two. From there, you can reference Closes[1][2], Opens[1][2], etc.

    Please let me know if I can assist any further.

    Comment


      #3
      Hello,

      thank you for your reply. This works OK with "Use Instrument Settings" but when I change to "CME US Index Futures RTH" the lines are not plotting. I tested and tried but I have no idea why. To avoid blowing up the chat I attach a very reduced code to show. This plots in the 30 min chart where I need it with "Instruments Settings" but not with "RTH" we need to plot High, Low and Close of RTH.

      What might be the reason please?

      Thank you!
      Tony
      Attached Files

      Comment


        #4
        Hello tonynt, thanks for your reply.

        I am able to get this to work if I add more days. I tested on a 10 minute MSFT chart with 10 days added and the drawing lines are showing up on my end.

        Please let me know if I can assist any further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X