Please forgive my very rusty C. I'm trying to learn the best way to accomplish these things.

I've managed to get this code working but I would like some feedback if it can be done more elegantly, please. My objective was to manage a listing of assets in the run() function only, and then let helper functions also be able to access that list. (That way I only have to keep track of 1 listing of assets)

So I'm creating an array and then passing that array's pointer to my function which can then access it as well.

I'd like to know if there is a better way to define the string array than what I have here. Also, is there a way to use the syntax "while(asset(loop( ..." instead of the for loop?

THANKS
Code:
function myfunction(char **assets)
{
	printf("\n\nin function now...");

	int i;
	for(i=0; i<=sizeof(assets); i++)
	{
		printf("\nin loop: assets[%i]= %s",i,assets[i]);
		asset(assets[i]);
		printf("\ncurrent asset= %s",Asset);
	}
}

function main()
{
	const char *assets[5];
	assets[0] = "EURUSD";
	assets[1] = "GBPUSD";
	assets[2] = "USDCAD";
	assets[3] = "NZDUSD";
	assets[4] = "GBPCHF";

	myfunction(assets);
}



PS: I should also point out that the above code does not seem to work in a real strategy, when I try to substitute while(asset(loop( with the for-loop as above. It just gives a generic "crash" message when I try to Train or Test. So I'd really like to figure out how to use while(asset(loop( and iterate through the array of assets. All of the examples I can find in the manual seem to use individual components like this: while(asset(loop("EURUSD","GBPUSD")))