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

ACD Breakout Chart for Amibroker (AFL)
kaiji
almost 10 years ago
Amibroker (AFL)

Rating:
4 / 5 (Votes 2)
Tags:
amibroker

This is code for plotting ACD. The best place to find out more about ACD is this site ACD Info

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 5 years ago
Advanced Elliott Waves
Submitted by MarcosEn almost 8 years ago
3_6Day GuaiLiLv
Submitted by motorfly almost 8 years ago
Williams Alligator System
Submitted by durgesh1712 almost 8 years ago
Interactive Linear Regression Channel
Submitted by InternetWorm almost 8 years ago
*Level Breakout system*
Submitted by Tinych almost 8 years ago

Indicator / Formula

Copy & Paste Friendly
// ACD Plot
// LSMA is Linreg
// ACD.afl
// v 1.2 9/13/2004

SetChartBkColor(16);

Per = Param("Periods",13);
Per2 = Param("Periods 2",34);
LSMAPer = Param("LMSA Period",25);
Offset = Param("A Level",1);
ACDFlag = 0;
IntervalFlag = IIf(Interval(format=0)==300,1,0);

strInterval = Interval(format=2);

strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);


if( StrFind( Name(), "YM" ) )
{
 	ACDOffset = 10;
 	ACDFlag = 1;
 	ACDTime = 94500;
}

if( StrFind( Name(), "ER" ) )
{
 	ACDOffset = 0.5;
 	ACDFlag = 1;
 	ACDTime = 93500;
}

if( StrFind( Name(), "ES" ) )
{
 	ACDOffset = 2;
 	ACDFlag = 1;
 	ACDTime = 94500;
}

if( StrFind( Name(), "NQ" ) )
{
	ACDOffset = 3;
 	ACDFlag = 1;
 	ACDTime = 94500;
}

if( StrFind( Name(), "ZB" ) )
{
 	ACDOffset = 0.15;
 	ACDFlag = 1;
 	ACDTime = 83000;
}

if( StrFind( Name(), "ZN" ) )
{
	ACDOffset = 0.15;
 	ACDFlag = 1;
 	ACDTime = 83000;
}

GraphXSpace = 1;
Shift = 2;

// calculate the pivot range
PDH = TimeFrameGetPrice( "H", inDaily, -1 ); // gives previous Day High when working on intraday data
PDL = TimeFrameGetPrice( "L", inDaily, -1 );
PDC = TimeFrameGetPrice( "C", inDaily, -1 );
PP = (PDH+PDL+PDC)/3;

DIFF = abs((PDH+PDL)/2 - PP);
PRHi = PP + DIFF;
PRLo = PP - DIFF;

EMA1 = EMA(Avg,Per);
EMA2 = EMA(Avg,Per2);
LSMA = LinearReg(Avg, LSMAPer);

Plot(C, "Close",colorWhite,styleCandle);


if (ACDFlag AND IntervalFlag) {
	ORHigh= ValueWhen(TimeNum()<ACDTime,HighestSince(DateNum()>Ref(DateNum(),-1),High));
	ORLow = ValueWhen(TimeNum()<ACDTime,LowestSince(DateNum()>Ref(DateNum(),-1), Low));

	Plot(PRHi,"PRHigh",colorWhite,styleDots+styleNoLine+styleNoLabel);
	Plot(PRLo,"PRLow",colorWhite,styleDots+styleNoLine+styleNoLabel);
	Plot(ORHigh,"ORHigh",colorBlue,style=styleStaircase+styleDots+styleNoLine+styleNoLabel);
	Plot(ORLow,"ORLow",colorBlue,style=styleStaircase+styleDots+styleNoLine+styleNoLabel);
	Plot(ORHigh+ACDOffset,"AUp",colorYellow,style=styleStaircase+styleDots+styleNoLine);
	Plot(ORLow-ACDOffset,"ADn",colorYellow,style=styleStaircase+styleDots+styleNoLine);
	// Plot(LSMA, "LSMA", colorYellow,style=styleThick);
}

Title=Name()+" ["+strInterval+"] "+ strWeekday + " " +Date()+ " Close: "
+WriteVal(C,format=1.2) +" "+WriteVal(per,format=1.0)+"-Per MA: "
+WriteVal(EMA1,format=1.2)+" " + WriteVal(per2,format=1.0)+"-Per MA: "
+WriteVal(EMA2,format=1.2) + " PR High: "+WriteVal(PRHi,format=1.2) + " PR Low: " 
+WriteVal(PRLo,format=1.2);

1 comments

1. cdcaveman

now.. this is only set up to work for futures..
obviously you cant just put the below condition in and make it work for stocks..

if( StrFind( Name(), "AAPL" ) )
{
 	ACDOffset = 10;
 	ACDFlag = 1;
 	ACDTime = 94500;
}

Leave Comment

Please login here to leave a comment.

Back