I have another question in regards to the SkillLong variables, I just cant seem to work this out. This following code was posted to store the crossing for Hucks strategy.

Quote:

while(asset(loop("EUR/USD","GBP/USD",USD/CHF"))) {

int crossed = SkillLong[0];
int Delay = 3;


if(crossOver(LP5,LP10))
crossed = Delay;
else if(crossUnder(LP5,LP10))
crossed = -Delay;

if(crossed > 0 && crossOver(RSI10,50))) {
enterLong();
crossed = 0;
} else if(crossed < 0 && crossUnder(RSI10,50))) {
enterShort();
crossed = 0;
} else
SkillLong[0] -= sign(crossed);
}


Is this code correct for storing the cross on multiple assets? Because it doesnt seem so. The reason I dont think it is because when I run my strategy with just one asset Im getting no problems, however when I run multiple assets Im getting errors. So running through it we create a variable called crossed which is stored with the SkillLong[0] variable? Then we store the delay into the crossed variable? So does then mean that Delay has been stored in crossed or SkillLong[0]? And then should we be checking if SkillLong[0] > 0 or crossed > 0? Im super confused about how this works if jcl or someone could go the theory to thisagain Id really appreciate it.