Posted By: tuuPaul
Help me - 11/11/18 12:46
Hello all. I wrote a simple script. But i faced difficult problem. If condition1 met, enter long also another condition2 met, enter short. All open short positions are closed when enter long. There is no code which closes all open short position when enter long in my script. How can i fix it?
Posted By: AndrewAMD
Re: Help me - 11/11/18 13:38
So you want to hedge?
Try Hedge = 2
Posted By: tuuPaul
Re: Help me - 11/11/18 14:22
I do not want hedge. How to fix problem
Posted By: tuuPaul
Re: Help me - 11/11/18 14:24
I want not close all short position when enter long position
Posted By: AndrewAMD
Re: Help me - 11/11/18 14:47
I want not close all short position when enter long position
If you keep your shorts open while entering long, that is hedging.
Unless you want virtual hedging, where zorro manages pool trades for you. Meanwhile, your "trades" only have a net effect on your position.
See this:
http://zorro-project.com/manual/en/hedge.htm
Posted By: tuuPaul
Re: Help me - 11/11/18 15:25
What value of hedge which does not close all short positions when enter long position?
Posted By: tuuPaul
Re: Help me - 11/11/18 15:45
In result win/loss 20/20 but actually it would be 23/17. How can i take true win/loss 23/17?
Posted By: tuuPaul
Re: Help me - 11/12/18 11:43
Hey bro. I wrote 2 scripts one enters long another one enters short. I run it separately then i copied result(win number/loss number). Also i wrote these 2 scripts in only 1 script. Then i run it with hedge=2. Result is not similar to previous result. Pls give me an advise.