Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Looping through Assetlists and Algos #477952
08/19/19 09:54
08/19/19 09:54
Joined: Feb 2019
Posts: 14
Other
J
j45p41 Offline OP
Newbie
j45p41  Offline OP
Newbie
J

Joined: Feb 2019
Posts: 14
Other
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);
}

}

Re: Looping through Assetlists and Algos [Re: j45p41] #477955
08/19/19 12:52
08/19/19 12:52
Joined: Jan 2019
Posts: 73
berlin
L
laz Offline
Junior Member
laz  Offline
Junior Member
L

Joined: Jan 2019
Posts: 73
berlin
"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...

Last edited by laz; 08/19/19 12:53.
Re: Looping through Assetlists and Algos [Re: j45p41] #477965
08/20/19 08:27
08/20/19 08:27
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1