Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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