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