Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 500 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to control all open trades of an algo? #463058
11/12/16 16:31
11/12/16 16:31
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Hi

Currently there is NumOpenLong for each asset and each algo, and NumOpenTotal for all assets and algos. How to know all open long trades for all assets and one algo?

Re: How to control all open trades of an algo? [Re: nanotir] #463068
11/13/16 00:25
11/13/16 00:25
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
You can use the following macros:

This loops through all open, closed and pending trades:

Code:
for(all_trades)



This one loops through all open and pending trades:

Code:
for(open_trades)



This one loops through all open and pending trades of the currently selected asset/algo combination:

Code:
for(current_trades)



You get access to each individual trade's trade variables and trade statistics inside the loops.

Re: How to control all open trades of an algo? [Re: boatman] #463281
11/26/16 11:15
11/26/16 11:15
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
I may explained wrong my question.

The makros above let you loop through:
- Either all assest and all algos
- Or one asset and one algo

I want to loop or call in function all assets and one algo (not one asset/algo combination and not all assets/algos combination). Now, it maybe possible to call different assets inside the loops to get the statistics at the end of allassets and one algo combination, but it maybe easier if a function is already implemented for it, instead of manually calling all assets inside a loop.

Re: How to control all open trades of an algo? [Re: nanotir] #463419
12/03/16 22:10
12/03/16 22:10
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Any ideas?

Re: How to control all open trades of an algo? [Re: nanotir] #463457
12/05/16 08:22
12/05/16 08:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
He meant that you should loop through all open trades and count the trades with the desired algo.

Re: How to control all open trades of an algo? [Re: nanotir] #463460
12/05/16 09:17
12/05/16 09:17
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
I don't know of any existing functions that would allow you to do that, but you can do something like the following to operate on only the trades belonging to the current Algo:
Code:
string currentAlgo = Algo;
for(all_trades)
{
    if(strstr(Algo, currentAlgo))
    {
        ...
        do some stuff
        ...
    }
}


Re: How to control all open trades of an algo? [Re: boatman] #463478
12/06/16 15:29
12/06/16 15:29
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland


I think that could work.

Thanks


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1