Heikin Ashi Trend Indicator - Page 2 - Traders Laboratory

Go Back   Traders Laboratory > Trading Resources > Trading Indicators

Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL.

Comment
 
LinkBack (1) Release Tools Display Modes
 
Old 12-27-2006, 08:14 AM
Soultrader's Avatar
Soultrader Soultrader is offline
Soultrader is looking for a green card.

Trader Specs
 
Join Date: Aug 2006
Location: Tokyo, Japan
Posts: 3,089
Thanks: 114
Thanked 373 Times in 150 Posts
Send a message via Skype™ to Soultrader
Heikin Ashi Trend Indicator

Here's an interesting indicator I picked off at the TS forum. It's a slightly modifed version of the heikin ashii indicator.

So What Does It Do?

If the 5th bar of the last 5 bars closes above the 50% line of the previous 5 bar average, it stays the same color. If the 5th bar closes below the the 50% average it changes color.

50% range = Average True Range

It really depends on how you want to use it. This can be applied on...

__________________
James Lee
Email: JamesLee@traderslaborator y.com
Skype: james.lee03
TradersLaboratory.com
**********************
Empowering traders with knowledge.
Reply With Quote
  #8 (permalink)  
By JayRemy on 12-27-2006, 05:14 PM
Re: Heikin Ashi Trend Indicator

thanks nick,

the brick indictaor looked a bit too much for me, but the squeeze and ttm trend look pretty cool. I never really thought about looking at the tradestation forums, so thanks for the tip :p

Do people make money with these indicators? I've always thought indicators were a waste of time but these look ok!

ah! that workspace looked interesting although i dont really know what the WPCVA or ESINK is Although, I trade the YM myself.

cheers, jay.
Reply With Quote
  #9 (permalink)  
By nicknextmove on 12-27-2006, 06:15 PM
Re: Heikin Ashi Trend Indicator

Not sure if people are making money with this. I am however studying it.

$ESINX = S&P 500 premium. (This is from the CME).

$WPCVA = put/call ratio. (Will cost you $1/month to subscribe from ARCA)

I have uploaded videos regarding the two here, since they were too big for this forum:

RapidShare Link to videos
Reply With Quote
  #10 (permalink)  
By JayRemy on 12-27-2006, 08:24 PM
Re: Heikin Ashi Trend Indicator

thanks for those videos nick - are they from the live trading room from trade the markets.com. - i always wanted to know what it looked like in there :p

are you a member at tradethemarkets.com. I always fancied joining up, but its a bit expensive without really knowing if its any good!
Reply With Quote
  #11 (permalink)  
By nicknextmove on 12-27-2006, 10:04 PM
Re: Heikin Ashi Trend Indicator

No - they are free videos. You can sign up for the free videos at their website.
Reply With Quote
  #12 (permalink)  
By dfmccarty on 02-06-2007, 06:50 PM
Re: Heikin Ashi Trend Indicator

Could you guys post the source code for these indicators. I don;t run TS but I'm trying to adapt these indicators to my charting package. Thanks
Reply With Quote
  #13 (permalink)  
By Kiwi on 02-06-2007, 08:58 PM
Re: Heikin Ashi Trend Indicator

Here it is in C++

BaseDataIn 0 is open, 1 is high, 2 is low and 3 is close:

int pos, updn=0;
float jO=0, jH, jL, jC=0, jHm1, jLm1;
sg.DataStartIndex=15;

jL=sg.BaseDataIn[4][0]; jO=jL; jC=jL; jH=jL;
for (pos=5; pos < sg.ArraySize; pos++)
{
jHm1=jH;
jLm1=jL;
jO=(jO+jC)/2;
jC=(sg.BaseDataIn[0][pos]+sg.BaseDataIn[1][pos]+sg.BaseDataIn[2][pos]+sg.BaseDataIn[3][pos])/4;

if(jO>sg.BaseDataIn[1][pos] && jO>jC) jH=jO; else if(jC>sg.BaseDataIn[1][pos]) jH=jC; else jH=sg.BaseDataIn[1][pos];
if(jO<sg.BaseDataIn[2][pos] && jO<jC) jL=jO; else if(jC<sg.BaseDataIn[2][pos]) jL=jC; else jL=sg.BaseDataIn[2][pos];

if(jH>jHm1 && jL>=jLm1) {updn=1;} else
if(jL<jLm1 && jH<=jHm1) {updn=-1;};

if((sg.Input[2].FloatValue!=1 && sg.Input[2].FloatValue!=-1) || (sg.Input[2].FloatValue==1 && updn==1) || (sg.Input[2].FloatValue==-1 && updn==-1))
{
sg.Subgraph[0].Data[pos]=jO;
sg.Subgraph[1].Data[pos]=jH;
sg.Subgraph[2].Data[pos]=jL;
sg.Subgraph[3].Data[pos]=jC;
};
}
Reply With Quote
  #14 (permalink)  
