Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to create calcualted heikin ashi out of two trends ^ADV - ^DECL

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

    how to create calcualted heikin ashi out of two trends ^ADV - ^DECL

    Dear support

    i want to create a calculated trend based of two signals.
    ADVancers - DECLiners

    but i need the result to be a Heikin ashi candle

    is this possible to do?

    thanks

    #2
    Hello jimmy_NT,

    Thank you for your note.

    I don't believe there's a quick way to do this with an existing script, but you could certainly look at combining these two indicators from our publicly available User App Share:

    NYSE Advancing Issues/Declining Issues Uses historical tick data to calculate the ^ADV index minus the ^DECL index to give a simulation of the ^ADD index. Requires a data feed that supports indexes and provides data for the ^ADV (NYSE Advancing Issues) and ^DECL (NYSE Declining Issues). Update June 16th, 2020 – Corrected stroke attributes to […]


    NinjaTrader 8 natively provides Heiken Ashi as a bar type for most common bar types (minute, tick, volume, second, day, week, month, year). This Heiken Ashi indicator is provided for the Range, Renko and any custom bar types that may be added. The indicator performs in the same manner as the NinjaTrader 7 version. 4-27-18 […]


    Basically, calculate the advance/decline value, then feed the high/low/open/close values to be charted using the heiken ashi logic.

    Please let us know if we may be of further assistance to you.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Comment


      #3
      Thanks i downloaded the indicators, howver, when adding the heikin ashi, i dont know how to feed high/low/open/close.
      is this done in script? or can i do it from the indicator window it self?

      i did add to heiken ashi the data series to be the AdvDec indicator but not sure if this is what you recommended

      by thw way is there a difference to use hits Heiken ashi indicators vs the builtin from the chart?

      thanks

      Comment


        #4
        Hello jimmy_NT,

        Thank you for your reply.

        You would need to create a custom script that copies the heiken ashi indicator, but replaces each call to Open[0], High[0], Close[0], or Low[0] with calling the AdvanceDecline indicator and accessing the appropriate plot, so something like this:

        Code:
        HAOpen[0] = AdvanceDecline(Brushes.Lime, Brushes.Red, 0, false, false).ADDOpen[0];
        HAHigh[0] = AdvanceDecline(Brushes.Lime, Brushes.Red, 0, false, false).ADDHigh[0];
        HALow[0] = AdvanceDecline(Brushes.Lime, Brushes.Red, 0, false, false).ADDLow[0];
        HAClose[0] = AdvanceDecline(Brushes.Lime, Brushes.Red, 0, false, false).ADDClose[0];
        You'd also need to ensure you add the ADV and DEC data series in the custom indicator in OnStateChange during State == State.Configure as well since the AdvanceDecline calls them:

        Code:
         else if (State == State.Configure)
        {
        TradingHours hours = (TradingHours.Name == "<Use instrument settings>") ? Instrument.MasterInstrument.TradingHours: TradingHours;
        
        AddDataSeries("^ADV", new BarsPeriod() { BarsPeriodType = BarsPeriodType.Tick, Value = 1 }, hours.Name);
        AddDataSeries("^DECL", new BarsPeriod() { BarsPeriodType = BarsPeriodType.Tick, Value = 1 }, hours.Name);
        }
        This would necessitate some skill at manually coding NinjaScript. While we in the support department cannot create, modify or debug a script for you, if this is a bit overwhelming you may wish to contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          when i i mport the AdvDec indicator, is not calling that data already? if i use it as usual from the wizard, it does not ask me for the ADV DECL but for the ES contract....

          Comment


            #6
            Hello jimmy_NT,

            The AdvanceDecline indicator adds the ^ADD and ^DECL data series and uses it to calculate the difference. (This is added in State.Configure)

            The calculated ADDOpen ADDHigh ADDLow and ADDClose could then be used as the Open High Low and Close in a Heiken Ashi indicator.

            For clarity on how scripts add and work with multiple data series, please see below.

            https://ninjatrader.com/support/help...nstruments.htm

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            579 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 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
            554 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