Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Tiger ZIG-ZAG (swing cum positional trade) for Amibroker (AFL)

Rating:
5 / 5 (Votes 3)
Tags:
amibroker, zigzag

Dear Friends, am catch the formula from website, am test the same, am sure very nice one. THE MAIN FORMULA NAME IS ZIG-ZAG REVERSAL INDICATOR, friends try to use and enjoy, very enjoyful.

Screenshots

Similar Indicators / Formulas

Zig-Hi-Zag-Lo
Submitted by xavier over 12 years ago
ZigZag
Submitted by muthumkm almost 14 years ago
alcoba zigzag modified
Submitted by radenmasmaksum about 13 years ago
RSI with AUTO SEC
Submitted by gvdevan about 14 years ago
Wave Indicator
Submitted by nicotan78 about 14 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Reversal");
Reversal = Param( _DEFAULT_NAME(), 01.0,0.01,20,0.01);
_SECTION_END();

ZigZArray = Avg;
ZigZArray = Null;

ValFromPro=0;
ValToPro=0;
ValRead=0;

BarFromPro=0;
BarToPro=0;
BarRead=0;

ProcessUndef = 10;
ProcessIncrease = 11;
ProcessDecrease = 12;

Process = ProcessUndef;
ValFromPro=Avg[0];
ValToPro=Avg[0];
BarFromPro=0;
BarToPro=0;
BarRead=0;

function FillLine( startbar, startval, endbar, endval )
{
	for( j = startbar; j <= endbar; j++ )
	{
		ZigZArray[ j ] = startval + (( j - startbar) * (endval-startval)/( endbar - startbar ));
	}
}

function TrtUndef( )
{
	if ( ValRead > ( ((100 + Reversal)/100 ) * ValFromPro ) )///If rupture Increase
	{
		Process = ProcessIncrease;
		ValToPro=ValRead;
		BarToPro=BarRead;
	}
	else
	{
		if ( ValRead < ( ((100- Reversal)/100 ) * ValFromPro ) )  // If rupture Decrease
		{
			Process = ProcessDecrease;
			ValToPro=ValRead;
			BarToPro=BarRead;
		}
		else
		{
			Process = ProcessUndef;
		}
	}
}

function TrtIncrease( )
{
	if ( ValRead > ValToPro )  // Still Increase
	{
		Process = ProcessIncrease;
		ValToPro=ValRead;
		BarToPro=BarRead;
	}
	else   // Break Increase Process
	{
		if ( ValRead <  ( ((100- Reversal)/100 ) * ValToPro ) )   // If break Decrease
		{
			Process = ProcessDecrease;
			ValFromPro=ValToPro;
			BarFromPro=BarToPro;
			ValToPro=ValRead;
			BarToPro=BarRead;
		}
	}
}

function TrtDecrease( )
{
	if ( ValRead < ValToPro )  // Still Decrease
	{
		Process = ProcessDecrease;
		ValToPro=ValRead;
		BarToPro=BarRead;
	}
	else  // Break Decrease Process
	{
		if ( ValRead >  ( ( (100+ Reversal)/100 ) * ValToPro ) ) // If break Decrease
		{
   		   Process = ProcessIncrease;
			ValFromPro=ValToPro;
			BarFromPro=BarToPro;
			ValToPro=ValRead;
			BarToPro=BarRead;
		}
	}
}


for( i = 1; i < BarCount; i++ )
{
	ValRead = Avg[i];
	BarRead = i;

	if ( Process == ProcessUndef )
	{
		TrtUndef();
	}
	else
	{
		if ( Process == ProcessIncrease )
		{
			TrtIncrease();
		}
		else
		{
			TrtDecrease();
		}
	}

	if ( BarToPro == BarRead )
		FillLine( BarFromPro, ValFromPro, BarToPro, ValToPro );
	else
		FillLine( BarToPro, ValToPro, BarRead, ValRead );
}


_SECTION_BEGIN("avg");
SetChartOptions(0,chartShowArrows);
Plot( Avg, _DEFAULT_NAME(), ParamColor("Color", colorBlack ), ParamStyle("Style", styleLine + styleDots, maskPrice ) ); 
_SECTION_END();

 _SECTION_BEGIN("ZigZArray");
Plot( ZigZArray, _DEFAULT_NAME(), ParamColor("Color", colorRed ), ParamStyle("Style", styleLine + styleThick) ); 
_SECTION_END();

5 comments

1. vaenu999

how we trade with this afl plz details

2. tigernifty

Vaenu999, EACH AND EVERY “V” SHAPE AND INVERTED “V” SHAPE IS A TURNING POINT OF BUY-SELL, SO TRADE ACCORDINGLY. THANK YOU FOR UR INTEREST. ALL THE BEST.

3. dalmas

Sorry, but ….

it is NOT clear to me what is the dfference between this code and the built-in command:
Zig(Array, change) .
Have You tried it ??

Regards

4. puduags

Scanning the stock facility is not there in this AFL. Which are the stocks to trade today ? Please post.

5. chandramohan

sir,

please let me know, what are the parameters best suited for 1 minute or 2 minute time frame

Leave Comment

Please login here to leave a comment.

Back