By GCB on 02-06-2007, 09:55 PM
Re: Heikin Ashi Trend Indicator

I've always been curious about the Bricks indicator. But I installed this one and it locked up TS on me.
Reply With Quote
  #15 (permalink)  
By nicknextmove on 02-09-2007, 06:47 PM
Re: Heikin Ashi Trend Indicator

This is the code for the TTM Trend:

{ ModHA PaintBarStudy 1/20/04 modified Heikin-Ashi technique compares current bar open to close range with prior bars...if current is within prior then color remains the same Taken from https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=22399 Modified by mm to make it more like TTM Trend - appears to match www.tradethemarkets.com } inputs: CompBars(6), UpColor(Blue), DnColor(Red), BarWidth(1); vars: haClose(0), haOpen(0), color(0); if BarNumber = 1 then begin haOpen = open; haClose = (O+H+L+C)/4; end; if BarNumber > 1 then begin haClose = (O+H+L+C)/4; haOpen = (haOpen [1] + haClose [1])/2 ; { ................................................................................ } if haClose > haOpen then color = UpColor else color = DnColor; for value1 = 1 to CompBars begin if haOpen <= MaxList(haOpen[value1],haClose[value1]) and haOpen >= MinList(haOpen[value1],haClose[value1]) and haClose <= MaxList(haOpen[value1],haClose[value1]) and haClose >= MinList(haOpen[value1],haClose[value1]) then color = color[value1]; end; { ................................................................................ } // plotPB(haOpen,haClose,"heikin-ashi",color); plotPB(High,Low,"heikin-ashi",color); SetPlotWidth(1,BarWidth); SetPlotColor(1,color); end; { ................................................................................ }
Reply With Quote
  #16 (permalink)  
By nicknextmove on 02-09-2007, 06:48 PM
Re: Heikin Ashi Trend Indicator

This is the code for the Squeeze aka BB Squeeze:

[LegacyColorValue = true]; {@@14439@@} {04/05/2006} //Updated by TradingDude, fixed "division by zero error" {02/16/2005} {Updated by Redlock} { Well, I have been working in this indicator. I have made a couple of changes: (1) that if the momentum changes direction, it changes color. (2) I have taken out the plotting of the alertline (3) have the dots plotted along the axis (4) Have changed the name of the indicator to BBSqueeze (cuts down on confusion). I think that you will find that it resembles what is on the TTM indicator.} {------------------------------------------------------------------} {mmillar, 05/12/2005 For anyone interested I made a small change to the indicator(s) above. I found that the indicator displayed fine for ES, YM etc but screwed up for FX - this is due to the number of decimal places used by the symbol. I just added a multiplier so the indicator is normalised across all symbols. Add the following lines... Vars: LHMult(0); if ( barnumber=1 ) then Begin LHMult=pricescale/minmove; end; And modify the following line so that it includes the LHMult variable... Plot3(value2*LHMult, "NickmNxtMove", color); } { Bolinger Band Squeeze (BBS) Indicator } { A variation of an idea by nickm001 (Originally coded by eKam) that when Bollinger Bands (BB) fit inside the Keltner Channel (KC), a breakout is about to occur. It works on longer term charts, such as 15 minute to daily charts. This code creates an indicator that plots the ratio of BB width to KC width. When BB and KC widths are the same, the ratio (BBS_Ind)is equal to one (1). When the BB width is less than the KC Width (i.e. BB fit inside KC), the BBS_Ind is less than one and a breakout is indicated. An Alert Line is provided to indicate the level at which the trader considers that the "sqeeze is on" and a breakout is eminant. Coded by Kahuna 9/10/2003 Added by eKam: 9/10/2003 The average of where price has been relative to the Donchian mid line and Exponential average of the same length is also plotted as an attempt to predict the direction of the breakout. Added 2/1/2005 For decreasing Delta bar....darker colors to highlight the change.} Inputs: {------------------------------------------------} Price(Close), Length(20), { Length for Average True Range (ATR) & Std. Deviation (SD) Calcs } nK(1.5), { Keltner Channel ATRs from Average } nBB(2), { Bollinger Band Std. Devs. from Average } AlertLine( 1 ), { BBS_Index level at which to issue alerts } NormalColor( Red ), { Normal color for BBS_Ind } AlertlColor( Blue ); { Color for BBS_Ind below alert line } Variables: {---------------------------------------------} ATR(0), { Average True Range } SDev(0), { Standard Deviation } BBS_Ind(0), { Bollinger Band Squeeze Indicator } alertTextID(-1), Denom(0), LHMult(0); if ( barnumber=1 ) then Begin If minmove <> 0 then LHMult = pricescale/minmove; end; if barnumber = 1 and alertTextID = -1 then alertTextID = Text_New(date,time,0,"dummy"); {-- Calculate BB Squeeze Indicator ----------------------} ATR = AvgTrueRange(Length); SDev = StandardDev(Price, Length, 1); Denom = (nK*ATR); If Denom <> 0 then BBS_Ind = (nBB * SDev) /Denom; If BBS_Ind < Alertline then SetPlotColor(1, NormalColor) else SetPlotColor(1, AlertlColor); {-- Plot the Index & Alert Line -------------------------} Plot1(0, "BBS_Ind"); {-- Plot delta of price from Donchian mid line ----------} value2 = LinearRegValue(price-((Highest(H, Length)+Lowest(L, Length))/2 + xAverage(c,Length))/2,Length,0); var:color(0); color = yellow; if value2 > 0 then if value2 > value2[1] then color = green else color = darkgreen; if value2 < 0 then if value2 < value2[1] then color = red else color = darkred; Plot3(value2*LHMult, "NickmNxtMove", color); {plot3(value2,"BB Squeeze",color);} {-- Issue Alert when the Squeeze is On ------------------} if BBS_Ind crosses below AlertLine and Text_GetTime(alertTextID) <> time then begin text_setLocation(alertTextID, date, time, 0); Alert("Check for Squeeze Setups on " + SymbolName); end; {-- Issue Alert when the Squeeze Releases ---------------} if BBS_Ind crosses above AlertLine and Text_GetTime(alertTextID) <> time then begin text_setLocation(alertTextID, date, time, 0); Alert("Squeeze is Over on " + SymbolName); end; if BBS_Ind crosses below AlertLine then SetPlotColor(1, Green);
Reply With Quote
  #17 (permalink)  
