Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, SBGuy), 987 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Minute-spaced script with 60 hourly series? #468142
09/20/17 04:10
09/20/17 04:10
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
I'd like to make Zorro record a tick every minute, but also generate hourly ticks in parallel, where each minute in an hour gets assigned its own version of hourly series.
I have an idea how to do this using a 60xLookBack matrix M[i,j] and writing my own function that moves the j elements back by one at each respective minute i. However, that is a little involved. Therefore, I'd like to ask if this functionality can be realized in zorro more conveniently?
Thanks for any suggestion!

Re: Minute-spaced script with 60 hourly series? [Re: Hredot] #468143
09/20/17 05:50
09/20/17 05:50
Joined: Dec 2016
Posts: 71
F
firecrest Offline
Junior Member
firecrest  Offline
Junior Member
F

Joined: Dec 2016
Posts: 71

Re: Minute-spaced script with 60 hourly series? [Re: firecrest] #468144
09/20/17 06:42
09/20/17 06:42
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
With 60 FrameOffsets, one for each series

Re: Minute-spaced script with 60 hourly series? [Re: Petra] #468148
09/20/17 14:42
09/20/17 14:42
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
Do you mean something like:

Code:
BarPeriod=1;//one minute ticks
TimeFrame=1;//read at one minute intervals
vars minuteseries=series(price());//record minute series
int mininhour=60;
TimeFrame=mininhour;//now read at 60 minute intervals
vars hourlyseries[60];//define a series for each minute
static int minnow=-1;
minnow=(minnow+1)%mininhour;//determine which minute we are on
FrameOffset=minnow;//Make sure the current minute is updating
hourlyseries[minnow]=series(price());//record hour series



Do you think that will work? I'll give it a try!

EDIT:
Yeah, seems to work. Thanks!
But what I wonder is: does price() return the average of the whole hour when TimeFrame is set to 60, or just the last minute reading since BarPeriod is 1?

Last edited by Hredot; 09/20/17 15:12.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1