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

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 JGriff5646, Today, 10:02 PM
    0 responses
    1 view
    0 likes
    Last Post JGriff5646  
    Started by AdamDJ8, Today, 09:18 PM
    0 responses
    2 views
    0 likes
    Last Post AdamDJ8
    by AdamDJ8
     
    Started by knowmad, Today, 03:52 AM
    2 responses
    27 views
    0 likes
    Last Post knowmad
    by knowmad
     
    Started by ETFVoyageur, Today, 07:05 PM
    0 responses
    10 views
    0 likes
    Last Post ETFVoyageur  
    Started by Orion815, 05-02-2024, 08:39 AM
    2 responses
    18 views
    0 likes
    Last Post Orion815  
    Working...
    X