PriceJump has nothing to do with loops or asset selection. It is set by a price function call.

PriceJump = 0; // in case it was set before
priceClose();
if(PriceJump) ...

Hope this helps...