Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default Value in MA = Close (Price)

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

    Default Value in MA = Close (Price)

    I have a customized indicator that under 2 conditions (such as 3 red bars in a row or 3 green bars) assigns a value equal to the distance to the prior pivot high or low.

    When I apply this to the chart all is fine. When I add it to MA it appears to asssign a default value of "Close[0]" to the column--unless the indicator assigns a value.

    The result is that I have stock prices intermixed with indicator values and I can not easily sort.

    Is there a way to change this behavior in MA?

    I have tried assigning a default valut in the code if neither of the 2 conditions is met and using a value of '9999' (the number), but this doesn't seem to ever be assigned, or at least is never showing up in the MA column.

    Any suggestions?
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    This is default behaviour. If you set a value to a plot for the indicator, it should show up. Try something simple like always setting this to a value of 1 on each OnBarUpdate() to make sure it works as expected and go from there.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    110 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    59 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    41 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    78 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X