Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
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
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Portoflio Asset #474018
09/07/18 21:51
09/07/18 21:51
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Hi all,

I want to discuss this code below

Code:
while(asset(loop(Assets)))
{

var C = priceClose(0); 
var O = priceOpen(0);

print(TO_WINDOW,"n Asset = %s, C = %f, O = %f, day = %a", Asset,C,O,workday);

if(C > O)
enterLong();
}



We suppose that the portfolio have 3 different cross and before to open a new position for the current Asset I want verify if exists the open trade for the current asset in the loop. How Can I make?

Any suggestion?

Thanks

Re: Portoflio Asset [Re: tradingest] #474021
09/08/18 16:21
09/08/18 16:21
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
You can check this with NumOpenLong and NumOpenShort.
Read about them and other useful trade stats here
http://zorro-project.com/manual/en/winloss.htm

Re: Portoflio Asset [Re: Dalla] #474025
09/08/18 19:42
09/08/18 19:42
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Originally Posted By: Dalla
You can check this with NumOpenLong and NumOpenShort.
Read about them and other useful trade stats here
http://zorro-project.com/manual/en/winloss.htm


Thanks Dalla

resolved!


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1