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:	87
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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      67 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X