Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,806
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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,806
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