Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots

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

    Pivots

    Script runs fine except when any reference to Pivots is give:

    example code:
    && Close[0] > Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).S1[0]

    #2
    Hello NFT-Trader,

    Thank you for your inquiry.

    Can you please clarify if you are receiving any errors when trying to reference the Pivots? If you are receiving an error, please provide the error text in full so I may investigate further.

    If you are not receiving any errors, can you please explain the unusual behavior that you are getting with your script?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response.

      Upon compiling there is no error or warnings - the script will not trade any instrument with this line (or similar call to Pivots). Once removed trades are executed.

      Some more info: The script was recently migrated from NT7 and runs as expected (except for the inability to process this line).

      I have tried changing the width to above and below the # of bars required but without any effect.
      I have tried both DailyBars and IntradDay without any effect.
      It does not matter whether it is Monthly, Weekly, or Daily - it will just not work.
      The Pivot indicator works as expected on my NT8 Charts

      Comment


        #4
        Hello NFT-Trader,

        Are there any messages that appear in the Log tab of the Control Center or the Output Window when attempting to enable the strategy?
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Here is the Log, which has the error.

          " A hosted indicator tried to load additional data. All data must first loaded by the hosting NinjaScript in its configure state"

          Comment


            #6
            Hello NFT-Trader,

            This error occurs because you haven't added an additional data series to your strategy to account for the Pivot indicator's daily data series.

            Upon adding the below in else if (State == State.Configure), the error should not longer occur:
            Code:
            else if (State == State.Configure)
            {
                 AddDataSeries(BarsPeriodType.Day, 1);
            }
            Please, let us know if this does not resolve your issue.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              Thanks that did the trick.

              If the script contains Weekly and Monthly Pivots as well do I need to add those? At first try it does not appear that I do.

              Thanks

              Comment


                #8
                Hello NFT-Trader,

                You will only need the 1 day DataSeries.

                Please, let us know if we may be of further assistance.
                Zachary G.NinjaTrader Customer Service

                Comment


                  #9
                  Is that a new requirement in NT8? Because I know for a fact it's not necessary in NT7.

                  Comment


                    #10
                    Hello strategesis,

                    Thank you for your inquiry.

                    Yes, this is a change in NinjaTrader 8.

                    Documentation is pending to reflect this requirement.
                    Zachary G.NinjaTrader Customer Service

                    Comment


                      #11
                      This is a huge problem for me: I have a general purpose strategy which is designed to dynamically use a user-selected "MarketAnalyst" indicator which is responsible for generating the entry (and possibly the exit) signals (there can be any number of them to choose from; the user selects the one he wishes by naming it in the Strategy dialog.) By architectural design and intent, the strategy has no way to know what input data series the selected Market Analyst will use -- nor should it. Additionally, the exit rules are also selected by the user using the strategy dialog. He/she would do that by naming an exit rule script written in a DSL (domain specific language) I created for that purpose.

                      I strongly recommend you reevaluate this architectural decision, since it effectively makes my strategy architecture -- which I've spent years designing for NT7 -- unusable. I would have no choice except to create my own platform if this is not fixed.

                      Comment


                        #12
                        Originally posted by strategesis View Post

                        I strongly recommend you reevaluate this architectural decision, since it effectively makes my strategy architecture -- which I've spent years designing for NT7 -- unusable. I would have no choice except to create my own platform if this is not fixed.
                        Reversing this decision would lead to missing ticks and synchronization issues which would occur unbeknownst to users/3rd party developers in NinjaTrader 7.

                        Furthermore, due to the new multithreaded UI of NinjaTrader 8, there is an implication that the hosted indicator data run in the same data thread as the hosting indicator. The only way to ensure this occurs without running into potential dead locks is to ensure both NinjaScript objects are using the same data stream as the hosting indicators chart.

                        Lastly, there was a design decision to ensure that OnBarUpdate is not ran in an object until all required bars are loaded, to prevent further issues with objects becoming out of sync which would happen in early versions as well. In order to do this, the hosting script must be aware of what the hosted indicator is trying to load.

                        We realize this creates a new challenge in NT8 on the architectural design of an NT8 indicator/strategy, but it was a design decision which corrects problems which wasted hours of debugging time for developers in earlier versions of NinjaTrader.
                        MatthewNinjaTrader Product Management

                        Comment


                          #13
                          Question: When is the last lifecycle state (e.g., State.Configure, State.Historical, etc) during which an input data series may be added? And what's the latest lifecycle state that an input data series must be added by a strategy in order for nested indicators that need to use multiple input data series to work correctly?

                          Comment


                            #14
                            A hosted indicator tried to load additional data. All data must first loaded by the h

                            'morning
                            same thing here:
                            A hosted indicator tried to load additional data. All data must first loaded by the hosting NinjaScript in its configure state.

                            Can you please explain how to deal with this? I had no programming error. I am using native SMA and the code is a super easy SMA cross over EOD (Daily) data.
                            Thanks
                            MB

                            Comment


                              #15
                              Also, same strategy, If running from a chart I get the hosted indicator error, if running from the control center (same instrument, same settings, same strategy) I have no problem.

                              MB

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by jhjhawkins, Today, 12:25 PM
                              1 response
                              5 views
                              0 likes
                              Last Post NinjaTrader_Kate  
                              Started by rexsole, Today, 11:48 AM
                              1 response
                              14 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by jeronymite, Yesterday, 05:05 PM
                              3 responses
                              54 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Started by Don22Trader1, Yesterday, 05:54 PM
                              3 responses
                              49 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by Jebulay, Today, 08:36 AM
                              1 response
                              43 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Working...
                              X