Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modify Existing ATR Indicator to output Whole Number

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

    Modify Existing ATR Indicator to output Whole Number

    Hi,

    I have modified the system ATR Indicator by changing line 61 to "" Value[0] = Math.Ceiling(((Math.Min(CurrentBar + 1, Period) - 1) * Value[1] + trueRange) / Math.Min(CurrentBar + 1, Period)); '''

    I hope to round up the ATR Value to the nearest Whole Number.

    I have created a New Indicator and name it ATRr, I have save the full Original system ATR indicator and just changing the above line 61.

    When I tried to compile I have error as in the attached.

    Please advise how to resolve this issue. I am totally new to coding.

    Thank you.

    CW
    Attached Files

    #2
    Hi Kevtancw,
    Please change the class name (line 35) & indicator name (line 42). Please refer to the image below:

    Regards,
    William

    Click image for larger version

Name:	image.png
Views:	68
Size:	120.6 KB
ID:	1326067
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Hi ninZa,

      Thanks a lot.

      CW

      Comment

      Latest Posts

      Collapse

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