Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/15/2011(UTC) Posts: 10
|
Hi Everybody,
How can I Program VBviewer Example to give me 10 minute Interval
is there puilt in function in msfl91d.dll to do this or I must write my own procedure
I did write my own procedure with another dll (MetaLib) but the procedure do not give accurate results I dont know why
The procedure just accumolate the the ticks
in variable Min untel it is equal 10 like this
Min = Min + DateDiff("n", SecuritiesTime(Y), SecuritiesTime(Y + 1))
Any help please
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The VBViewer sample code app does not have a time compression function, so it will only show you the datafile in the time period in which it is locally stored. If you want to see the data in another timeframe, then; a) download and locally save the data in the required timeframe(s), or b) write a compression algorithm (but unfortunately without the write version of the MDK, or a thirdparty library, you wont be able to save the data in its new timeframe). I find the easiest way to compress data is to find a "bin" algorithm, e.g. to create whole minute data bins, starting from midnight you could do something like: Code:
int whichBin(int hour=0, int minute=0, int binsize=1)
{
return (int(((hour*60.0)+minute)/binsize));
}
You can then deal with the data in each bin to sort out the OHLCVOI data as required. wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 4/15/2011(UTC) Posts: 10
|
Thank you Wabbit for reply
the last choice looks the best one but I dont understand what the bin algorithm is
can you explaine more
my country stockmarket start at 11 am and close at 3.5 pm
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The algorithm simply takes a timestamp and returns the identification of a "bin" into which all data with similarly grouped timestamps shall be placed e.g. data with timestamps: 00:00 - 00:09 go into one bin 00:10 - 00:19 goes into the next bin 00:20 - 00:29 next bin etc ... ... ... 23:50 - 23:59 the last bin for that day
wabbit [:D]
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.