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 cmoran13, 04-16-2026, 01:02 PM
      0 responses
      43 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      157 views
      2 likes
      Last Post CaptainJack  
      Working...
      X