Gamestudio Links
Zorro Links
Newest Posts
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
folder management functions
by 7th_zorro. 04/15/24 10:10
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
SGT_FW
by Aku_Aku. 04/10/24 16:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, Quad), 373 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 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,724
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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

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