Halftrend Dmi indicator
Forums › ProRealTime English forum › ProBuilder support › Halftrend Dmi indicator
- This topic has 1 reply, 2 voices, and was last updated 7 years ago by Nicolas.
-
-
10/23/2017 at 10:34 AM #49339
This i post a half year ago
Here i have made a kind of MACD indicator from the halftrend indicator from the Great NICOLAS, after the improvement from him , I want to shared with everybody.
The histogram is made from the difference of 2 HalfTrend indicator (one long and one short period), then a signal line, built with an average of 6 periods of the histogram values is added.This was not the only one i made from the halftrend indicator, i made another one, called halftrend Dmi indicator, but i was not sure of it was usebel, but after more observation , i decided to share it with everyone.
The halftrend code is from Nicolas, like above, i changed it a littll bit 🙂
Trades signals are the same like a normal DMI: long position when the HtDmiplus is crosses HtDmimin and above the zero line, short when the HtDmimin crosses HtDmiplus and above the zero line. The color changing is a early warning , you can close the trade of look at the normal DMI of look at the Halftrend indi for conformation.
Short signal when the HtDmimin crosses HtDmiplus and HtDmimin is above the zero level
Long signal when HtDmiplus is crosses HtDmimin and above the zero levelLOOK at COLOR CHANGING very important !!!!!!!!!!!!!!!!
Greetings to everyone and happy trading to all. Lucassen
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183//10.03.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//Amplitude1 = 2//Amplitude2 = 6//Amplitude3 = 30// -- HL #1lowpricei1 = Lowest[Amplitude1](low)highpricei1 = Highest[Amplitude1](high)lowma1 = average[Amplitude1](low)highma1 = average[Amplitude1](high)if barindex>Amplitude1 thenif(nexttrend1=1) thenmaxlowprice1=Max(lowpricei1,maxlowprice1)if(highma1<maxlowprice1 and Close<Low[1]) thentrend1=1.0nexttrend1=0minhighprice1=highpricei1endifendifif(nexttrend1=0) thenminhighprice1=Min(highpricei1,minhighprice1)if(lowma1>minhighprice1 and Close>High[1]) thentrend1=0.0nexttrend1=1maxlowprice1=lowpricei1endifendifif(trend1=0.0) thenif(trend1[1]<>0.0) thenup1=down1[1]elseup1=Max(maxlowprice1,up1[1])endifdown1=0.0elseif(trend1[1]<>1.0) thendown1=up1[1]elsedown1=Min(minhighprice1,down1[1])endifup1=0.0endifendif// -- HL #2lowpricei2 = Lowest[Amplitude2](low)highpricei2 = Highest[Amplitude2](high)lowma2 = average[Amplitude2](low)highma2= average[Amplitude2](high)if barindex>Amplitude2 thenif(nexttrend2=1) thenmaxlowprice2=Max(lowpricei2,maxlowprice2)if(highma2<maxlowprice2 and Close<Low[1]) thentrend2=1.0nexttrend2=0minhighprice2=highpricei2endifendifif(nexttrend2=0) thenminhighprice2=Min(highpricei2,minhighprice2)if(lowma2>minhighprice2 and Close>High[1]) thentrend2=0.0nexttrend2=1maxlowprice2=lowpricei2endifendifif(trend2=0.0) thenif(trend2[1]<>0.0) thenup2=down2[1]elseup2=Max(maxlowprice2,up2[1])endifdown2=0.0elseif(trend2[1]<>1.0) thendown2=up2[1]elsedown2=Min(minhighprice2,down2[1])endifup2=0.0endifendifif up2>0 thenhalftrend2 = up2elsehalftrend2 = down2endif// -- HL #3lowpricei3 = Lowest[Amplitude3](low)highpricei3 = Highest[Amplitude3](high)lowma3 = average[Amplitude3](low)highma3= average[Amplitude3](high)if barindex>Amplitude3 thenif(nexttrend3=1) thenmaxlowprice3=Max(lowpricei3,maxlowprice3)if(highma3<maxlowprice3 and Close<Low[1]) thentrend3=1.0nexttrend3=0minhighprice3=highpricei3endifendifif(nexttrend3=0) thenminhighprice3=Min(highpricei3,minhighprice3)if(lowma3>minhighprice3 and Close>High[1]) thentrend3=0.0nexttrend3=1maxlowprice3=lowpricei3endifendifif(trend3=0.0) thenif(trend3[1]<>0.0) thenup3=down3[1]elseup3=Max(maxlowprice3,up3[1])endifdown3=0.0elseif(trend3[1]<>1.0) thendown3=up3[1]elsedown3=Min(minhighprice3,down3[1])endifup3=0.0endifendifif up3>0 thenhalftrend3 = up3elsehalftrend3 = down3endifreturn (halftrend2 - halftrend3),average[6] (halftrend2 - halftrend3)10/30/2017 at 11:23 AM #50917 -
AuthorPosts
Find exclusive trading pro-tools on