Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, Ayumi, PeWi, Quad, VoroneTZ), 513 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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