Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

abs()

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

    abs()

    looking for mathematical function for ninjascript on abs()
    converting -ve value to positive

    #2
    Hi siddhugaddi,

    You can use the Math.Abs() function to do that.

    For example:
    int a = -5;
    int b = Math.Abs(a); // ==> result will be 5

    Regards,
    William
    Last edited by ninZa; 09-18-2024, 02:24 AM.
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Thank You got the solution

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      10 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      59 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      41 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      47 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      38 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X