Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Percent

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

    Percent

    Hi I am new to NT and I trying to build my first indicator. The first two definition of indicator below work fine (gap vs SMA). The third one however produces the same result of the second, while I would expect to get a % difference. what am I doing wrong? thanks


    Plot0.Set(Close[0] - SMA(Period)[0])

    Plot0.Set((Close[0] - SMA(Period)[0]) / SMA(Period)[0])

    Plot0.Set((Close[0] - SMA(Period)[0]) / SMA(Period)[0] * 100)

    #2
    Hello kalkanis,

    Thank you for your post.

    Add additional '(' and ')' as in the following example:

    Plot0.Set(((Close[0] - SMA(Period)[0]) / SMA(Period)[0]) * 100)

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thank you. It worked. another question if I may. I would like to build an indicator which provides the rank of an instrument based on another indicator. for instance a rank of all instruments based on ROC of the instrument itself (with 1 being the one with higher ROC, etc). I would like to keep the indicator based on which the ranking is done flexible, i.e. sometimes it could be ROC, other times SMA, etc

      is there anything similar ready for downloading? thanks

      Comment


        #4
        Hello kalkanis,

        Thank you for your response.

        I am not aware of such an item. Please visit our file sharing section to see if there are any items available to download that fit your interest: http://www.ninjatrader.com/support/f...splay.php?f=37

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        569 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
        548 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