Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 18,869 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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