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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X