Login Page - Create Account

Support Board


Date/Time: Thu, 22 May 2025 00:56:00 +0000



Post From: Updates to Pivot Point Study: ShadowTrader

[2023-11-14 16:06:23]
DirtyGoats - Posts: 5
Greetings.
Can users update/add code to SierraChart studies?

I've found the code:
  else if (FormulaType == 8) // Shadow Trader. www.shadowtrader.net
  {
    PivotPoint = (PriorHigh + PriorLow + PriorClose) / 3;
    R1 = (2 * PivotPoint) - PriorLow;
    R2 = PivotPoint + (R1 - S1);
    R3 = PriorHigh + 2*(PivotPoint - PriorLow);
    R4 = PriorHigh + 3*(PivotPoint - PriorLow);
    R5 = PriorHigh + 4*(PivotPoint - PriorLow);

    S1 = (2 * PivotPoint) - PriorHigh;
    S2 = PivotPoint - (R1 - S1);
    S3 = PriorLow - 2 * (PriorHigh - PivotPoint);
    S4 = PriorLow - 3 * (PriorHigh - PivotPoint);
    S5 = PriorLow - 4 * (PriorHigh - PivotPoint);

    

    S3_5 = (S3 + S4)/2;
    S2_5 = (S3 + S2)/2;        
    S1_5 = (S2 + S1)/2;        
    S_5 = (S1 + PivotPoint)/2;      
    R_5 = (R1 + PivotPoint)/2;      
    R1_5 = (R2 + R1)/2;        
    R2_5 = (R3 + R2)/2;    
    R3_5 = (R3 + R4)/2;

  }

...and i'd like to add R5/S5 and potentially higher. I've attempted to do this on my own and rebuild the study but it appears i'm either compiling incorrectly or users just cant alter the logic.

appreciate your time in reviewing.