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:	92
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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      36 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      14 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      20 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X