Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

WildersAverage Indicator

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

    WildersAverage Indicator

    I would like to develop a Directional Indicator and incorporate the WildersAverage function.
    This is not a provided indicator from Ninja.
    Has anyone developed an indicator using the WildersAverage function?

    The following code is from ThinkOrSwim that achieves the result I am trying to do with Ninja:

    input length = 14;
    def hiDiff = high - high[1];
    def loDiff = low[1] - low;
    def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0;
    def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0;
    def ATR = WildersAverage(TrueRange(high, close, low), length);
    def "DI+" = 100 * WildersAverage(plusDM, length) / ATR;
    def "DI-" = 100 * WildersAverage(minusDM, length) / ATR;
    def DX = if ("DI+" + "DI-" > 0) then 100 * AbsValue("DI+" - "DI-") / ("DI+" + "DI-") else 0;
    plot "DX" = DX;
    plot "30-Line" = 30;


    NOTE: This is very similar to the Ninja provided DM and ADX indicators coding but I am having trouble incorporating the WilderAverage to it.

    Thank you for any help that can be provided.

    #2
    Hello MiamiTom,

    I've not seen this one in the file sharing section. If you're not able to get a response from other users on this, can consider hiring a 3rd party NinjaScript consultant to code for you.

    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    153 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    306 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    176 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X