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 (VoroneTZ, monk12, Quad), 829 guests, and 4 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
Page 7 of 12 1 2 5 6 7 8 9 11 12
Re: New Zorro version 1.74 [Re: AndrewAMD] #470357
01/09/18 20:34
01/09/18 20:34
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
Another thing that caught my attention, not sure if this is a bug or just me misunderstanding something.

My understanding is that LifeTime is supposed to set the maximum number of bars that a position is open. I think this parameter used to be called ExitTime, and my understanding was that ExitTime can still be used interchangeably with LifeTime. However when running a simple strategy like this with 1.74:

Code:
function run()
{
	StartDate = 2010;
	EndDate = 2011;
	LookBack = 200;
	BarPeriod = 240;
	
	vars close = series(priceClose());
	vars ll = series(LL(10));
	
	LifeTime = 5;	
	MaxShort = 1;

	if(close[0] < ll[1]) {
		enterShort();
	}	
}



I get this in the performance report
Code:
Avg trade bars      7 (+9 / -6)
Max trade bars      26 (4 days)


which is not at all what I would expect.

If however I change LifeTime to ExitTime, I get
Code:
Avg trade bars      4 (+4 / -4)
Max trade bars      4 (16 hours)


which is what I expect.

Is this a bug, or did I misunderstand LifeTime and ExitTime? I think at least the manual is LifeTime is very hard to misinterpret: "Trade time limit in bars. Close the trade automatically after the given number of bars (default: 0 for no time limit)."

Last edited by Dalla; 01/09/18 20:35.
Re: New Zorro version 1.74 [Re: Dalla] #470364
01/10/18 00:34
01/10/18 00:34
Joined: Nov 2016
Posts: 69
USA
J
jrath Offline
Junior Member
jrath  Offline
Junior Member
J

Joined: Nov 2016
Posts: 69
USA
I have finished following up on 'cannot connect' issue in 174 discussed above.

The plugin names to put in accounts.csv have changed.

Oanda V20 is now just Oanda.

MT4 is now ZorroMT4

In general make sure names match the file names in the plugin folder.

This is probably in the release notes I didn't read.

Re: New Zorro version 1.74 [Re: jrath] #470366
01/10/18 09:39
01/10/18 09:39
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I don't know ExitTime, but LifeTime is for limiting the trade duration. When a new trade cannot be entered due to the MaxShort limit, open trades are updated to the current LifeTime. For this reason and since you cannot close trades after market hours, the average trade duration can of course be longer than LifeTime.

Re: New Zorro version 1.74 [Re: jcl] #470369
01/10/18 11:40
01/10/18 11:40
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
LifeTime appears to work from the last entry.
Because Zorro (differently to other software) treats skipped trades/entries as valid, LifeTime gets counted from the most recent *entry* (whichever it is).
So, using MaxLong/MaxShort is a shortcut with unexpected consequences.

ExitTime almost does the job. But trade duration is 4 bars, not 5.

JCL,
- what is ExitTime?
- I believe there is a huge difference between trades skipped by MaxLong/Short and those skipped because of a lack of margin.

Re: New Zorro version 1.74 [Re: Zheka] #470370
01/10/18 11:52
01/10/18 11:52
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
ExitTime is undocumented, so I can't say what exactly it does, only that using it is obviously no good idea. For LifeTime look here: http://manual.zorro-project.com/timewait.htm

Re: New Zorro version 1.74 [Re: jcl] #470372
01/10/18 16:42
01/10/18 16:42
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
ExitTime appears to be/work the same as setting TradeExitTime. Which the manual says equals LifeTime+1. So, setting it to 5 closes the trade in 4 bars.

The question though is why TradeExitTime works with real trades, and LifeTime - also with skipped ones?

Re: New Zorro version 1.74 [Re: Zheka] #470381
01/10/18 19:53
01/10/18 19:53
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
Not sure if this is related to 1.74 not. In the remarks section for adviseLong/adviseShort, there is a mention of setting a DataHorizon parameter. However the link leads to a page which doesn't mention Data at all.

Re: New Zorro version 1.74 [Re: Dalla] #470390
01/11/18 12:12
01/11/18 12:12
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt

Re: New Zorro version 1.74 [Re: jcl] #470391
01/11/18 12:20
01/11/18 12:20
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
Great, thanks!

Re: New Zorro version 1.74 [Re: Dalla] #470415
01/12/18 17:40
01/12/18 17:40
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
small cosmetics bug -

Code:
panel(0,0,0,0);



not working with STEPWISE

Page 7 of 12 1 2 5 6 7 8 9 11 12

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1