Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't make indicator "PriorDayOHLC" plot

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

    Can't make indicator "PriorDayOHLC" plot

    The description in builtin indicator PriorDayOHLC() is "Plots the open, high, low and close values from the session starting on the prior day", but I can’t make it plot on my Strategy Analyzer chart? I’ve tried various forms of “Add(PriorDayOHLC());” to no avail. Any help in resolving this will be appreciated. I am using Day bars.

    #2
    Hello joemiller,

    Thank you for your post.

    The PriorDayOHLC() works only on intra-day intervals (Minute and Tick based intervals). so it will not plot on Daily intervals.

    You can create your own plots for the previous days OHLC if you wish for the Daily intervals. For information on plotting form within a strategy please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=6651

    Please let me know if you have any questions.

    Comment


      #3
      StrategyPlot() will not work for charts in the Strategy Analyzer

      Thank you Patrick.

      Because StrategyPlot() will not work for charts in the Strategy Analyzer during backtesting, what do you suggest I do..... because I want to stick with the Analyzer for now.

      Comment


        #4
        Originally posted by joemiller View Post
        Thank you Patrick.

        Because StrategyPlot() will not work for charts in the Strategy Analyzer during backtesting, what do you suggest I do..... because I want to stick with the Analyzer for now.
        For a chart built from daily bars, you can simply replace the PriorDayOHLC with
        Open[1], High[1], Low[1] and Close[1].

        Comment


          #5
          My goal is to have an indicator line displayed on the chart [eg] the open every day. Can I do that with a simple expression like Open[1]?

          Comment


            #6
            Hello joemiller,

            Thank you for your response.

            You can used Open[1], High[1], Low[1], or Close[1] as the double y for a Horizontal Line.

            For information on DrawHorizontalLine() please visit the following link: http://www.ninjatrader.com/support/h...zontalline.htm

            Please let me know if I may be of further assistance.

            Comment


              #7
              I compiled the following statement into my strategy, but nothing new was displayed on my Analyzer chart? I also tried it with a double y constant value but with no success. Help will be appreciated.
              DrawHorizontalLine("myTag", Open[1], Color.Black);

              P.S. point of confusion: the Open plot will not be horizontal?

              Comment


                #8
                Hello joemiller,

                Thank you for your response.

                Can you provide the full code used in your strategy to plot or place drawing objects?

                I look forward to your response.

                Comment


                  #9
                  Thanks Patrick.
                  Strategy attached. Also indicator because the exporter insisted on it.
                  Attached Files

                  Comment


                    #10
                    Hello joemiller,

                    Thank you for your response.

                    I will review on my end and follow up with you.

                    Comment


                      #11
                      Hello joemiller,

                      Thank you for your patience.

                      The Strategy and Indicator will not run on my end, they crash NinjaTrader when I attempt to apply either one to my chart(s).

                      Do you have a trimmed down version that I can test on my end that only focuses on plotting?

                      I look forward to your response.

                      Comment


                        #12
                        Patrick,

                        I see that the attachment I sent to you is a Word document. I failed to make an NT backup when I sent the attachment to you.

                        I want to trim down exactly what I NT exported and sent to you. Please advise me what is the best, least hassle, way for me to get the strategy and indicator back into a form I can use. In the future I will merely do an NT backup before I do an export. Perhaps you can send me the files in NT backed up form so that I can do an NT restore?

                        Comment


                          #13
                          Hello joemiller,

                          Thank you for your response.

                          The files you uploaded are in .CS format in the .ZIP archive, this would be the correct format. Are these files no longer in your installation of NinjaTrader?

                          I would not be able to provide a backup of these files as they do not work on my end. You may wish to open these files in MS Notepad to edit them there or even in Visual Studio.

                          Comment


                            #14
                            OK, I imported from the exported file. Attached is an updated stripped down version. I removed all comments and Print statements from initialize and onbarupdate regions of the strategy and the indicator. Please let me know if more stripping is needed. The security is forex eurusd. The only chart I have ever worked with is an analyzer chart. I am not yet familiar with other charting features. It works for day bars but crashes the analyzer after about 5 minutes for hourly bars. All components of NT are not brought down… only the analyzer.
                            Attached Files

                            Comment


                              #15
                              Correction: All components of NT ARE brought down [ie] NT goes away and I have to restart it.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              607 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              353 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              560 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              561 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X