Thomas,
That was quick service and most appreciated. I note in using this
formula it produces a straight up trending line at about 45 degrees (
no down trends). With the past 8 month of many more declines than
advances should this be occurring? I was expecting to see a AD line
that trends more in line with the market. Do I need a different
formula to achieve this?
Thanks again for your quick help.

Dick

--- In [email protected], "Thomas Z." <[EMAIL PROTECTED]> wrote:
>
> I've corrected your code...
> 
> _SECTION_BEGIN("ADLine Clssic");
> 
> aI = Foreign("~StocksAdv","X");
> dI = Foreign("~StocksDec", "X");
> UncI = Foreign("~StocksNC","X");
> ad = aI / dI;
> 
> Difference = (aI)-(DI) / ( UncI + 1 );
> DiffSqrt = IIf( Difference > 0, sqrt( Difference ), - sqrt( -
> Difference ) );
> //ADLine = (Cum(DiffSqrt ));
> //Plot (Cum(diffSqrt),"ADline",colorBlack,styleDots);
> Plot(Cum(diffSqrt), "ADline", colorRed, 1);
> 
> _SECTION_END();
> 
> 
> Thomas
> www.PatternExplorer.com
> 
> 
> 
> 
> 
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf
> Of areehoi
> Sent: Wednesday, December 10, 2008 10:50 PM
> To: [email protected]
> Subject: [amibroker] AD Line formual .... help
> 
> For the life of me I can't get this AD line formula to work. It keeps
> hanging up with syntax error on first line and I can't figure out why.
> I've used almost exact formula in other instances and it works fine.
> Composites are set up for the "~" so the data is there. Any or all
> help will be appreciated.
> 
> Dick H. 
> 
> _SECTION_BEGIN("ADLine Clssic);
> 
> aI = Foreign("~StocksAdv","X");
> dI = Foreign("~StocksDec", "X");
> UncI = Foreign("~StocksNC","X");
> ad = aI / dI;
> 
> Difference = (aI)-(DI) / ( UncI() + 1 );
> DiffSqrt = IIf( Difference > 0, sqrt( Difference ), - sqrt( -
> Difference ) );
> //ADLine = (Cum(DiffSqrt ));
> //Plot (Cum(diffSqrt),"ADline",colorBlack,styleDots);
> Plot(Cum(diffSqrt, "ADline", colorRed );
> 
> _SECTION_END();
> 
> Note: Amibroker help menu says this is the formula.
> " Difference = ( AdvIssues() - DecIssues() )/ ( UncIssues() + 1 );
> DiffSqrt = IIF( Difference > 0, sqrt( Difference ), - sqrt( -
> Difference ) );
> ADLine = Cum( DiffSqrt );"
>


Reply via email to