Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie Indicator Question

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

    Newbie Indicator Question

    Hi,

    I'm trying to duplicate the RSI value in Amibroker as comparing them side by side seems to show some differences.

    I came up with the following that I _think_ is what I want, but I can't get the rsi value to plot out.....

    Any help greatly appreciated!

    John

    protectedoverridevoid OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    double P = 0.0;
    double N = 0.0;
    double W = 0.0;
    double S = 0.0;
    double diff = 0.0;
    double rsi_val = 0.0;

    diff = Close[
    0] - Close[1];
    if (diff > 0) {
    W = diff;
    }
    if (diff < 0) {
    S = -diff;
    }

    P = ((period -
    1) * P + W)/period;
    N = ((period -
    1) * N + S)/period;

    rsi_val =
    100*P/(P+N);

    Plot0.Set(rsi_val);
    }

    #2
    Please check the Control Center log for errors. Namely for the error discussed in this tip: http://www.ninjatrader-support2.com/...ead.php?t=3170
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X