Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Nymphodora, Quad), 923 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Delay Opening trades #474328
10/06/18 17:21
10/06/18 17:21
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
If I want to randomly open trades from 1 to 5 minute later than bar closing period (as z7) with Hedge active how can I do?

May I change BarOffset during trading?

This script works in test, I do not logically correct.
Changing BarOffset every bar am I loosing price info in the bar?

Thank You

Code:
void run()
{
	set(LOGFILE); 	
	MaxLong	= 100;
	MaxShort	= 1;
	
	BarPeriod =60;
	
	if (TrainMode) BarOffset = 0;
	else BarOffset = random(6);
	
	enterLong();
	
}


Re: Delay Opening trades [Re: MatPed] #474331
10/07/18 06:27
10/07/18 06:27
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You can see in the log if this works, but i think not, baroffset probably cannot change. How about Entrydelay?

Re: Delay Opening trades [Re: Spirit] #474332
10/07/18 10:01
10/07/18 10:01
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Thank You Spirit, in the log it works, but is not logically sound.

EntryDelay seems to be a suitable solution but is not compatible with Hedge = 5, accordingly with the Manual.

In z7 Hedge is not used and the delay is fixed for each bar.
I could test it live, but it will take a lot of time. Maybe somebody as already a solution

Last edited by MatPed; 10/07/18 10:01.
Re: Delay Opening trades [Re: MatPed] #474373
10/10/18 10:13
10/10/18 10:13
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Up

Re: Delay Opening trades [Re: MatPed] #474384
10/11/18 06:35
10/11/18 06:35
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
It`s OrderDelay, not EntryDelay.

Re: Delay Opening trades [Re: jcl] #474389
10/11/18 08:09
10/11/18 08:09
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Thank you JCL
The manual state "OrderDelay is not recommended in combination with Virtual Hedging. As it opens and closes trades not at bar boundaries, it can cause trades to be opened and closed shortly afterwards by another trade in opposite direction after the given delay. This causes loss of spread and commission."

2 questions:
- It si not recomended for loss in commission?, but it works?
- There is another method? more compatible with VH?

Thank you

Re: Delay Opening trades [Re: MatPed] #474390
10/11/18 08:21
10/11/18 08:21
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, it is not recommended because it does not make much sense for saving trading costs, but technically you can do it.

Re: Delay Opening trades [Re: jcl] #474391
10/11/18 08:25
10/11/18 08:25
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
ok, thank you


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1