[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] AD Line formual .... help



PureBytes Links

Trading Reference Links

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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of areehoi
Sent: Wednesday, December 10, 2008 10:50 PM
To: amibroker@xxxxxxxxxxxxxxx
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 );"
 


------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/