log in     sign up for free
 
Combine your enthusiasm, energy, focus, devotion, and discipline to becoming the best trader you can be, but once you have done that, there is no point in agonizing over the details.
Jack D. Schwager
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Heikin Ashi II

Formula for: TradeStation

indicator


 

 

Views:  1751

Added: June 02, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 
Your Ad Here
Here's an indicator version. I use it with an audio alert with "enable alert" set on and "disable alert once hit" unchecked. It will alert only once per bar if trend changes. I also uncheck "update value intra-bar" so that I don't get confused by multiple changes during bar formation. It works better for me with longer timeframe bars.

 

 



Code:

Type : Indicator, Name : Heikin Ashi II

{ HA Indicator 1/21/04

uses modified Heikin-Ashi technique
Designed for a Subgraph below main chart

plots cross as UpColor for up trend
plots cross as DnColor for dn trend

alerts when trend changes...will alert only once
per bar (thanks to eKam and others for this)

}
inputs: UpColor(green),DnColor(red),CompBars(0);

vars: haClose(0),haOpen(0),haHigh(0),haLow(0),
color(0),AlertTime(0),TextID(-1);

if BarNumber = 1 then
begin
haOpen = open;
haClose = (O+H+L+C)/4;
haHigh = MaxList( high, haOpen, haClose);
haLow = MinList( low, haOpen,haClose);
TextId = Text_New( date, time, 0, "A" );
end;

if BarNumber > 1 then
begin
haClose = (O+H+L+C)/4;
haOpen = (haOpen [1] + haClose [1])/2 ;
haHigh = MaxList(High, haOpen, haClose) ;
haLow = MinList(Low, haOpen, haClose) ;

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;

plot1(0,"HA",color);

if color <> color[1] then
begin
AlertTime = text_GetTime(TextID);
if AlertTime <> time then
begin
if color = DnColor then
alert(GetSymbolname + NumToStr(BarInterval,0)+" minute trend is down no pro blame oh ");
if color = UpColor then
alert(GetSymbolname + NumToStr(BarInterval,0)+" minute trend is up all bee back");

text_SetLocation(TextID,date,time,0);
end;
end;
end;

 





Source: http://www.tradestation.com

 

View similar (indicator for TradeStation):

Mov Avg X 2_20
Seasonal SB
Moving Beyond the Closing Price
Close From One Day To The Next
Tether Line
DIMA Averages
Weekly Hi-Lo Lines
IE/2
Gap-Trading System
TrendArea_2 Indicator
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012