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

Re: composites still crashing



PureBytes Links

Trading Reference Links

I also have problems with composites... 

I am counting 4 events, plus the total.
When I look at the data, the sum of the 4 events does not always 
equal the total count. It is off about half the time... 

Ara

--- In amibroker@xxxx, "Jayson" <jcasavant@xxxx> wrote:
> Tomasz, all;
> 
> I had noted the readme in the new final version of the V4.20.3 
where mention
> was made of correction in the composite calculating problem I had 
been
> experiencing.
> 
> After tonight's scan I again see......
> 
> 
> 
> on the update to the existing composite. the composite code 
is........
> 
> 
> Buy=1;
> newhigh=C>Ref(HHV(C,25),-1); //stocks closing at new high
> 
> newlow=C<Ref(LLV(C,25),-1); //Stocks closing at 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);
> 
> Plot(C, "Index",colorBlue,4 );
> 
> If I delete the composites and re-scan all is well but of course I 
loose any
> notes, trend lines etc.
> 
> aby insights, solutions, etc would be greatly appreciated
> 
> 
> Jayson