Posted By: tradingest
Portoflio Asset - 09/07/18 21:51
Hi all,
I want to discuss this code below
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
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