|
Re: function Maximum and Minimum in Lite C
[Re: 3DCat]
#449308
03/13/15 11:18
03/13/15 11:18
|
Joined: May 2013
Posts: 245
swingtraderkk
Member
|
Member
Joined: May 2013
Posts: 245
|
Just check with printf
function run()
{
BarPeriod = 1440;
vars H = series(priceHigh());
var h32to36 = MaxVal(H+32,5);
printf("\n%d %d %d H today = %1.5f; Result HH of 32 to 36 days ago = %.5f",year(),month(),day(),H[0],h32to36);
printf("\nh32 = %1.5f; h33 = %1.5f; h34 = %1.5f; h35 = %1.5f; h36 = %1.5f;",H[32],H[33],H[34],H[35],H[36]);
}
|
|
|
Re: function Maximum and Minimum in Lite C
[Re: swingtraderkk]
#449315
03/13/15 15:28
03/13/15 15:28
|
Joined: Sep 2013
Posts: 73
Mangal
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2013
Posts: 73
|
Thank you once more swingtraderkk. The Result I am geting is
h32 = 1.24486; h33 = 1.23445; h34 = 1.23933; h35 = 1.24567; h36 = 1.23908; 2015 1 28 H today = 1.14232; Result HH of 32 to 36 days ago = 1.24875 h32 = 1.24875; h33 = 1.24486; h34 = 1.23445; h35 = 1.23933; h36 = 1.24567; 2015 1 29 H today = 1.13829; Result HH of 32 to 36 days ago = 1.24955 h32 = 1.24955; h33 = 1.24875; h34 = 1.24486; h35 = 1.23445; h36 = 1.23933; 2015 1 30 H today = 1.13682; Result HH of 32 to 36 days ago = 1.24955 h32 = 1.24855; h33 = 1.24955; h34 = 1.24875; h35 = 1.24486; h36 = 1.23445; 2015 2 2 H today = 1.13639; Result HH of 32 to 36 days ago = 1.24955 h32 = 1.24792; h33 = 1.24855; h34 = 1.24955; h35 = 1.24875; h36 = 1.24486; 2015 2 3 H today = 1.13623; Result HH of 32 to 36 days ago = 1.25705 h32 = 1.25705; h33 = 1.24792; h34 = 1.24855; h35 = 1.24955; h36 = 1.24875; Copied to Clipboard!
Now, the High on 2015-02-03 with data from Metatatrader is 1,15332 which is quiet dfferent than the one expressed here H today 1,13623. The difference is huge. If I take Metatrader data one day before, that is on 2015-02-02, it gives 1,13616 which is closer to 1,13623.
When I look at h32, here is h32 = 1,25705 and in Metatrader data h32 is 1,21813.
2014-12-28 : 1,21813 2014-12-26: 1,22108 2014-12-24: 1,22199 Huge difference with h32 = 1,25705.
IN FXCM screen the H on 2014-12-28 is 1,21807 which is similar to Metatrader 1,21813.
I assume some discrepancy with data may be assumed, but it is too high, from 1,21813 to 1,25705.
Same for h33, h34 and so on.
No one of the numbers given as Result can be found in Metatrader data, not even close.
Last edited by Mangal; 03/13/15 21:10.
|
|
|
Re: function Maximum and Minimum in Lite C
[Re: Mangal]
#449318
03/13/15 20:38
03/13/15 20:38
|
Joined: Sep 2013
Posts: 73
Mangal
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2013
Posts: 73
|
A further analysis of data of High today, with date on first column, Zorro Result in second column and FXCM third column:
Date Zorro Result FXCM (or Metatrader) 2015-02-03: 1,13623 1,15332 2015-02-02: 1,13639 1,13616 2015-01-30: 1,13682 1,13628 2015-01-29: 1,13829 1,1367 2015-01-28: 1,14232 1,13817
It seems to me that the Zorro Result should give one day before. That is, for instance,
2015-02-03 Zorro Result 1,13623 is the 2015-02-02 FXCM value 1,13616 (at least similar) 2015-02-02 Zorro Result 1,3639 is the 2015-01-30 FXCM value 1,3628 (at least similar) 2015-01-30 Zorro Result 1,13682 is the 2015-01-29 FXCM value 1,1367 (at least similar) and so on.
In spite of this, however, the h32, h33, h34, h35 and so on from Zorro Result, nothing to do with the h32, h33, h34, h35 FXCM data.
FXCM data is day by day except one day a week.
Last edited by Mangal; 03/16/15 11:34.
|
|
|
Re: function Maximum and Minimum in Lite C
[Re: Mangal]
#449353
03/16/15 13:03
03/16/15 13:03
|
Joined: May 2013
Posts: 245
swingtraderkk
Member
|
Member
Joined: May 2013
Posts: 245
|
When you are comparing FXCM TS and/or metatrader(FXCM or other) with zorro's history files, you are probably not comparing identical feeds.
Also you need to be sure that your times are aligned, i.e. your bars cover the exact same timeperiod in both. I know that zorro assigns the time of bar close to the bar, metatrader or FXCM TS may not do so, and may assign the time of bar start to the bar. Not to speak of issues such as server times being different i.e. days starting at different times, and treatment of sunday candles i.e. are there 5 or 6 days in a week?
I'm not sure of the relevance of this for testing or trading so long as zorro is internally consistent.
HTH
Last edited by swingtraderkk; 03/16/15 13:04. Reason: small gramatical change
|
|
|
|