Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Donchian Channel with Fibonacci in between

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

    Donchian Channel with Fibonacci in between

    Hello,

    I'd greatly appreciate a bit of guidance as I'm not a programmer. Is there a way to add Fibonacci lines to a Donchian channel?

    For example, I'd like to add 75% and 25% lines of the channel in addition to the mean.

    A picture is attached for reference(solid red line = top, solid yellow line = mean, solid cyan line = bottom, dashed white lines = 75%/25%. The donchian channel indicator is also attached.

    Thanks in advance.
    Attached Files

    #2
    Hello,
    Thanks for your post.

    Our support team does not provide conversions or development services like this. You will need to contact a third party NinjaScript consultant or program these yourself.
    The Fibonacci template that is built into NinjaScript will not dynamically update the way that you would like it to. So, in order to accomplish what you describe you will need to write your own Fibonacci logic into the code of your indicator.
    That being said your OnBarUpdate() should include something similar to the following snippet of code:

    LongUpper.Set(MAX(High, Len1)[0]);
    ShortUpper.Set(MAX(High, Len2)[0]);
    ShortLower.Set(MIN(Low, Len2)[0]);
    LongLower.Set(MIN(Low, Len1)[0]);

    This would be the start of the logic needed for your Donchian channel.
    To draw your Fibonacci lines you could do one of two things.
    You could directly program the logic that a Fibonacci uses into your code.
    If you have a template already set up for your 25%/75% lines then you could call that using Draw.FibonacciRetracements()
    If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

    A link to our Help Guide can be found below:


    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:


    You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
    Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
    There is also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37

    If you have any further questions please let me know.
    Josh G.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
    333 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