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