• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 diegooriani, Today, 04:10 AM
        1 response
        25 views
        0 likes
        Last Post brucerobinson  
        Started by thetickfarmer, 04-04-2020, 04:44 PM
        7 responses
        46 views
        0 likes
        Last Post brucerobinson  
        Started by login_dejavu, Today, 02:36 AM
        0 responses
        26 views
        0 likes
        Last Post login_dejavu  
        Started by GaryGuy, Today, 02:35 AM
        0 responses
        6 views
        0 likes
        Last Post GaryGuy
        by GaryGuy
         
        Started by NinjaCustomer, Today, 02:12 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Marco  
        Working...
        X