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

Re: [amibroker] Morphing AD Line puzzle


  • Date: Fri, 19 Mar 2010 16:52:04 -0400
  • From: Keith McCombs <kmccombs@xxxxxxxxxxxx>
  • Subject: Re: [amibroker] Morphing AD Line puzzle

PureBytes Links

Trading Reference Links



Mike --
This is just a guess.  But, each bank probably has a different total number of bars.  So the Cum() is going to be 'acCumulated' over a different period.  Rather than using Cum() why not use the sum( ARRAY, periods ).  And make sure the 'periods' does not exceed the minimum number of bars for all the stocks used in the group that you are analyzing.
-- Keith

On 3/19/2010 16:32, Mike wrote:
 

I'm new to this add to composite function and I am using this code to plot an AD line.
...............................................
int_string = "Banking"; //MarketID(1)
Difference = ( Foreign("~adv_" +int_string, "C") - Foreign("~dec_" +int_string, "C") )/ ( Foreign("~unc_" +int_string, "C")+ 1 );
DiffSqrt = IIf( Difference > 0, sqrt( Difference ), - sqrt( - Difference ) );
BankADLine = Cum( DiffSqrt );
_TRACE("BankADLine "+ BankADLine );
...............................................

I scaned a watchlist of Banking stocks to get the ~adv_Banking,~dec_Banking, and ~unc_Banking composites which are in group 253.
Whenever I switch chart tabs at the top of the chart display and the ticker changes I get a different trace value for the BankADLine.

How are the composite symbols changing their scanned values. I've even tried the setforeign("sym"); and RestorePriceArrays() ; to lock in the symbol I think the code is working with but they are completely ignored.

I'm trying to get the AD line values for multiple watchlists/sectors in one indicator. So I want to repeat "this" code multiple times.

Please help, my head is starting to hurt...this desk is really hard!

Thank you for any assistance!

mike



__._,_.___


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

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

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___