Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Schaff Trend RSI

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

    Schaff Trend RSI

    Having heard about Schaff indicators in this forum I browsed fxstreet.com and found TRSI at


    I tried to implement a Trend RSI which I want to be a RSI(MACD(23,50,9), 9) and used the Wizard to generate this bugged code :
    ---
    protected override void Initialize()
    {
    Add(new Plot(Color.Orange, PlotStyle.Line, "STR"));
    Rperiod = 9;
    Smooth = 9;
    Mfast = 23;
    Mslow = 50;
    CalculateOnBarClose = true;
    Overlay = false;
    PriceTypeSupported = false;
    }
    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    STR.Set(RSI(MACD(Close, Mfast, Mslow, Smooth) ,Rperiod, Smooth)[0]);
    }
    ---
    would you mind lending a hand ?

    #2
    What errors are generated? Try double clicking on the error itself in the NinjaScript Editor window.

    I created a quick indicator with no inputs and inserted the following in OnBarUpdate() and worked as I expected.

    STR.Set(RSI(MACD(Close, 23, 50, 9), 9, 9)[0]);
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    22 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    12 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    8 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    10 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    16 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X