Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (frutza, Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
loop all symbol in Tock() #483137
05/05/21 18:32
05/05/21 18:32
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

I have someone like this:

Code
int run(){
..
..
    while(asset(loop(SYMBOLS))){
        if(!is(LOOKBACK)){
            TockTime=1000;
..
}


how to realise int the tock() fce will be call every symbols? This construction don't work:

Code
void tock(){
    int nShift=0;
    bool lFinish=true;
    char *cSymbol = malloc(6*sizeof(char));
    while(asset(loop(SYMBOLS))){
...


from the manual:
Within a tick function the asset name, the current ask price, and the current ask-bid spread can be evaluated with the Asset string, with priceClose(0), and with the Spread variable. The time stamp of the last quote is returned by seconds(0) or wdate(0). For evaluating component specific parameters such trade statistics, call asset(Asset) and/or algo(...) at the begin of the tick function.

Re: loop all symbol in Tock() [Re: Grat] #483140
05/05/21 19:19
05/05/21 19:19
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
I try this symbol:

#define SYMBOLS "EUR/USD","USD/JPY","EUR/JPY","AUD/USD","NZD/USD","AUD/NZD","USD/CAD","GBP/USD","EUR/GBP","GBP/JPY","AUD/JPY","EUR/CAD"

and in the tock() is only last "EUR/CAD". In the print, I don't se other symbol.

My question - how to set all Assets like programers - now I see only one:

void tock()
Asset(ASSET1);
..
Asset(ASSET2);
..
..
Asset(ASSETn);

frown


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1