This indicator is based on an idea of Nicolas (= heikin ashi of higher TF ), with the difference that the Heikin Ashi candles of a higher time-frame are now superimposed on the price window of a given TF. Heikin Ashi candles are wonderful to filter the noise in the quotes and allow to see more clearly the underlying trend.The period of the upper TF candles are set in minutes (1 Hour 60, 4 hours 240, one day 1440 etc.)The HA candle is drawn as a rectangle and inside the rectangle we can see next to the price bars other small bars that show us how the HA candle of the TF has evolved over time.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
//Higher TF HA candles by pableitor 2018 // --- settings // TimeframeHAminutes = 60 //higher TF minutes // --- end of settings defparam calculateonlastbars=3000 //increase this number to get more history opd= openday if (openhour = 0) then opd = openday + 1 endif once hightf = 0 once lowtf = close * 100 once ha=0 Myminutes = opd*1440 + openhour*60 + openminute //total minutes since beginning of chart if (myminutes MOD TimeframeHAminutes < myminutes[1] MOD TimeframeHAminutes ) then //new HA candle opentf = open hightf = 0 //fake high lowtf = close * 100 //fake low haopen =( haopen[1]+haclose[1])/2 hastart = barindex // position of new candle x1=hastart[1] x2=barindex[1] y1=haopen[1] y2=haclose[1] DRAWSEGMENT(x1,y1,x2,y1)coloured(r,g,0) DRAWSEGMENT(x1,y1,x1,y2)coloured(r,g,0) DRAWSEGMENT(x1,y2,x2,y2)coloured(r,g,0) DRAWSEGMENT(x2,y1,x2,y2)coloured(r,g,0) ha=1 // flag for first HA candle endif hightf = max(hightf,high) lowtf= min(lowtf,low) if ha = 0 then opentf = open //fake value when theres no HA candles endif if ha=0 then haopen = open endif haclose=(opentf+close+lowtf+hightf)/4 r=0 g=200 if haclose<haopen then r=200 g=0 endif DRAWCANDLE(haopen,haopen,haclose,haclose) COLOURED(R,G,0,40) BORDERCOLOR(R,G,0,40) return |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Well done, good job ! 😉
Thank you! Could you replicate this indicator using regular candlesticks instead of Heikin Ashi? I would appreciate it if you could!
Done ! Pls check this https://www.prorealcode.com/prorealtime-indicators/higher-time-frame-candlestick-on-a-lower-time-frame-chart/
Thank you very much sir!
Il doit être possible tout simplement d’emprisonner les bougies dans des rectangles (+haut +bas et UT) d’unité de temps supérieures je ne saurais pas le coder donc ….. ex sur graph 5M rectangles pour les UT 15M H1 D1 d’un seul coup d’oeil cela permettrait de visualiser l’amplitude et la position du prix sur chaque UT ainsi que la tendance de fond et celle du moment cordialement
oui c’est possible. Cependant la position du prix,c’est la même sur chaque UT 😉
Merci Nicolas de la rep oui bien sur que le prix a une position identique le but est d’avoir tout sur un seul graph (plus hauts + bas par unité de temps )
Hi All, I am not very knowledgeable with coding. I have tried to add this indicator and get the following message –
Syntax error: The following variable is undefined: timeframehaminutes.
I would really appreciate it if someone could tell me what I need to do to fix this.
Thank you
Corinne
Download the .itf file and import it into the platform, you’ll get all the necessary settings that way.
Hi, I don’t know why but I cannot add the 1 minute Heikin candles on a 100 ticks TF (but the 2 minutes or more works)
Hi, this indicator was programmed for PRT 10.3 , I had to do the high TF detection by software which was difficult specially for the lower TF (seconds or ticks). The new timeframe instructions are easier to work with. Will update it ASAP to PRT 11