Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by jcl. 04/20/24 08:52
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 712 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TradeIsAsset / Trades open on current asset #477924
08/14/19 18:48
08/14/19 18:48
Joined: Feb 2019
Posts: 14
Other
J
j45p41 Offline OP
Newbie
j45p41  Offline OP
Newbie
J

Joined: Feb 2019
Posts: 14
Other
Hi,

I am trying to identify when the current asset in a loop has an open trade. I can't use NumOpenTotal as it will also report on trades opened by other assets. When I try using TradeIsAsset in VC++ I get a sharing violation exception. How do I get number of trades open on the current asset please?

Re: TradeIsAsset / Trades open on current asset [Re: j45p41] #477925
08/14/19 18:58
08/14/19 18:58
Joined: Jan 2019
Posts: 73
berlin
L
laz Offline
Junior Member
laz  Offline
Junior Member
L

Joined: Jan 2019
Posts: 73
berlin
https://manual.zorro-project.com/winloss.htm

...Long: Results of all long trades with the current asset and algorithm. Including phantom trades, but not including pool trades.
...Short: Results of all short trades with the current asset and algorithm, including phantom trades, but no pool trades.
...Total: Results of all trades with all assets and algorithms, not including phantom trades.

NumOpenLong
NumOpenShort
Number of currently open trades with the current asset and algorithm, including phantom trades.

or https://manual.zorro-project.com/fortrades.htm

Last edited by laz; 08/14/19 19:01.
Re: TradeIsAsset / Trades open on current asset [Re: laz] #477926
08/14/19 19:42
08/14/19 19:42
Joined: Feb 2019
Posts: 14
Other
J
j45p41 Offline OP
Newbie
j45p41  Offline OP
Newbie
J

Joined: Feb 2019
Posts: 14
Other
Perfect thank you - I was getting confused with current asset and algorithm - I thought it was totalling for the algo also.

Re: TradeIsAsset / Trades open on current asset [Re: j45p41] #477927
08/14/19 22:09
08/14/19 22:09
Joined: Jan 2019
Posts: 73
berlin
L
laz Offline
Junior Member
laz  Offline
Junior Member
L

Joined: Jan 2019
Posts: 73
berlin
you're welcome wink

Re: TradeIsAsset / Trades open on current asset [Re: j45p41] #477933
08/15/19 19:06
08/15/19 19:06
Joined: Feb 2019
Posts: 14
Other
J
j45p41 Offline OP
Newbie
j45p41  Offline OP
Newbie
J

Joined: Feb 2019
Posts: 14
Other
Hi Iaz,

I have tested this and it when looping through two Assets and Asset 1 is in a trade, whilst in the loop for Asset 2 (which is not in a trade) NumOpenTotal = 1! Which leads me to believe that the statistic is aggregated for the Algo and not just the asset. I get around this by using NumOpenShort == 0 && NumOpenLong == 0 which is specific to the asset.

Regards,
Jas

Last edited by j45p41; 08/15/19 19:11.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1