Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 frankthearm, Today, 09:08 AM
    7 responses
    29 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by NRITV, Today, 01:15 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by maybeimnotrader, Yesterday, 05:46 PM
    5 responses
    25 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by quantismo, Yesterday, 05:13 PM
    2 responses
    17 views
    0 likes
    Last Post quantismo  
    Started by adeelshahzad, Today, 03:54 AM
    5 responses
    33 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X