Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Pivot points

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

    Pivot points

    Hello,

    Is there a guideline, or a way to use pivots in a strategy? Ex., if the price closes above S1....

    Thanks for your great help, c

    #2
    Crimsonite,

    You can calculated these pivots internally within your strategy :

    Code:
                        pp = (currentHigh + currentLow + currentClose) / 3;
                        s1 = 2 * pp - currentHigh;
                        r1 = 2 * pp - currentLow;
                        s2 = pp - (currentHigh - currentLow);
                        r2 = pp + (currentHigh - currentLow);
                        s3 = pp - 2 * (currentHigh - currentLow);
                        r3 = pp + 2 * (currentHigh - currentLow);
                        s4 = s3 - (s1 - s2);
                        r4 = r3 + (r2 - r1);
                        bc = (currentHigh + currentLow) / 2;
                        tc = (pp - bc) + pp;
    Or you can use the SessionPivots indicator.

    SessionPivots(Data.IDataSeries input, bool isDPShowing, PivotRange pivotRangeType, PivotType pivotType, HLCCalculationMode priorDayHLC, ProfileType profileType, double userDefinedClose, double userDefinedHigh, double userDefinedLow)

    With : SessionPivots( [sessionpivots] ).PP

    PP can be changed to R1, R2, S1, S2, etc.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Got it, thanks for the help...

      What should I replace [sessionpivots] with?
      Originally posted by NinjaTrader_AdamP View Post
      Crimsonite,

      You can calculated these pivots internally within your strategy :

      Code:
                          pp = (currentHigh + currentLow + currentClose) / 3;
                          s1 = 2 * pp - currentHigh;
                          r1 = 2 * pp - currentLow;
                          s2 = pp - (currentHigh - currentLow);
                          r2 = pp + (currentHigh - currentLow);
                          s3 = pp - 2 * (currentHigh - currentLow);
                          r3 = pp + 2 * (currentHigh - currentLow);
                          s4 = s3 - (s1 - s2);
                          r4 = r3 + (r2 - r1);
                          bc = (currentHigh + currentLow) / 2;
                          tc = (pp - bc) + pp;
      Or you can use the SessionPivots indicator.

      SessionPivots(Data.IDataSeries input, bool isDPShowing, PivotRange pivotRangeType, PivotType pivotType, HLCCalculationMode priorDayHLC, ProfileType profileType, double userDefinedClose, double userDefinedHigh, double userDefinedLow)

      With : SessionPivots( [sessionpivots] ).PP

      PP can be changed to R1, R2, S1, S2, etc.

      Please let me know if I may assist further.

      Comment


        #4
        Crimsonite,

        Here : SessionPivots(Data.IDataSeries input, bool isDPShowing, PivotRange pivotRangeType, PivotType pivotType, HLCCalculationMode priorDayHLC, ProfileType profileType, double userDefinedClose, double userDefinedHigh, double userDefinedLow)

        You can see that the SessionPivots indicator takes a lot of different inputs. These would need to be passed to it in any indicator calls.

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by reynoldsn, 05-10-2024, 07:04 PM
        5 responses
        26 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by thumper57, Yesterday, 04:30 PM
        4 responses
        14 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by llanqui, Today, 11:10 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by llanqui, Today, 10:29 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by Trader146, 05-10-2024, 09:17 PM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X