| PureBytes Links Trading Reference Links | It would be significantly easier to offer assistance if you posted your code, or some simplified test case that reproduced what you are seeing.
Mike
--- In amibroker@xxxxxxxxxxxxxxx, Keith McCombs <kmccombs@xxx> wrote:
>
> 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/
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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/
 |