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

[amibroker] Morphing AD Line puzzle


  • Date: Fri, 19 Mar 2010 20:32:01 -0000
  • From: "Mike" <orionsturtle@xxxxxxxxx>
  • Subject: [amibroker] Morphing AD Line puzzle

PureBytes Links

Trading Reference Links

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/