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

RE: [amibroker] Re: composites



PureBytes Links

Trading Reference Links


I am 
simply counting those stocks in a given sector that make a new high (as defined 
by my new high criteria). If true I add 1 to the "Low" field in the composite, 
if false I assign 0 to that field. when run across a universe of stocks it 
allows me to calculate rising versus falling stocks by 
sector.
<SPAN 
class=294223117-17102002> 
This 
portion plots correctly the problem I seem to have is in the calculating of 
actual closing data. 
<SPAN 
class=294223117-17102002> 
<SPAN 
class=294223117-17102002>x=SectorID(0);<FONT color=#0000ff 
face=Arial size=2><SPAN 
class=294223117-17102002>AddToComposite(IIf(x==1,C,0),"~Capital Goods" 
,"c",flags=1);
<SPAN 
class=294223117-17102002> 
this 
section develops an index of the sector. the last bar of data falls to 
inaccurate levels when I rescan new data. If I delete the composite and scan as 
a new entity it works fine.........
 
Jayson 

<FONT face=Tahoma 
size=2>-----Original Message-----From: akaloustian 
[mailto:ara1@xxxx]Sent: Thursday, October 17, 2002 1:17 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
compositesJaysonI don't understand the two 
lines below: ("newhigh,1,0" and 
"newlow,1,0").AddToComposite(IIf(x==1 AND newhigh,1,0),"~Capital 
Goods","H",flags=1);AddToComposite(IIf(x==1 AND 
newlow,1,0),"~Capital Goods","L",flags=1);Seems they should be 
"newhigh" and "newlow" without the "1,0"--- In amibroker@xxxx, "Jayson" 
<jcasavant@xxxx> wrote:> > Tomasz,  all;> 
> I run a scan nightly to create composites for my sector 
work.   each night I> will have to delete the composites 
and start over because I get the> following result.......> 
> > > >  the  partial  code that 
creates  one of  the composites  is.....> > 
Buy=1;> > newhigh=C>Ref(HHV(C,25),-1); //stocks makingnew 
high> > newlow=C<Ref(LLV(C,25),-1); //Stocks making new 
low> > x=SectorID(0);> > 
AddToComposite(IIf(x==1,C,0),"~Capital Goods" ,"c",flags=1);> > 
AddToComposite(IIf(x==1,V,0),"~Capital Goods" ,"v",flags=1);> > 
AddToComposite(IIf(x==1,1,0),"~Capital Goods" ,"O",flags=1);> > 
AddToComposite(IIf(x==1 AND newhigh,1,0),"~Capital 
Goods","H",flags=1);> > AddToComposite(IIf(x==1 AND 
newlow,1,0),"~Capital Goods","L",flags=1);> > > 
> I added the flags=1 and it seemed to work in the previous beta but 
I only> used the flag a couple of times before the last 
upgrade.  Since the upgrade> it  does not seem to solve the 
problem. Once deleted and recreated it works> fine. Any guidance 
would be welcome.> > TIA> > JaysonPost 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.