Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Offset Donchian Channel

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

    Offset Donchian Channel

    I'm trying to create this variation of the Donchian Channel and hoping for a little help.

    1] Look back (x)period - (it already does this)
    2] Offset the lines being drawn (from the high and low)
    3] Displace the lines (x)bars to the right
    4] Ability to use lines, dots, hash, colors, etc.

    For example, I might use these settings . . .

    1] Look back period: 7 bars
    2] Offset lines as follows:
    Upper: +7 ticks above standard upper
    Lower: -7 ticks below standard lower
    Median: 0 offset (transparent)
    3] Displace lines 3 bars to the right
    4] Use hash line, size 2, blue

    To provide maximum flexibility, the lines being offset should be able to be a positive or negative number, whether for upper or lower. For example:

    2] Offset lines as follows:
    Upper: -13 ticks below standard upper
    Lower: +7 ticks above standard lower
    Median: 0 offset (transparent)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Ideally, a person could add this indicator to their chart for the preset time frame (say 1 minute chart), then add it again as a 2nd indicator to simulate another time frame (say 5 minute). This would require a setting for "bar group".

    1st Indicator - lookback period of 7, bar group of 1.
    This would display the highs and lows of the last 7 bars. If using a 1 minute chart you'd simply have 7 bars in 7 minutes.

    2nd Indicator - This one needs to simulate being on a 5 minute chart, but displays on this same chart. So the settings would be lookback period of 35, bar group of 5. Every 5 minutes it would draw a new set of lines.

    In essence, it would group the first 5 one minute bars together, calculate their high and low and go from there. Then it would take the next group of 5 and do the same thing again (5 minutes later).

    Hope this makes a little bit of sense.

    #2
    hondo69,

    You should open up the base Donchian channel and just add a few ticks to the plots you want to move.

    5 * TickSize or something like that to add 5 ticks.

    If you want to displace lines you just have to program it to set the value where you want it displaced.

    If you want hash style you will need to program that into the Add(new Plot()) line. PlotStyle.Hash. To use a width of 2 you would need to program the Pen to have a width of 2.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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