Originally Posted By: Dalla
Yes, the price series must be inside the asset loop as in your first example.
Also the declaration string CurrentAsset = Asset; is redundant.
The Asset variable already holds the current Asset, so no need to also define CurrentAsset


But I can write this code?

Code:
while(asset(loop(Assets)))
{
string CurrentAsset = Asset;
var C = priceClose(0); 
var O = priceOpen(0);



I must use necessary series or I can use the code above in this answer?