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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      376 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X