PureBytes Links
Trading Reference Links
|
Is there a better and faster way to optimize the follow 3 buy and sell
rules? Especially if you have more then 5 buy or sell rules, it gets
too big of a chore to create all the combinations.
Where:
buy1 = some buy rule
buy2 = some buy rule
buy3 = some buy rule
sell1 = some sell rule
sell2 = some sell rule
sell3 = some sell rule
b = Optimize("b",4,1,6,1);
if (b ==1)
Buy = buy1 ;
if (b ==2)
Buy = buy2;
if (b ==3)
Buy = buy3;
if (b ==4)
Buy = buy1 AND buy2 ;
if (b ==5)
Buy = buy1 AND buy3 ;
if (b ==6)
Buy = buy1 AND buy2 and buy3 ;
s= Optimize("s",4,1,6,1);
if (s==1)
sell= sell1 ;
if (s ==2)
Sell= sell2 ;
if (s ==3)
Sell= sell4 ;
if (s ==4)
Sell= sell1 AND sell2 ;
if (s ==5)
Sell= sell1 AND sell3 ;
if (s ==6)
Sell= sell1 AND sell2 and sell3
Thanks
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.6/617 - Release Date: 1/5/2007 11:11 AM
|