By nicknextmove on 02-09-2007, 06:50 PM
Re: Heikin Ashi Trend Indicator

This is the code for the 3 Bricks Reversal:

[LegacyColorValue = true]; {********************************************************* 3_LineBrk_V4 Modified 2/12/04 WAV added input to show/hide paintbars (true/false) added input to show/hide brk line (true/false) added input for BrkLine length alert once per bar only use: how to hide regular price bars ( format symbol, style, BarType to Line on Close or dot, color to chart background or similar ) ********************************************************** "3 Brick Reversal" Modified and Renamed 06/21/06 PatientTrader (Lonnie VanZandt) added TrendLine drawing to draw the tops and bottoms of the "bricks" cleaned up the Alert reporting added a vertical Trendline as the last PaintBar of a box prior to a new box, to close the box cleanly. The end result is visually identical to John Carter and Hubert's "TTM Bricks" indicator. I compared the transitions to those in "Mastering the Trade" and they appear to match. (Note that Figure 11.8 (@YM Daily) in that book does not match the 2006 data for @YM for Fourth Quarter 2006. Odd... } inputs: TrendWeight(2), ShowPB(True), UpColor(Cyan), DnColor(Red); vars: TrendLeading(-1), TrendTrailing(-1), LastPb(-1), LastHigh (0),LastLow(0),DrawColor(0), AlertTime(0); arrays: LineH[2](0), LineL[2](0), color[2](0); if BarNumber = 1 then begin LastHigh = h; LastLow = l; end; {-------------------------------------- handle first 3 lines separately ---------------------------------------} If BarNumber = 4 then begin for value1 = 0 to 2 begin if c[value1+1] > LastHigh then begin LineH[0] = c[value1+1]; LineL[0] = LastHigh; color[0] = UpColor; LastLow = LastHigh; LastHigh = c[value1+1]; end else if c[value1+1] < LastLow then begin LineL[0] = l[value1+1]; LineH[0] = LastLow; color[0] = DnColor; LastHigh = LastLow; LastLow = c[value1+1]; end; end; end else {-------------------------------------- long side ---------------------------------------} begin { see if close > high of last 3 lines } if c > MaxList(LineH[0],LineH[1],LineH[2]) then begin { see if last line was down color...if so then break } if color[2] = DnColor then begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineL[2] ); TrendLeading = TL_New( Date, Time, Close, Date, Time, Close ); TL_SetSize( TrendLeading, TrendWeight ); TL_SetColor( TrendLeading, UpColor ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineH[2] ); TrendTrailing = TL_New( Date, Time, LineH[2], Date, Time, LineH[2] ); TL_SetSize( TrendTrailing, TrendWeight ); TL_SetColor( TrendTrailing, UpColor ); if AlertTime <> time then begin AlertTime = time; alert("Brick Reversal Long Setup on " + GetSymbolName + "."); end; end else begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineH[2] ); TrendLeading = TL_New( Date, Time, Close, Date, Time, Close ); TL_SetSize( TrendLeading, TrendWeight ); TL_SetColor( TrendLeading, UpColor ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineL[2] ); TrendTrailing = TL_New( Date, Time, LineH[2], Date, Time, LineH[2] ); TL_SetSize( TrendTrailing, TrendWeight ); TL_SetColor( TrendTrailing, UpColor ); end; for value1 = 0 to 1 begin LineH[value1] = LineH[value1+1]; LineL[value1] = LineL[value1+1]; color[value1] = color[value1+1]; end;{for value1} LineH[2] = c; LineL[2] = LastHigh; LastLow = LastHigh; LastHigh = c; color[2] = UpColor; DrawColor = UpColor; LastPb = TL_New( Date, Time, LineH[1], Date, Time, LineL[1] ); TL_SetSize( LastPb, 1 ); TL_SetColor( LastPb, color[1] ); end else begin {-------------------------------------- short side ---------------------------------------} { see if close < low of last 3 lines } if c < MinList(LineL[0],LineL[1],LineL[2]) then begin { see if last line was up color...if so then break } if color[2] = UpColor then begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineH[2] ); TrendLeading = TL_New( Date, Time, Close, Date, Time, Close ); TL_SetSize( TrendLeading, TrendWeight ); TL_SetColor( TrendLeading, DnColor ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineL[2] ); TrendTrailing = TL_New( Date, Time, LineL[2], Date, Time, LineL[2] ); TL_SetSize( TrendTrailing, TrendWeight ); TL_SetColor( TrendTrailing, DnColor ); if AlertTime <> time then begin AlertTime = time; alert( "Brick Reversal Short Setup on " + GetSymbolName + "."); end; end else begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineL[2] ); TrendLeading = TL_New( Date, Time, Close, Date, Time, Close ); TL_SetSize( TrendLeading, TrendWeight ); TL_SetColor( TrendLeading, DnColor ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineH[2] ); TrendTrailing = TL_New( Date, Time, LineL[2], Date, Time, LineL[2] ); TL_SetSize( TrendTrailing, TrendWeight ); TL_SetColor( TrendTrailing, DnColor ); end; for value1 = 0 to 1 begin LineH[value1] = LineH[value1+1]; LineL[value1] = LineL[value1+1]; color[value1] = color[value1+1]; end;{for value1} LineL[2] = c; LineH[2] = LastLow; LastHigh = LastLow; LastLow = c; color[2] = DnColor; DrawColor = DnColor; LastPb = TL_New( Date, Time, LineH[1], Date, Time, LineL[1] ); TL_SetSize( LastPb, 1 ); TL_SetColor( LastPb, color[1] ); end else begin if ( DrawColor = UpColor ) then begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineH[2] ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineL[2] ); end else begin if TL_Exist( TrendLeading ) then TL_SetEnd( TrendLeading, Date, Time, LineL[2] ); if TL_Exist( TrendTrailing ) then TL_SetEnd( TrendTrailing, Date, Time, LineH[2] ); end; end; end; end; if ShowPB then begin Plot1(LineH[2], "LineHigh",DrawColor); Plot2(LineL[2], "LineLow" ,DrawColor); end;
Reply With Quote
Comment

LinkBacks (?)
LinkBack to this Thread: http://www.traderslaboratory.com/forums/f46/heikin-ashi-trend-indicator-951.html
Posted By For Type Date
Heikin ... This thread Refback 02-28-2007 12:43 AM


Currently Active Users Viewing This Release: 1 (0 members and 1 guests)
 
Release Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Release Release Starter Category Comments Last Post
Trend Following Systems Soultrader Data Feeds 7 03-06-2007 10:58 AM
Trend Trading vs Counter Trend Trading Soultrader Technical Analysis 9 10-29-2006 11:32 AM
Trend Continuation Setup Soultrader Technical Analysis 0 09-26-2006 11:31 PM
Consolidation after a trend day Soultrader E-mini Futures 0 09-06-2006 09:04 AM


All times are GMT -4. The time now is 12:38 PM.

 


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 62 63