# Kagi Chart

 Discuss Kagi Chart at the AmiBroker within the Traderji.com; Hello everyone, I wanted to know if there is a Kagi chart for AmiBroker. I ...

 User Name Remember Me? Password
 Register FAQ Calendar Search Today's Posts Mark Forums Read

#1
13th October 2011, 09:05 PM
 Member Join Date: Oct 2011 Location: Napoli (Italia) Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts
Kagi Chart

Hello everyone, I wanted to know if there is a Kagi chart for AmiBroker. I would like to MetaStock. I found something on the internet, but it's not what I wanted.
Thank you.
 Sorry your browser does not support IFRAME

## Looking for a share broker?

#2
14th October 2011, 05:37 PM
 Member Join Date: Aug 2010 Posts: 50 Thanks: 17 Thanked 16 Times in 11 Posts
Re: Kagi Chart

_SECTION_BEGIN("Kagi Chart");
//------------------------------------------------------------------------------
//
// Formula Name: Kagi Chart
// Author/Uploader: Graham Kavanagh
// E-mail: gkavanag@bigpond.net.au
// Date/Time Added: 2002-11-29 05:12:31
// Origin:
// Keywords: Kagi
// Level: medium
// Flags: system,indicator
// Formula URL: http://www.amibroker.com/library/formula.php?id=236
// Details URL: http://www.amibroker.com/library/detail.php?id=236
//
//------------------------------------------------------------------------------
//
// Kagi swing chart with change based on share price. Swing ranges from 3 to
// 5%.
//
// Place in indicator builder.
//
//------------------------------------------------------------------------------

//KAGI Chart (or Swing) for Amibroker Indicator window.
//Reverse swing is 3%.
//Graham Kavanagh 16 Nov 2002

SetBarsRequired(100000,100000);

Close = IIf( C<10, round(C*10)/10, IIf( C>=10 AND C<50, int(C) + round(round(frac(C)*10)/5)*5/10, int(C)));

Reverse = LastValue(IIf(C<50,0.05,IIf(C>=50 AND C<100,0.04,0.03)));

EnableScript("jscript");
<%

Close = VBArray( AFL( "Close" ) ).toArray();

KC = new Array();

// initialize first element
j = 0;
KC[j] = Close[0];

down = 1; // By default the first bar is a down bar.
up = 0;
swap = 0;

// perform the loop that produces Kagi Chart
for( i = 1; i < Close.length; i++ )
{
Reverse =AFL("Reverse"); // percent reversal requirement

if( Close[i] <= KC[j] && down) //continue down
{
KC[j] = Close[i];
}
else
{
if( Close[i] >= KC[j]*(1 + Reverse) && down) //Change direction to up
{
j++;
swap = 1;

KC[j] = Close[i];
}
}
if( Close[i] >= KC[j] && up) //Continue up
{
KC[j] = Close[i];
}
else
{
if( Close[i] <= KC[j]*(1 - Reverse) && up) //Change direction to down
{
j++;

KC[j] = Close[i];
swap = 1;
}
}
if( swap )
{
swap = 0;
if( up )
{
up = 0;
down = 1;
}
else
{
up = 1;
down = 0;
}
}
}
delta = Close.length - j-1; //to get all of chart

AFL.Var("KC") = KC;
AFL.Var("delta") = delta;
AFL.Var("Reverse") = Reverse;

%>

KC = Ref( KC, -delta );
C = KC;
L = LLV(C,2);
H = HHV(C,2);

MyColor =
IIf(C>Ref(H,-2),colorBlue,
IIf(C<Ref(L,-2),colorRed,
colorBlack));
Graph0BarColor = MyColor;
Graph0Style = 512+4096;
GraphXSpace = 5;
Graph0 = C;
Graph0Name = "Kagi Chart";
Graph1BarColor = 1;
Graph1Style = 16+2048+4096;
Graph1 = Reverse*100;
Graph1Name = "Reverse %";
_SECTION_END();

 Bookmarks

 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 OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

 Similar Threads for: Kagi Chart Thread Thread Starter Forum Replies Last Post manojsai Technical Analysis 4 19th October 2012 04:50 PM bighunk Advanced GET 0 29th June 2011 09:30 PM newbie_7 Equities 2 21st April 2010 09:28 PM yccheok Software 0 10th February 2010 12:19 AM sar79 Technical Analysis 3 2nd April 2007 06:58 PM

All times are GMT +5.5. The time now is 08:05 PM.

Indemnity, Disclaimer & Disclosure Notice:
* By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum/site.
* Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
* Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
* All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy or legality of any information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. Although we constantly delete all irrelevant content and/or SPAM, if you should find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.

 Advertise With Us - Forum Rules - Contact Us - Home - Archive - Privacy Statement - Top

Our Partner Websites: www.chittorgarh.com, IPO Investment Portal | www.topsharebrokers.com, Broker Comparision