Gamestudio Links
Zorro Links
Newest Posts
Hedge on FXCM, 4 or 5?
by Martin_HH. 02/16/26 16:09
Camera always moves upwards?
by clonman. 02/16/26 11:44
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
CMC MT4 CFD vs FX Active - what's better?
by mayarik. 02/11/26 11:00
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, 1 invisible), 9,012 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon, mayarik
19198 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: 28,072
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,072
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