Hi, I'm trying to calculate inside a loop the DCHannel() to test if there has been or not a breakout, but I'm getting an error 041. I'm using a portfolio system, this is an excerpt:

function run()
{
int N = assetList("Assets");
for (i=0; i<N; i++);
{
asset(Assets[i]);
vars Prices = series(priceClose());

DChannel(50);

vars upb = series (rRealUpperBand);

if (Prices[0] > upb[1])
enterLong();
}
}

What am I doing wrong? I just want to compare the current price of a specific asset with some TA indicator (a Donchian channel in the example) for that asset, to decide if enter or not in the trade. I checked the manual but still I don't understand what's happening.