Looping through Assetlists and Algos

Posted By: j45p41

Looping through Assetlists and Algos - 08/19/19 09:54

Hi,

I am using the following code to select assetlist based on Algo selection. I can't seem to find out why it is not working - can anybody see anything obvious? I am using VBC++:



while (algo(loop((char*)"ADPS", (char*)"Biotechnology", (char*)"DVS"))) {
if (Algo == (char*)"ADPS") {
int HLIMIT = 2;
assetList((char*)"ADPS");
}
else if (Algo == (char*)"Biotechnology") {
int HLIMIT = 4;
assetList((char*)"Biotechnology");
}
else if (Algo == (char*)"DVS") {
int HLIMIT = 3;
assetList((char*)"DVS");
}
while (stock = (loop(Assets)))
{
asset(stock);
string algo = Algo;

algomain(stock, HLIMIT);
}

}
Posted By: laz

Re: Looping through Assetlists and Algos - 08/19/19 12:52

"why it is not working"

Is not a real good description of the problem and without a working minimal example it is hard to help you.

Maybe changing the workflow is the problem, just a guess... Normally i use asset() -> algo() loops...
Posted By: jcl

Re: Looping through Assetlists and Algos - 08/20/19 08:27

I can at least tell that you should have your assets in a single asset list, not in 3 asset lists. There can be only one. You can add a Type column to the list for different types of assets when necessary.
© 2024 lite-C Forums