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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X