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

weekly pivots

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

    weekly pivots

    I have made a daily pivots indicator and now I'm trying to make weekly pivots using the same daily indicator.

    This isn't all the code but what i could post but this is the main part of it.

    PreHigh = PriorDayOHLC().PriorHigh[0];
    PreLow = PriorDayOHLC().PriorLow[
    0];
    PreClose = PriorDayOHLC().PriorClose[
    0];

    PP = (PreHigh + PreLow + PreClose) /
    3;
    R1 =
    2 * PP - PreLow;
    R2 = PP + (PreHigh - PreLow);
    R3 = R1 + (PreHigh - PreLow);
    S1 =
    2 * PP - PreHigh;
    S2 = PP - (PreHigh - PreLow);
    S3 = S1 - (PreHigh - PreLow);


    Plot0.Set(PP);
    Plot1.Set(R1);
    Plot2.Set(R2);
    Plot3.Set(R3);
    Plot4.Set(S1);
    Plot5.Set(S2);
    Plot6.Set(S3);


    #2
    Please take a look at our pivots indicator supplied with NinjaTrader per default, it includes an option for the weekly ones already (parameter PivotRangeType)
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Pivots indicator

      The pivot indicator doesn't give the right weekly pivots i need that is why i need the code to be able go get the correct values.

      Comment


        #4
        Coby,

        The way NinjaTrader calculates pivots is discussed here: http://www.ninjatrader-support2.com/...ead.php?t=4676

        The values created are based off of whatever data you have on the chart.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Brevo, Today, 01:45 AM
        0 responses
        3 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        3 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        239 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        6 views
        0 likes
        Last Post oviejo
        by oviejo
         
        Working...
        X