Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivot indicator, historical data no data

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

    Pivot indicator, historical data no data

    When connected the Pivot indicator has no values on historical bars. Also
    something like
    if (Historical)
    {
    Print(Time[0] + ":"+Pivots(PivotRange.Daily,HLCCalculationMode.Dai lyBars,0,0,0,20).PP[0]);
    }
    shows 0 for the PP[0]
    Am I missing something, this is not so in NT 6.5
    Working with Beta 22

    By the way: SMA(15) does return values in Historical bars

    Another question is Historical General over all Timeframes in the strategy. Like when you add the daily bars then all 3 minute bars of today are not historical since the daily bar of today is not historical? That is what it seems like. Because I add daily bars and if (Historical) return; doesn't return but stays processing.
    Last edited by clint2008; 10-21-2010, 07:03 AM.

    #2
    Hello,

    Thank you for your note.

    You are calculating on HLCCalculationMode.Dai lyBars. Do you have daily data for this instrument can you bring up a daily chart of this instrument?

    What data feed provider are you connected too?

    Also when you Print() you must use .toString().

    Like the below example:
    // Prints the current pivot point value
    double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
    Print("The current Pivots pivot value is " + value.ToString());

    Comment


      #3
      Brett,

      Do you really know or are you guessing. If SMA(15)[0] without .ToString does something then PP[0] should do something also. And the Pivot indicator itself will load Daily Bars. But yes they are added to the strategy.

      Comment


        #4
        Hello,

        I was referencing from here:



        This will only work on a Daily data series. For this to work in a intraday time frame you need to use a different calculation mode as the hosted indicator does not have access to the daily data series since its a hosted indicator.

        To do this use in a intraday data series:

        double value = Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).PP[0];
        Print(
        "The current Pivots pivot value is " + value.ToString());

        Let me know if I can be of further assistance.

        Comment


          #5
          Brett,

          About hosted indicators and the reference link you posted (to the complete helpguide). The term hosted indicator is mentioned only 1 time (
          Fixed
          4097
          NinjaScript indicators
          Calling DrawTextFixed from a hosted indicator could yield exception when saving workspace containing chart with hosting indicator on
          )
          So if you would like to explain this.

          I can see what you say about intraday calculation, I changed it. All historical bars have now: Todays pivot point values. That to me is just as bad or even worse as a value of 0.

          Another question: The daily pivot on the daily chart reads all N/A values. Weekly pivots on daily charts work well. I need you to convince me that I can't use the Pivot(Daily, DailyBars) on a minute chart. Also when I use CalcFromIntradayData the values differ from the values on DailyBars. I checked the High / Low / Close and they are more or less the same.

          Please put in some effort to help me as it is all very confusing. Again NT 6.5 was more consistent with regard to getting values on historical data vs real time.
          Attached Files
          Last edited by clint2008; 10-21-2010, 09:35 AM.

          Comment


            #6
            Hello,

            This is a change log that has to do with the DrawTextFixed method that caused an exception when shutting down NinjaTrader and didnt allow workspaces to save.

            Simply put, the Pivots is not a true multi series indicator. Therefor it cannot be added as a hosted indicator and maintain its functionality as the hosted indicator is not able to add in BarSeries. The Daily Barseries would need to be added to be accessed from the main indicator.

            A Hosted indicator is simply any indicator that is called from inside of an indicator. Nested if you will.

            Therefor you will need to use HLCCalculationMode.CalcFromIntradayData.

            This works in my testing and the value changes with the new session and the value is what I would expect. Please make sure you are using a session template on your chart that gets you the pivot points your looking for.

            As far as not being able to do this on a minute chart this needs to be updated to be a full multi series indicator. Therefor would require a rewrite of the Pivots indicator which is currently on Developments recommendation list for a future version of NinjaTrader. However currently this is not possible.

            Let me know if I can be of further assistance.





            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rhyminkevin, Yesterday, 04:58 PM
            5 responses
            62 views
            0 likes
            Last Post dp8282
            by dp8282
             
            Started by realblubb, Today, 09:28 AM
            0 responses
            2 views
            0 likes
            Last Post realblubb  
            Started by AaronKoRn, Yesterday, 09:49 PM
            1 response
            18 views
            0 likes
            Last Post Rikazkhan007  
            Started by ageeholdings, Today, 07:43 AM
            0 responses
            12 views
            0 likes
            Last Post ageeholdings  
            Started by pibrew, Today, 06:37 AM
            0 responses
            4 views
            0 likes
            Last Post pibrew
            by pibrew
             
            Working...
            X