Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Double Variable or Data Series Perhaps?

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

    Double Variable or Data Series Perhaps?

    Why would the following code return "0":


    Print(pivotPoint);


    when

    double pivotPoint = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];

    both are placed on an on tick bar update, so every tick should print the pivot point for the given day.

    I am sure I am just missing something dumb, but thank you for any help...

    Andrew

    #2
    Hello Andrew,
    To assist you further may I know are you getting the 0 (zero) values on the historical bars on in the realtime bars.

    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Joydeep View Post
      Hello Andrew,
      To assist you further may I know are you getting the 0 (zero) values on the historical bars on in the realtime bars.

      I look forward to assisting you further.

      real time bars on every tick update. Thanks in advance.

      Comment


        #4
        any word on what the difference between the two might imply?

        Comment


          #5
          Am really struggling here, i see that joydeep is offline, perhaps someone could chime in briefly?

          Any help appreciated.

          Andrew

          Comment


            #6
            Hello Andrew,
            Please refer to our help guide to know more about Historical.


            If you use the below code then are you getting the right values.

            Code:
            if (Historical) return;
            double pivotPoint = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
            Print(pivotPoint);

            Please note doing so means you are only calculating the values in realtime.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              joydeep:

              I am ONLY using realtime. Not historical.

              Still, the pivot point should be a given value all day long and i am getting a return value of "zero".

              It is very strange, please advise.

              Comment


                #8
                Hello Andrew,
                I am able to get the correct values at my end.

                If you calculate the Pivot from intraday data then can you get the correct values. Please use the below code and see if you can work it correctly.

                Code:
                double pivotPoint = Pivots(PivotRange.Daily, [B]HLCCalculationMode.CalcFromIntradayData[/B], 0, 0, 0, 20).PP[0];
                Also please let me know who your connectivity provider is.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  My provider is kinetick(real time, not free), but i have already discarded the intraday calc in favor of the day bar calc.

                  I am becoming confused again as to why this isn't working.

                  Comment


                    #10
                    Hello Andrew,
                    To assist you further I need to replicate the scenario at my end.

                    Can you please send a toy code depicting the scenario to support[AT]ninjatrader[DOT]com

                    Also please do let me know the step by step reproducible scenario (including chart settings on which you have applied the code etc).

                    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

                    I look forward to assisting you further.
                    JoydeepNinjaTrader Customer Service

                    Comment


                      #11
                      is it mandatory to have the strategy code charted? i am using it mostly on a numerical basis.

                      Comment


                        #12
                        Hello Andrew,
                        Except for rare case you do not need to chart the strategy code.

                        To make sure the values are correct you can use the Print function to print out the values in the Output window (Tools>Output Window).
                        JoydeepNinjaTrader Customer Service

                        Comment


                          #13
                          yes this is what i do.

                          Comment


                            #14
                            toy code sample has been sent

                            Comment


                              #15
                              Originally posted by alabell View Post
                              Am really struggling here, i see that joydeep is offline, perhaps someone could chime in briefly?

                              Any help appreciated.

                              Andrew
                              What is the error, if any, recorded in the log.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by sjsj2732, Yesterday, 04:31 AM
                              0 responses
                              33 views
                              0 likes
                              Last Post sjsj2732  
                              Started by NullPointStrategies, 03-13-2026, 05:17 AM
                              0 responses
                              286 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              285 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              133 views
                              1 like
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              91 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Working...
                              X