• 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 bomanpbm, Yesterday, 09:27 PM
        0 responses
        2 views
        0 likes
        Last Post bomanpbm  
        Started by tgn55, Yesterday, 08:47 AM
        0 responses
        8 views
        0 likes
        Last Post tgn55
        by tgn55
         
        Started by ballboy11, 05-04-2019, 10:26 AM
        6 responses
        58 views
        0 likes
        Last Post Kermit
        by Kermit
         
        Started by mrlucky1x, 06-14-2019, 10:01 PM
        0 responses
        15 views
        0 likes
        Last Post mrlucky1x  
        Started by roger556, 06-14-2019, 09:22 PM
        0 responses
        8 views
        0 likes
        Last Post roger556  
        Working...
        X