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:	82
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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      50 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      69 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      36 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      96 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      59 views
      0 likes
      Last Post PaulMohn  
      Working...
      X