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 GLFX005, Today, 03:23 AM
        0 responses
        2 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        7 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        14 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Working...
        X