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

Current day OHL

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

    Current day OHL

    ||| SORRY FOR DOUBLE POST |||
    Greetings,

    I am using a hidden 24x5 data series to show the midnight open of NQ (neither here, nor there).

    Just wondered if there is a way to modify the default NT8 indicator to only show the current day, not show every day prior as well?

    Click image for larger version  Name:	CdOHL.png Views:	0 Size:	153.0 KB ID:	1288400
    Last edited by dwbstreet; 01-27-2024, 05:57 PM.

    #2
    Just to clarify, I am aware that I can add an additional hidden data series with a "Days to Load" of 1 to accomplish this (link the indicator to this data series)... but this seems like an unnecessary use of cpu resources. Thanks in advance if anyone can assist.

    Comment


      #3
      Hello dwbstreet,

      Thanks for your notes.

      To clarify, are you wanting to program your own custom indicator or are you looking for an existing solution using the NinjaTrader Current Day OHL indicator?

      The Current Day OHL indicator that comes with NinjaTrader would plot the current day OHL values on the chart for each day, not only for the current day.

      The solution you provided would be the correct workaround for accomplishing this with the Current Day OHL indicator that comes with NinjaTrader.
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Thanks so much for your response Brandon.

        Was wanting to program my own custom indicator that referenced midnight EST and only plotted 1 "Days to Load," so I do not have to have any additional data series.

        Comment


          #5
          Hello dwbstreet,

          Thanks for your notes.

          You would need to add some filtering logic to prevent a value for an indicator's dataseries to be set. Since NT sessions can only be defined within a calendar day, you could try doing something like:

          if (Time[0].Date == DateTime.Now.Date)
          Values[0][0] = CurrentDayOHL().CurrentOpen[0];

          Where Values[0][0] is the first plot added to the script and CurrentDayOHL().CurrentOpen[0] is the CurrentDayOHL CurrentOpen plot value being assigned to the plot.

          The above code would only assign a value to the plot from midnight to the current bar on the current session so the plot would only appear on the current day.​
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rhyminkevin, Today, 04:58 PM
          4 responses
          52 views
          0 likes
          Last Post dp8282
          by dp8282
           
          Started by iceman2018, Today, 05:07 PM
          0 responses
          5 views
          0 likes
          Last Post iceman2018  
          Started by lightsun47, Today, 03:51 PM
          0 responses
          7 views
          0 likes
          Last Post lightsun47  
          Started by 00nevest, Today, 02:27 PM
          1 response
          14 views
          0 likes
          Last Post 00nevest  
          Started by futtrader, 04-21-2024, 01:50 AM
          4 responses
          50 views
          0 likes
          Last Post futtrader  
          Working...
          X