Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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