Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsRising IsFalling on a Keltner channel.

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

    IsRising IsFalling on a Keltner channel.

    Hi

    I found this already customed Keltner channel, maybe on the NT ecosystem a while back, to witch i added the lines from 79 to 90.

    I wanted it to switch colors when rising or falling with the code starting line 83. But the result is not satisfying :
    1-Only the middle band changes color and not the offset bands.
    2-the color switch happens when the bars are up or down, not the Ema

    Would anyone care to help me code this so the offset bands plot like the Ema (change colors as well) ? and maybe make the color switch react to the Ema, not price ? can it just be done ?

    Thanks a lot.
    Attached Files

    #2
    Hello CharlesAmd,
    If you need to change colors of all 3 plots based on condition, you need below code:
    Code:
    if (IsRising(Midline))
    {[INDENT]PlotBrushes[0][0] = Brushes.Green;
    PlotBrushes[1][0] = Brushes.Green;
    PlotBrushes[2][0] = Brushes.Green;[/INDENT]
     }
    else if (IsFalling(Midline))
    {[INDENT]PlotBrushes[0][0] = Brushes.Red;
    PlotBrushes[1][0] = Brushes.Red;
    PlotBrushes[2][0] = Brushes.Red;[/INDENT]
     }
    This will change colors of all 3 plots based on Middle EMA. Hope it helps!

    Comment


      #3
      Hello s.kinra

      Of course it helped, this is an ideal example of IsRising syntax applied on different plots, wich is exactly what i was trying to accomplish.
      Problem solved.

      Thank you very much.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X