Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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