Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (TedMar, AndrewAMD, dr_panther, 1 invisible), 1,186 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Looping trades not using for-macros #479768
04/24/20 11:45
04/24/20 11:45
Joined: Apr 2020
Posts: 9
D
DanielX Offline OP
Newbie
DanielX  Offline OP
Newbie
D

Joined: Apr 2020
Posts: 9
Hi,

is it possible to loop through all trades without using the for-macros (for(all_trades) { ... } ).
According to the documentation the for-macros can't be nested so I would like to loop through them using either a for loop, or an iterator, but without using the macros

Re: Looping trades not using for-macros [Re: DanielX] #479775
04/25/20 09:25
04/25/20 09:25
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Sure, the macros are for convenience only. The first enter() call in your script returns a pointer to the first trade in the trade array. The trade array contains all TRADE structs in ascending order, so you can use your own loops for accessing them.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1