function forAlgoCB(var Threshold){
asset(ASSET_C);
if (Threshold > OPEN_LONG){
printf("OPEN %s/%s have %.4f",Algo,Asset,Threshold);
if(NumOpenLong < NUM_OPEN)
enterLong();
newOrder();
}
if (Threshold < OPEN_SHORT){
printf("OPEN %s/%s have %.4f",Algo,Asset,Threshold);
if(NumOpenShort < NUM_OPEN)
enterShort();
newOrder();
}
asset(ASSET_B);
if (Threshold > OPEN_LONG){
printf("OPEN %s/%s have %.4f",Algo,Asset,Threshold);
if(NumOpenShort < NUM_OPEN)
enterShort();
}
if (Threshold < OPEN_SHORT){
printf("OPEN %s/%s have %.4f",Algo,Asset,Threshold);
if(NumOpenLong < NUM_OPEN)
enterLong();
}
}