
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I've read the entire thread and I can't find this.
This code print a line with ask, bid, volume ...., on log for every tick. I need to get the volume grouped by prices the candle has run.
For example if the low is 1.001 and the high is 1.009, I need to print, when every candle closes, the ask and bid volume for 1.001, 1.002, 1.003 ... and so on.
Thank you
Then do as you have described:
thank you for the response.
The SymbolTickInfo, doesn't give me the correct info, if I compare with a real indicator.
I've tried with this
And the CopyTicksRange function, throws and 4401 error .... (I don't know how get the last candle only)
With this code:
I get this.
1873.9 1874.0 1874.0 1.0 1 2021.06.03 17:41:57 56
Then I group by price (ask/bid or last) and I sum the volumes (the volume and volume_real are the same)The problem is, I don't know if the data I get with my function is the real data of future. I'm using a futures broker.
Thank you very much
Sorry, but I have no idea of how that "..." indicator works, and we are not allowed to discuss Market products on the forum.
OK, I've updated my last post.
The problem is, Is the correct way to obtain the buy and sell volume? Is there another way?
Thank you
Both ways I have mentioned are valid! But the CopyTicks method will be the most accurate, because OnTick can miss out on tick events if they happen very quickly before the function returns.
There is also the possibility to analyse the data via the Order Book which holds information on a volume in a different way. Maybe the "..." indicator was using the Order Book data instead of the Tick data.
However, I have no experience with the Order Book, so maybe someone else can comment on that.
ok, one question more
with CopyTicks how can I set a begin and end date, with the last 30 days, for example. I don't know how convert date to milliseconds.
Thanks
Why did you not read the documentation or hit the F1 key in MetaEditor. The answer is right there in the parameter list - "from_sc" and "to_msc" where ( milliseconds = seconds * 1000 )!