Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (howardR, AndrewAMD, EternallyCurious, Petra, 1 invisible), 791 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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