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

[amibroker] OT: random combinations



PureBytes Links

Trading Reference Links

Could someone look at this ....
my settings in AA window are as follows:
current ticker
n last quotations
n=10
 
When I click explore I am expecting the output to have 10 different combinations with the combinations equaling 130 ...
 
Thank you in advance
Anthony
 

upperlimit=Param("upperlimit sum",130,75,130,1);

Lowerlimit=Param("lowerlimit sum",130,75,130,1);

size=Param("size",36,36,55,1);

a=0;b=0;Cc=0;d=0;e=0;f=0;Ctr=0;

for (a = 1; a < size-5; a++);

for (b = a+1; b < size -4; b++);

for (Cc = b+1; Cc < size -3; Cc++);

for (d = Cc+1; d < size -2; d++);

for (e = d+1; e < size -1; e++);

for (f = e+1; f < size; f++);

Summ=a + b + Cc + d + e + f;

 

if(Summ <= Lowerlimit AND Summ >= upperlimit );

{

Ctr= Ctr+1;

}

Filter=1;

AddTextColumn(WriteIf(Ctr >0,"Combination ","")+Ctr,"ctr",1);

AddColumn(a,"a",1);

AddColumn(b,"b",1);

AddColumn(Cc,"c",1);

AddColumn(d,"d",1);

AddColumn(e,"e",1);

AddColumn(f,"f",1);

AddColumn(Summ,"sum",1);



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS