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

Enhanced Heiken Ashi indicator

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

    Enhanced Heiken Ashi indicator

    I have attached an enhanced version of the Heiken Ashi indicator. It is based on the V7 one supplied by NT.

    I am hoping that a few people will give it a try and let me know their reaction -- bugs, suggestions, usability issues, etc. After giving it a bit to settle and fix any issues brought to my attention, I'll post it in the normal sharing location.

    Enhancements are:
    • Shadows can be colored to match what the plain candlestick color would be. Coloring is only displayed when the plain candlestick's color is different from the color of the HA candlestick. That is so that differences will be more obvious. You may find that the coloring helps indicate a weakening trend, or an impending trend reversal.

    • Choice of how to plot the data. There are several reasons for providing this:
      • It allows smoothing, to be applied to regular candlesticks as well.
      • It allows easily changing back and forth, without losing your settings. This helps explore the differences. It can also be used in the real world to show the different indications given by plain and HA candlesticks.

    Display choices are:
    • Heiken Ashi candlesticks -- obviously
    • Plain candlesticks -- they present a different view
    • Indicator line -- this is something folks have requested in the past. It allows plotting HA as a trend indicator without taking over your chart and showing nothing but HA. This can either be plotted on the main chart as a very low lag moving average, or else in an indicator panel.
    • No display -- allows temporarily turning the HA plot off without losing your settings. One reason is to make it easy to do a quick check of your underlying chart.

    • Choice of where to display the data -- you can display any of the display types either on the main chart or in an indicator panel.

    • Smoothing -- you can choose whether or not to smoooth, and how long the smoothing period is. I could not find an official way to calculate a smoothed Heiken Ashi, but I did find a well-liked Meta Trader mq4 file that does it in the way I had already decided was intuitively obvious. It smooths the OHLC streams and then calculates normally, based on those smoothed values. That is what is currently implemented. If anyone knows of a better, or more official, way to do the smoothing, please let me know. Depending on what seems appropriate, I'll either change or else add it and give the user the choice of which to use.

    Please give it a try and let me know your observations, whether a big deal to a trivial item, favorable or unfavorable.

    My thanks to any who do try it and let me know,
    EV

    NOTE: this is a .cs file. Just copy it to My Documents\NinjaTrader 7\bin\Custom\Indicator and compile it.

    EDIT: 1//3/11 -- attachment removed. Bug fixed version attached to a later posting. use that one.
    Last edited by ETFVoyageur; 01-13-2011, 04:38 PM.

    #2
    Bug fix

    I did find one bug. I doubt anyone else ran into it, and no one has complained. It had to do with saving a chart using this indicator as a template, then retrieving it and moving the indicator between panels.

    I have attached the fixed version to this message.

    This one is an exported package, so just use NT import to grab it.

    --EV

    EDIT: I have removed the file, because I posted a newer one (above)
    Last edited by ETFVoyageur; 01-15-2011, 07:31 PM.

    Comment


      #3
      Thanks for sharing ETFVoyageur.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Hey there EV...

        Thank you SO very much for all of your hard-work and intuitive insights to create a better HA candle. I've been reading your posts and your past life must have involved Rocket Science...you are one smart cookie ;-)

        Do you by chance have this HA indi written as well for NT 6.5?

        Reason I have not upgraded to NT 7.0 is some of the codes I'm using were written for 6.5 and won't work in 7.0 (yet)

        Thx in advance - Mongo

        Comment


          #5
          EV's Advanced Heiken Ashi

          Hey there EV...

          Thank you SO very much for all of your hard-work and intuitive insights to create a better HA candle. I've been reading your posts and your past life must have involved Rocket Science...you are one smart cookie ;-)

          Do you by chance have this HA indi written as well for NT 6.5?

          Reason I have not upgraded to NT 7.0 is some of the codes I'm using were written for 6.5 and won't work in 7.0 (yet)

          Thx in advance - Mongo

          Comment


            #6
            Originally posted by majormongo View Post
            Hey there EV...

            Thank you SO very much for all of your hard-work and intuitive insights to create a better HA candle. I've been reading your posts and your past life must have involved Rocket Science...you are one smart cookie ;-)

            Do you by chance have this HA indi written as well for NT 6.5?

            Reason I have not upgraded to NT 7.0 is some of the codes I'm using were written for 6.5 and won't work in 7.0 (yet)

            Thx in advance - Mongo
            First of all, thanks for your kind words. I'm glad that you like it.

            No, I do not have it for V6.5 -- I have only been with NT for a few weeks, and so am on V7. I do not have any access to a 6.5 setup. I do not know what is different there, so I do not know what it would take for it to run on V6.5. Sorry.

            What's the chance that the 6.5 stuff you are running could be ported to V7? Would that be hard to do? Since it is good stuff, making it available on V7 would seem like a Good Thing to do.

            --EV

            Comment


              #7
              This is an upgraded version.
              • I fixed one rendering bug that was making the candlesticks less than crisp. They are now, once again, nice and crisp.

              • I removed the Location parameter. It was always redundant (but necessary) and I did not like that. Now the indicator is able to figure out for itself whether it is running in a chart window or in an indicator panel, so you no longer have to tell it.


              I have attached the fixed version to this message. Give it a try and please let me know any comments, reaction, etc. The attachment is an exported package, so just use NT import to grab it.

              --EV

              EDIT: I removed the attachment. There is a later version in a more recent posting in this thread.
              Last edited by ETFVoyageur; 01-21-2011, 11:43 AM.

              Comment


                #8
                EV - I love the RWBHA7.0 indi - very slick.

                I especially love the "smoothing" factor you've built in (1-5). I had it on "5" on the GBPJPY (4HR) + using that along with a 21EMA - wow! I sold short at 1st red candle close below 21EMA and did a SAR (long) with first GREEN candle close above the 21EMA. Results? 550 pips down, 500+ pips up! Not once did I get a candle breach of the LINE at any time so the smoothness of the HA's kept me in these massive trades without any second guessing.

                Question(s)
                1. The "wicks" on my HA are Red, Green, some Black...what do I have going here?
                2. I was able to load and convert to HA on GBPJPY - no problems...but when I tried to load the HA indicator on other pairs... I got a blank screen...any ideas?

                Thx again for such a smokin' hot indi...I'm a big fan of HA once again.

                Mongo

                Comment


                  #9
                  Thanks for the kind words. I am really happy to hear how well the indicator works for you.

                  Wick colors -- note the configuration parameter "Color Shadows". It defaults to true, so folks will not overlook it. When false, you'll see all black wicks.

                  When true, the wick is colored to match the color a real candlestick would have been. The coloring is done only if the true candlestick would have been a different color -- I find that coloring only the exceptions is more eye-catching than coloring all the wicks. The coloring may help detect weakening or reversing trends.

                  As to your other question -- I do not know, but if you will tell me how to reproduce the problem I'll be glad to take a look.

                  --EV

                  Comment


                    #10
                    Well, I simply opened a new chart (GBPJPY), populated it with basic candles, and an RSI indicator, 4 HR chart - simple. Then I went under indicators and added the RWBHA7.0 and it showed up on my chart. Messed with the smoothing, etc...no issues. I then saved that set up as a NEW template.
                    (Called in "HA EMA21"- as an example)

                    I then added another chart (EURUSD)...repeated the same process...donwloaded my new template; "HA EMA21"...and got nothing on the main screen...just my RSI indicator below.

                    I tried seeing if using a different timeframe would help; such as DAILY as when you use HA's, tey are more memory intense...still nothing.

                    Not sure what I have going on here. Any ideas?

                    Also, while I have your attention...mind sharing how you're using the HA's with your trading?

                    Mongo

                    Comment


                      #11
                      Originally posted by majormongo View Post
                      Well, I simply opened a new chart (GBPJPY), populated it with basic candles, and an RSI indicator, 4 HR chart - simple. Then I went under indicators and added the RWBHA7.0 and it showed up on my chart. Messed with the smoothing, etc...no issues. I then saved that set up as a NEW template.
                      (Called in "HA EMA21"- as an example)

                      I then added another chart (EURUSD)...repeated the same process...donwloaded my new template; "HA EMA21"...and got nothing on the main screen...just my RSI indicator below.

                      I tried seeing if using a different timeframe would help; such as DAILY as when you use HA's, tey are more memory intense...still nothing.

                      Not sure what I have going on here. Any ideas?

                      Also, while I have your attention...mind sharing how you're using the HA's with your trading?

                      Mongo
                      I just tried it, and I cannot reproduce your problem. I made a new chart with my defaults, loaded GBPJPY, and it worked fine (as yours did). I then switched to EURUSD and that did fine as well.

                      Are you still having your problem?

                      As to my use of HA -- I am new to NT (just a few weeks) and still getting settled in. I had never seen HA before, and none of the existing versions did just what I wanted, so I wrote this version. I did try to incorporate reasonable feature requests that my searching found people asking for.

                      --EV

                      Comment


                        #12
                        I have NT working on the issues...NO problem getting it to load on EURJPY, GBPJPY...only GBPUSD, EURUSD...perhaps it doesn't like the USD (lol). Try attaching the MAMA indi onto your HA's...it shows a nice confirming signal on taking trades.

                        Thx for the feedback EV, much appreciated.

                        Mongo

                        Comment


                          #13
                          Originally posted by majormongo View Post
                          I have NT working on the issues...NO problem getting it to load on EURJPY, GBPJPY...only GBPUSD, EURUSD...perhaps it doesn't like the USD (lol). Try attaching the MAMA indi onto your HA's...it shows a nice confirming signal on taking trades.

                          Thx for the feedback EV, much appreciated.

                          Mongo
                          I just tried again and I can load all four of the ones you cite with no problem. I do not know of anything in the indicator's code that should be sensitive to a particular security. If, on further examination, either you or NT feels there is an indicator bug, please let me know (along with why you think that).

                          I see your MAMA comment. I, too, like MAMA. One thing you might want to look into -- try RwbMA (get it from the enhanced moving average thread). The bull/bear coloring works very well and gives good signals at turning points. I'm seriously considering using T3, count=1, bull/bear smoothing by 3-bar signal line. Looks very good on my EOD charts. No way to set that sort of thing up without using RwbMA.

                          I just tried it on EOD for EURJPY with a 10 bar period and it looks pretty good. You could play with different factors or doing the same thing but using a faster (or slower) moving average. RwbMA is intended to provide the flexibility to make it easy to explore options and in the end set it up the way that works best for you.

                          Note that if the indicator is right on top of the candlesticks and therefore hard to see, you can vertically shift it. You'll still get the shape and the color transitions. Works well as long as you are not looking at price closing above/below the MA. This is often helpful when using fast (low lag) moving averages at short periods.

                          If you do try it, please let me know how you like it.

                          --EV
                          Last edited by ETFVoyageur; 01-18-2011, 09:13 AM.

                          Comment


                            #14
                            EV, I will definitely check out your indi's.

                            I have compared the MAMA (default setting) with what I have used in the past...(a 2, 6, 12 EMA cross) over the Mid-line of a standard Bollingers (20,2). I use the middle BB line as a "confirmation"entry signal...meaning IF I get a 2, 6, 12 ema cross, I then wait for a candle close above/below the BB mid-line prior to initiating a trade. It works in both Long and Short entries. The MAMA tends to lag a lil' behind these but in both cases...I like the results. Keeps you out of alot of false setups.

                            Key with the BB's, is I wait for a piercing of the TOP or BOTTOM line and then wait for price to move back into the bands...once I get the 2,6,12 ema cross + candle close above/below the mid-line...I'm IN. I then use the most recent swing low or high (some folks use the BB's upper/lower band for placing my stops (or I have used a 1or 2 ATR of the Daily). Both work well.

                            In all, it produces some nice trades.

                            I will definitely check out your indi's above as they sound very interesting.

                            Tx again for sharing n caring ;-)

                            Mongo

                            Comment


                              #15
                              RWBHA indi working (sometimes)

                              Hey there EV...

                              I'm not sure if you can help here but NT support is having some difficulty is assessing my issues using your RWBHA indicator. See attached actual screen shots.

                              One shows your indi working on the GBPJPY, but not on the other - weird!

                              Do you think it might help to get your indi "resaved" or reposted so that I can download it again and see if that works? I'm at a loss as to WHY it works on one pair, but not others. I've even performed a complete unistall and reinstall of 7.0 to see if that would help...it did not ;-(

                              I'm sure there is no correlation to your indi and "some pairs working pairs"...but at this point, I'll try anything.

                              Thx Mongo
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by jclose, Today, 09:37 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,414 views
                              0 likes
                              Last Post Traderontheroad  
                              Started by firefoxforum12, Today, 08:53 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post firefoxforum12  
                              Started by stafe, Today, 08:34 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post stafe
                              by stafe
                               
                              Started by sastrades, 01-31-2024, 10:19 PM
                              11 responses
                              169 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X