|
7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible),
18,869
guests, and 5
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
|
|
|
|
|
|