Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Woodie Pivots in a strategy

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

    Woodie Pivots in a strategy

    I'm unable to get Woodie Pivot values into my strategy. Straight from the NJ8 documentation, it chokes during compile with the error
    "the best overload mthod for NinjaTrader.NinjaScript.Strategy.WoodiesPivots... has some invalid arguments"

    Then it complains about Argument 1. When I take that out, it compiles but the values are all 0.

    From the NJ8 documentation for Woodies Pivots usage

    // Prints the current pivot point value
    double value = WoodiesPivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).PP[0];
    Print("The current Woodies Pivots' pivot value is " + value);

    // Prints the current S2 pivot value
    double value = WoodiesPivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).S2[0];
    Print("The current Woodies Pivots' S2 pivot value is " + value);

    #2
    Hello mikeylikesit33,

    Thanks for your post and welcome to the forums!

    It appears the beta documentation has not been updated and we will correct that.

    In the meantime, in the Ninjatrader IDE, the intelliprompt shows only two parameters, one is HLCCalculationModeWoodie and the other is the integer length.

    Please try:
    Code:
    double test2 = WoodiesPivots (HLCCalculationModeWoodie.CalcFromIntradayData, 20).PP[0];
    Print("The current Woodies Pivots' PP pivot value is " + test2);
    
    double test3 = WoodiesPivots (HLCCalculationModeWoodie.CalcFromIntradayData, 20).S1[0];
    Print("The current Woodies Pivots' S1 pivot value is " + test3);
    
    double test4 = WoodiesPivots (HLCCalculationModeWoodie.CalcFromIntradayData, 20).R1[0];
    Print("The current Woodies Pivots' R1 pivot value is " + test4);
    
    double test5 = WoodiesPivots (HLCCalculationModeWoodie.CalcFromIntradayData, 20).S2[0];
    Print("The current Woodies Pivots' S2 pivot value is " + test5);
    
    double test6 = WoodiesPivots (HLCCalculationModeWoodie.CalcFromIntradayData, 20).R2[0];
    Print("The current Woodies Pivots' R2  pivot value is " + test6);
    Thanks for your participation in the beta program.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Right, but as I said, when I take out the PivotRange... hence just using the two you indicate... the Print command shows all pivots as zero (0).

      So it seems they aren't working.

      Comment


        #4
        Hello mikeylikesit33,

        Thanks for your reply.

        I tested the example shown in my post on 1 minute data and it printed the Woodies pivots shown on the chart attached. Please note that the HLCCalculationMode is changed to HLCCalculationModeWoodie.
        Attached Files
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        238 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        382 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Working...
        X