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 futtrader, 04-21-2024, 01:50 AM
          6 responses
          58 views
          0 likes
          Last Post futtrader  
          Started by sgordet, Today, 11:48 AM
          0 responses
          4 views
          0 likes
          Last Post sgordet
          by sgordet
           
          Started by Trader146, Today, 11:41 AM
          0 responses
          5 views
          0 likes
          Last Post Trader146  
          Started by jpapa, 04-23-2024, 07:22 AM
          2 responses
          19 views
          0 likes
          Last Post rene69851  
          Started by funk10101, Today, 11:35 AM
          0 responses
          3 views
          0 likes
          Last Post funk10101  
          Working...
          X