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

HeikenAshi indicator in new panel with original candles intact?

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

    HeikenAshi indicator in new panel with original candles intact?

    Hi,
    I wish to create an indicator similar to the standard price bar candlesticks. This indicator should appear in a separate panel leaving the original candlesticks intact.
    To test:
    1) Created a copy of the HeikenAshi indicator, giving it a different name.
    2) Changed Overlay in the Initialize() method to false
    3) Added this new indicator to my chart.
    The result was that it no longer draws the original candlesticks in the main panel.
    It does draw the HeikenAshi candles in the new panel.
    Question: How can I leave the original candles in the main panel intact?
    Thanks,
    David

    #2
    Originally posted by dholliday View Post
    Hi,
    I wish to create an indicator similar to the standard price bar candlesticks. This indicator should appear in a separate panel leaving the original candlesticks intact.
    To test:
    1) Created a copy of the HeikenAshi indicator, giving it a different name.
    2) Changed Overlay in the Initialize() method to false
    3) Added this new indicator to my chart.
    The result was that it no longer draws the original candlesticks in the main panel.
    It does draw the HeikenAshi candles in the new panel.
    Question: How can I leave the original candles in the main panel intact?
    Thanks,
    David
    Remove the instructions that turn the candles transparent. They are the lines that contain the "Color.Transparent" compound word.

    Comment


      #3
      Hello David,

      Thank you for writing in. Koganam is correct, the HeikenAshi indicator just turns the regular bars transparent. The relevant code parts you will want to work with are:
      Code:
      if (Displacement + (CalculateOnBarClose ? 1 : 0) > 0 && CurrentBar > 0 && BarColorSeries[1] != Color.Transparent)
      	InitColorSeries(); //See the InitColorSeries() method further down in the code
      
      BarColorSeries.Set(Math.Max(0, CurrentBar + Math.Max(0, Displacement) + (CalculateOnBarClose ? 1 : 0)), Color.Transparent);
      CandleOutlineColorSeries.Set(Math.Max(0, CurrentBar + Math.Max(0, Displacement) + (CalculateOnBarClose ? 1 : 0)), Color.Transparent);
      Please let me know if you have any questions.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Originally posted by dholliday View Post
        Hi,
        I wish to create an indicator similar to the standard price bar candlesticks. This indicator should appear in a separate panel leaving the original candlesticks intact.
        To test:
        1) Created a copy of the HeikenAshi indicator, giving it a different name.
        2) Changed Overlay in the Initialize() method to false
        3) Added this new indicator to my chart.
        The result was that it no longer draws the original candlesticks in the main panel.
        It does draw the HeikenAshi candles in the new panel.
        Question: How can I leave the original candles in the main panel intact?
        Thanks,
        David
        You can download the anaHeikinAshi indicator at

        http://lizardtrader.com

        The indicator is a free download and comes open source.

        Compared to the default Heikin Ashi indicator it comes with the following additional features:

        -> Heikin Ashi candles are based on original formula by Dan Valcu or on a modified formula published by Sylvain Vervoort
        -> additional smoothing of Heikin Ashi candles with 28 different moving averages
        -> Heikin Ashi candles can be either plotted on price panel or on separate panel, default chart bars can be shown or disabled
        Last edited by Harry; 08-21-2015, 03:05 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,221 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        437 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        9 views
        0 likes
        Last Post FAQtrader  
        Working...
        X