Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can someone convert this TOS Indicator to code for Ninjatrader

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

    Can someone convert this TOS Indicator to code for Ninjatrader

    Need help converting this code to NInjatrader.. plan to use this in strategy... or can this be converted to indicator as well...


    input length = 20;
    input momentum = 5;

    assert(momentum > 0, "'momentum' must be positive: " + momentum);

    def emaInc = ExpAverage(Max(close - close[momentum], 0), length);
    def emaDec = ExpAverage(Max(close[momentum] - close, 0), length);
    plot RMI = if emaDec == 0 then 0 else 100 - 100 / (1 + emaInc / emaDec);
    plot OverBought = 70;
    plot OverSold = 30;

    RMI.SetDefaultColor(GetColor(1));
    OverBought.SetDefaultColor(GetColor(8));
    OverSold.SetDefaultColor(GetColor(8));​

    #2
    HI vrajneesh, thanks for posting. Unfortunately, the support team can not convert custom code, another forum member must volunteer for that.

    We have the EMA in NinjaTrader by default:



    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 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
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X