Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (ozgur, howardR, AndrewAMD, exile, Ayumi), 725 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: function Maximum and Minimum in Lite C [Re: GPEngine] #449265
03/11/15 09:38
03/11/15 09:38
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I also do not understand the problem. With the suggestion by GPEngine you're printing the maximum from 32 to 36 days ago.

Re: function Maximum and Minimum in Lite C [Re: jcl] #449281
03/11/15 18:54
03/11/15 18:54
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
This is what I was expecting, but when trying to see if it really does it, it turns that it doesn't. Or the way I am trying to check it is wrong.

Re: function Maximum and Minimum in Lite C [Re: GPEngine] #449287
03/12/15 09:55
03/12/15 09:55
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
Make sure you know what days the result refers to.

Code:
function run()

{
BarPeriod = 1440;
vars H = series(priceHigh());
var h32to36 = MaxVal(H+32,5);
printf("\n%d %d %d Result HH of 32 to 36 days ago = %.5f",year(),month(),day(),h32to36);

}


Re: function Maximum and Minimum in Lite C [Re: swingtraderkk] #449292
03/12/15 13:37
03/12/15 13:37
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
Thank you swingtraderkk. I can't find still any of the numbers generated by this script in the daily values of EURUSD.

As it is now it helps because the printed Result gives the date from where to look, but no way yet. So I don't know what is doing.

Re: function Maximum and Minimum in Lite C [Re: GPEngine] #449302
03/13/15 08:11
03/13/15 08:11
Joined: Apr 2013
Posts: 57
3
3DCat Offline
Junior Member
3DCat  Offline
Junior Member
3

Joined: Apr 2013
Posts: 57
seems to work for me. The Maxvals are not from yesterday though, as your BarPeriod is one day.

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
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
Just check with printf

Code:
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
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

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
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

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
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

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
Page 2 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1