3 registered members (AndrewAMD, SBGuy, Petra),
801
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Is Zorro's rollover calculation wrong?
#464681
03/05/17 14:57
03/05/17 14:57
|
Joined: May 2016
Posts: 180 Prague
pcz
OP
Member
|
OP
Member
Joined: May 2016
Posts: 180
Prague
|
Let's take this minimal example:
#include <default.c>
function run()
{
StartDate = 20170101;
BarPeriod = 60;
LifeTime = 25;
enterShort();
set(LOGFILE);
}
When I check the trade log it seems that all the trades opened between 13:00 and 22:00 (and closed on the next day) have no rollover despite being held for 25 hours. From what I understand this is not how rollover usually works.
Last edited by pcz; 03/05/17 14:59.
|
|
|
Re: Is Zorro's rollover calculation wrong?
[Re: pcz]
#464699
03/06/17 14:10
03/06/17 14:10
|
Joined: May 2016
Posts: 180 Prague
pcz
OP
Member
|
OP
Member
Joined: May 2016
Posts: 180
Prague
|
This is somewhat related to the previous observation so I'll put it here. I want to store RollLong/Short values from AssetsFix file in order to use a different rollover calculation as you suggested. I have code like this:
if(is(INITRUN)){
x = (var)RollShort;
}
RollShort = 0;
This works fine with a fresh Zorro start. But if I re-run the script Zorro remembers that RollShort = 0 from the previous run so the assignment to x variable is useless. Is it like this because of some other feature or would it make more sense to reset the rollover values with each new test run?
|
|
|
Re: Is Zorro's rollover calculation wrong?
[Re: jcl]
#464994
03/23/17 15:12
03/23/17 15:12
|
Joined: May 2016
Posts: 180 Prague
pcz
OP
Member
|
OP
Member
Joined: May 2016
Posts: 180
Prague
|
Another thing related to rollover calculation I've noticed recently, although it's probably not a big issue: When testing with T1 data I get sometimes different values than with T6 data. Is there a reason for that? Example:
Type Open Close Entry Exit Profit Roll
T1: Short 2014-01-10 19:00 2014-01-13 01:00 1.36704 1.3663 8.34 1.42
T6: Short 2014-01-10 19:00 2014-01-13 01:00 1.36704 1.3663 9.76 2.84
T1: Long 2014-03-14 15:00 2014-03-17 07:00 1.39163 1.39024 -17.94 -4.94
T6: Long 2014-03-14 15:00 2014-03-17 07:00 1.39163 1.39024 -22.88 -9.88
|
|
|
Re: Is Zorro's rollover calculation wrong?
[Re: jcl]
#465009
03/25/17 16:13
03/25/17 16:13
|
Joined: May 2016
Posts: 180 Prague
pcz
OP
Member
|
OP
Member
Joined: May 2016
Posts: 180
Prague
|
Having this trade:
Type Lots Open Close Entry Exit Profit Roll
T1/Short 1 2015-01-09 11:00 2015-01-12 07:00 0.8136 0.82442 -104.22 -3.03
T6/Short 1 2015-01-09 11:00 2015-01-12 07:00 0.8136 0.82442 -107.25 -6.06
Printing the trade roll gives me this for T1 data (using hour() and minute() functions when printing; BarPeriod is 60):
...
2015-01-09 19:00, 0.000000
2015-01-11 23:00, 0.000000
2015-01-12 00:00, 0.000000
2015-01-12 01:00, -3.030200
2015-01-12 02:00, -3.030200
2015-01-12 03:00, -3.030200
2015-01-12 04:00, -3.030200
2015-01-12 05:00, -3.030200
2015-01-12 06:00, -3.030200
For T6 data this:
...
2015-01-09 19:00, 0.000000
2015-01-11 23:00, 0.000000
2015-01-12 00:00, -3.030200
2015-01-12 01:00, -6.060400
2015-01-12 02:00, -6.060400
2015-01-12 03:00, -6.060400
2015-01-12 04:00, -6.060400
2015-01-12 05:00, -6.060400
2015-01-12 06:00, -6.060400
9.1.2015 was Friday and 12.1. was Monday.
|
|
|
Re: Is Zorro's rollover calculation wrong?
[Re: jcl]
#465025
03/27/17 19:30
03/27/17 19:30
|
Joined: May 2016
Posts: 180 Prague
pcz
OP
Member
|
OP
Member
Joined: May 2016
Posts: 180
Prague
|
|
|
|
|