Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to check values in indicator

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

    how to check values in indicator

    I have 2 indicator plots which start showing values when they are above 0.
    how do I detect the change in indicator value from strategy?
    for eg. when I look at the databox, the indicator shows n/a for the values that I did not plot.
    when I plot the values, I can see the values in the databox.
    so how do I compare if prev indicator value ==n/a and current indicator value>=0 from my strategy?

    this is what I did but I don't see the logic getting executed.
    Code:
       }
    					if(PullbackBounce(20).UP[0]>=0 && !PullbackBounce(20).UP.IsValidDataPoint(1))
    					{
    						Print(Bars.GetTime(1).ToString() +   "Change in direction from short to long" );
    					}
    					
    					if(PullbackBounce(20).Down[0]<=0 && !PullbackBounce(20).Down.IsValidDataPoint(1))
    					{
    						Print(Bars.GetTime(1).ToString() +   "Change in direction from long to short" );
    					}

    #2
    Hello junkone,

    For values to appear in the DataBox, these must be set to a plot.

    Your code does not include the setting of a plot value.

    Is this code incomplete?

    Do you have plots in your script?

    Are you actually referring to the Output Window and not the DataBox?

    Using <Series>.IsValidDataPoint() will let you know if a plot or series has a value.

    Below is a publicly available link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X