Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting a Null Value

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

    Setting a Null Value

    I am working on an indicator that plots a moving average line, and in certain circumstances I want the line to not be plotted at all.

    I tried in the On Bar Update:

    Variable.Set(Null) and the compiler gave me an error.

    Of course Variable.Set(0) plots the line at 0 which isn't my intention.

    What is the syntax for having a null value in Variable.Set()?

    Thanks in advance.

    #2
    Nevermind, I setup an If statement that plots the values I want with no else statement and that works.

    Comment


      #3
      Grasul, glad to hear you got it working. Let us know if you have any other questions.
      AustinNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X