API Support Forum
OEC API > API Support > Bars UpTicks DownTicks, discrepency.
Author Topic: Bars UpTicks DownTicks, discrepency.
(8 messages, Page 1 of 1)
Moderators: VPfau
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 28, 2012 @ 10:07 AM             Msg. 1 of 8
Hey,
I have this example bar.
It shows the date 08/28/12, start at 12AM.
Then you see UpTicks = 10, DownTicks = 7.
I would like to see that this bar went down three ticks, for TF is 0.1 so it should be -0.3.

http://i45.tinypic.com/348p05g.jpg

But instead you can see that it is doji bar that has open and close price of 809.6.
I think I should get UpTicks==DownTicks.

May you explain?

I need to get and count all Up and Down ticks, found it on the bars.
If it is not like that, is there any other way I can get it?
Can I receive Tick Data, and request historical price changes (exactly price changes).


Thank you.
I
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Aug 28, 2012 @ 10:25 AM             Msg. 2 of 8
Hello

The values of UpTicks and DownTicks are being calculated by following rules:
- tick considered as "up" - if tick is higher than previous OR tick is equal to previous and previous one was considered as "up" tick;
- tick considered as "down" - if tick is lower than previous OR tick is equal to previous and previous one was considered as "down" tick;

Simple rule which always work:
Ticks = UpTicks + DownTicks
The same is true for up/down volumes as well.

If you want to accomplish some specific counting of up/down ticks you need to request raw tick data and work with it.

Ruslan Kartokhin
Software Developer
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 28, 2012 @ 11:03 AM             Msg. 3 of 8
In addition, I tried to:
_oec.RequestTicks(Contract, DateTime.UtcNow.Date, DateTime.UtcNow);

request data of today from the begging of the day till now.
Getting to: OnTicksReceived

This method is triggered few times, but each time the Prices get different results.

I don't know how to reset unique values, or I have to accumulate from the first to any ticks method run I am getting.

Thank you.
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 28, 2012 @ 11:21 AM             Msg. 4 of 8
Thank you for your response.
I am working with the tick data, like I have posted on my second reply.
Figured out that you send it in batches of 4096 length of array each time, until filling the time span requested.

I have added few minutes to the EndDate of the request..

But still there is small change on the pricing and the synchronization of the total up and down ticks I receive.

If price open at 100, and you have total 500 up and 499 down, meaning that the price should be now 101. so the price moved only one tick or point.

At the final calculation, price change since the beginning of the day to the price moved is not accurate..

Any comments on that?
Thank you for your support.
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Aug 28, 2012 @ 12:09 PM             Msg. 5 of 8
I think you may not understand it right. It seems like you think that price can move only by one tick size per movement.

Let me explain this:

Tick is just information about one single trade characterized by traded volume and price.
So, a difference between two consecutive trades can be more than 1 tick size.

You cannot assume that if price open at 100 and you have 500 up and 499 down then the final price will be 101.
It cannot be calculated that way.

Ruslan Kartokhin
Software Developer
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 28, 2012 @ 05:28 PM             Msg. 6 of 8
I don't get quite what you say.
But I do understand the principal that up tick can be more than one (2) in one trade, then I would like to calculate UpTick+2.
DownTick, with no change.

What you said about how you calculate in the bars the up and down ticks, I do understand as well and what's bothered me is that when a previous up tick, and the next tick has no change, then the next tick will get ++.

Well, I understand that the Ticks is about Tick data, and even if you have 10 ticks with the same price, you would like to accumulate the Ticks value..up or down.

I am looking for a different number.
the number of Price Changing...
When price changed up in two ticks (0.1*2=0.2 or 0.25*2=0.5).
Then my up ticks number get +2.
So it must match with the price started with.

Your tick is the tick of trade.
My tick is the different in tick (0.1, 0.25...) in price.

I still think I can achieve that with the Tick request, but still it don't fall to be accurate. since I have the OnPriceChanged continue to adding numbers, but I need to synch with it.

When I run the function that calculate the up and down tick, it get 100% accurate. But, I have the price changes from the beginning of the day (from the database, when running calculation)...
But, when I am connecting in the middle of the day, or even after one hour of the beginning, I must fill or adjust the value of the above wanted property (my tick of price change).

Hope I was clear, and thank you again for your support.
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 30, 2012 @ 04:54 AM             Msg. 7 of 8
Ruslan,
I still with no accuracy.
Can you suggest me a way to synch the tick data that I am getting with the price changes?

Usually, I am getting exact data and compare it with the graphs, but in this case data don't match the graph.

It is still not 100% solved for me.

Thank you.
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Aug 30, 2012 @ 06:36 AM             Msg. 8 of 8
Ruslan,
Can you check this data for TF (RLM-M) Mini Russell 2000.

Today 08/30/12, your records indicate that the first tick data is at: 1:31:01 AM in price of 812.0. Meaning this will be the opening price.
There is consistency between your tick price, and the value that comes to Global Gen, with Tick and Daily charts.

On Think Or Swim the first tick data start at: 1:55 AM with price of 812.4.

Can you confirm which one is more accurate?

Thank you.