Click here to Login





                                                   Heikin Ashi Oscillator

  0

0
allan nathan
2013-01-27 17:52:42


Hi,
Does anyone have the Amibroker version of the Heikin Ashi Oscillator?
Here it is in Amibroker form

function ZeroLagTEMA( array, period )
{
TMA1 = TEMA( array, period );
TMA2 = TEMA( TMA1, period );
Diff = TMA1 - TMA2;
return TMA1 + Diff ;
}

/////////////////////
// Heikin-Ashi code
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );

avp = Param("Up TEMA avg", 34, 1, 100 );
avpdn = Param("Dn TEMA avg", 34, 1, 100 );

// Velvoort is using not original, but modified Heikin-Ashi close
HaClose = ( HaClose + HaOpen + Max( H, HaOpen ) + Min( L, HaOpen ) )/4;

// up average
ZlHa = ZeroLagTEMA( HaClose, avp );
ZlCl = ZeroLagTEMA( ( H + L ) / 2, avp );
ZlDif = ZlCl - ZlHa;

keep1 = Hold( HaClose >= HaOpen, 2 );
keep2 = ZlDif >= 0;
keeping = keep1 OR keep2;
keepall = keeping OR ( Ref( keeping, -1 ) AND ( C > O ) OR C >= Ref( C, -1 ) );
keep3 = abs( C - O ) < ( H - L ) * 0.35 AND H >= Ref( L, -1 );
utr = keepall OR ( Ref( keepall, -1 ) AND keep3 );

// dn average
ZlHa = ZeroLagTEMA( HaClose, avpdn );
ZlCl = ZeroLagTEMA( ( H + L ) / 2, avpdn );
ZlDif = ZlCl - ZlHa;

keep1 = Hold( HaClose < HaOpen, 2 );
keep2 = ZlDif < 0;
keeping = keep1 OR keep2;
keepall = keeping OR ( Ref( keeping, -1 ) AND ( C < O ) OR C < Ref( C, -1 ) );
keep3 = abs( C - O ) < ( H - L ) * 0.35 AND L <= Ref( H, -1 );
dtr = keepall OR ( Ref( keepall, -1 ) AND keep3 );

upw = dtr == 0 AND Ref( dtr, -1 ) AND utr;
dnw = utr == 0 AND Ref( utr, -1 ) AND dtr;

Haco = Flip( upw, dnw );


if( ParamToggle("Chart Type", "Price with color back|HACO wave" ) )
{
Plot( Haco, "Haco", colorRed );
}
else
{
Plot( C, "Close", colorBlack,
ParamStyle( "Style", styleCandle, maskPrice ) );
Plot( 1, "", IIf( Haco , colorPaleGreen, colorRose ),
styleArea | styleOwnScale, 0, 1 );



dare2
2013-01-27 19:51:59

  0

Not sure I understand your question Allan. You are asking for the code that you posted? Or, you are offering to others?

Darrell



allan nathan
2013-01-27 21:09:52

  0

Sorry..That is the Amibroker code.I would appreciate it if someone had a QS version

Allan



dare2
2013-01-27 21:34:00

  0

Sorry I cannot help you. I have also posted the Amibroker code for the Market Facilitation Index in the hope of someone being able to translate it into QS.

Darrell



QuantShare
2013-01-28 16:47:42

  0

Heikin Ashi is already implemented in QuantShare. Select "View -> Chart Style".



dare2
2013-01-28 17:45:10

  0

Allan is looking for the oscillator, not the chart style.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Klinger Volume Oscillator
DV Intermediate Oscillator (DVI)
Trading System Based on the CloseHL Percent Rank Oscillator
CloseHL Percent Rank Oscillator
Forecast Oscillator

How-to Lessons
How to display two stocks on the same chart
How to download and use U.S. stocks earnings data
How to display notes/commentaries on a chart
How to associate an index with a list of stocks
How to create trading rules based on Put and Call volume data

Related Forum Threads
Heikin Ashin RSI crossover
heiken ashi
Price Momentum Oscillator (PMO)
Heiken ashi and Renk chart types in stratregy code?
Ehlers Simple Decycler and Decycle Oscillator

Blog Posts
Different Types of Trading Indicators: Trend, Momentum, Volatilit...
Learn How to Create Your Own Technical Analysis Indicators
How to Pick the Best Trend Indicators
How to measure market strength with the composite tool
Volatility and trading systems









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.