Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, AndrewAMD), 1,112 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help me #474882
11/11/18 12:46
11/11/18 12:46
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
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?

Re: Help me [Re: tuuPaul] #474883
11/11/18 13:38
11/11/18 13:38
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
So you want to hedge?

Try Hedge = 2

Re: Help me [Re: AndrewAMD] #474884
11/11/18 14:22
11/11/18 14:22
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
I do not want hedge. How to fix problem

Re: Help me [Re: AndrewAMD] #474885
11/11/18 14:24
11/11/18 14:24
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
I want not close all short position when enter long position

Re: Help me [Re: tuuPaul] #474886
11/11/18 14:47
11/11/18 14:47
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted By: tuuPaul
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

Re: Help me [Re: AndrewAMD] #474888
11/11/18 15:25
11/11/18 15:25
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
What value of hedge which does not close all short positions when enter long position?

Re: Help me [Re: AndrewAMD] #474889
11/11/18 15:45
11/11/18 15:45
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
In result win/loss 20/20 but actually it would be 23/17. How can i take true win/loss 23/17?

Re: Help me [Re: AndrewAMD] #474903
11/12/18 11:43
11/12/18 11:43
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1