Portoflio Asset

Posted By: tradingest

Portoflio Asset - 09/07/18 21:51

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
Posted By: Dalla

Re: Portoflio Asset - 09/08/18 16:21

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
Posted By: tradingest

Re: Portoflio Asset - 09/08/18 19:42

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!
© 2024 lite-C Forums