Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No Value

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

    No Value

    Hi

    i'm trying to write a simple indicator to highlight simple engulfing patterns ... if I do this i get both plots


    EngulfingUp.Set(0,Low[0]);
    EngulfingDn.Set(0,High[0]);

    if I do this I get nothing ?

    if (Open[0] <= Close[1] && Close[0] >= Open[1]) EngulfingUp.Set(0,Low[0]);
    else if (Open[0] >= Close[1] && Close[0] <= Open[1]) EngulfingDn.Set(0,High[0]);

    Do I need to set a value for every plot for every bar ... is there a NOVALUE constant or something ?

    Thanks

    Paul

    #2
    Hello Paul,

    Thank you for writing in.

    When you plot, you need at least two consecutive plots in a row for any 1 plot segment to show. (You need two bars next to each other to draw a segment between them)

    When one is detected, you can set the current bar and the previous bar at the same time. This would make it show.

    if (Open[0] <= Close[1] && Close[0] >= Open[1])
    {
    EngulfingUp.Set(Low[0]); <- sets the value for the plot on the current bar
    EngulfingUp.Set(1, Low[0]); < - sets the value for the plot on the previous bar
    }
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    161 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    308 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    349 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X