Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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