Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Channel indic with different distance to mid

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

    Channel indic with different distance to mid

    Hello

    Does anybody know of a "channel indic" (like a bollinger band, CCI, keltner etc) in NT8 that allows you to set an asymmetrical channel? So, for example:

    UPPER band = center + 1 std dev
    LOWER band = center - 0.5 std dev

    Could be expressed in % or whatever, but the thing I'm looking for is the asymmetry.

    Many thanks in advance.

    #2
    Hello StockTrader88,
    Thanks for your post and welcome to the NinjaTrader forum.

    I am unaware of a specific indicator that can do this, but if you wanted to code the indicator yourself you could use something similar to the following snippet to plot the formulas you provided.

    Code:
    public class SMAChannels: Indicator
    {
    	private double PrimaryValue;
    	private double UpperBand;
    	private double LowerBand;
    	protected override void OnStateChange()
    	{
    		if (State == State.SetDefaults)
    		{
    			AddPlot(Brushes.Yellow, "Upper");
    			AddPlot(Brushes.Red, "Primary");
    			AddPlot(Brushes.Blue, "Lower");
    		}
    	}
    	protected override void OnBarUpdate()
    	{
    		Values[0][0] = SMA(14)[0] + StdDev(14)[0];//Upper Band
    		Values[1][0] = SMA(14)[0];//Middle Band
    		Values[2][0] = SMA(14)[0] - (0.5)*StdDev(14)[0];//Lower Band 
    	}
    }
    Help Guide- Values

    Help Guide- StdDev()

    Help Guide- AddPlot()
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thanks a lot for your helpful reply!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      600 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      558 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X