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

Re: composites still crashing



PureBytes Links

Trading Reference Links

It seems that my issues may arise because I am working with RT data...

Wondering if state of data is changing between saves into the various 
composites...

Example: Simplified example - not my real code for simplicity
x=Cross(StochD,20);
y=Cross(RSI,30);
C = x or y;
Addtocomposite(x,~StochCounter,"C");
Addtocomposite(y,~RSICounter,"H");
Addtocomposite(C,~AllCounter,"V");

~AllCounter should equal sum of other two, but does not always.

Ara

--- In amibroker@xxxx, "akaloustian" <ara1@xxxx> wrote:
> 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