It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
1st 5-min candle OHLC
Hi, is there a way to retrieve the first 5-mins candle OHLC data?
there can be many methods to do this.
here is how I do it..
read the WebSocket data at 9:19:59 am then from the data pull out ohlc...
open = data['ohlc']['open']
low = data['ohlc']['low']
close = ltp at 9:19:59 am
Imran, we cannot exactly read the OHLC data by end of 9:19:59. is there any other way out for this?
You can generate candles at your end. You can know more
why can't you read OHLC data by end of 9:19:59 ? Why is it that you cannot do a thing as simple as that and want to know an alternative, which might be more complex
- do you think its a smart way to keep looking your watch and fire a query to extract data at 9:19:59? what if I want to take the OHLC of first 5 mins for 100+ securities and can it extract the OHLC in a fraction of second? do you have a smart solution for this problem?
1. Yes, possible to get OHLC of 1000+ securities in a fraction of second, let alone 100+
2. I have a smart solution and I have implemented in past. You should also think and work your way towards that kind of solution instead of expecting me to tell
- I tried with multi threading and quote to extract for 100+ securities and it takes close 25secs. So, i dont think there is no other best way as using API given the fastest response
moreover, running the code exactly at 9:19:59 with a seperate process also, does not extract the OHLC for first 5 mins.
we are writing in this forum for a solution. if you are not interested to give any solution, you can keep quite instead of showing you are smart.
1. It is "quiet" not "quite"
2. You are assuming what you are doing is the right, just because you are using threads
3. Forum gives snippet support not detailed solution
4. Expectation of detailed solution should come from paid developers / consultants
5. You can find people who would take money and solve it for you
Last but not the least, you can see except for Imran and me, no one even told you anything even when you wrote virtually nothing much when brief. Considering this post is already 10 days old
Best of luck if you expect someone would give you a free detailed solution
Funny guy you are.
just because no one told anything here, does not mean, no one else dont know. They might not be looking at all threads going on here.
we write here to find out an immediate solution - if we dont get here, there are so many ways to get what is wanted .. only thing it takes time..
Best of luck on whatever you are doing.. I could see so much of your attitude from your threads and I know where this kind of attitude leads to .. once again Best of luck for your life ..
, i'm using the method told by imran and it is working fine with me, but the problem is lets say if you are making use of the datetime from ticks data and in some stocks there are time where at time mentioned above i.e at 9:19:59 there would be no update in the tick data so it will skip this time and the updation will say occur at 9:20, these stocks will miss or timeframe wont match that you have provided i.e 9:19:59.
- can you tell me what is that method? Thanks in advance
sure ..i'm working on updated version of that code i'll send you asap.
- Thanks a lot.