wrong Daily candles

Moderator: Moderator

Re: wrong Daily candles

Postby Bebbspoke » Wed Jan 30, 2013 5:32 am

To frAnton and all; - are you expecting the impossible? -
Surely if a candle closes at a specific value; - the subsequent contiguous candle MUST open at the SAME value - the only occasions when this may not be true is when there is a time break between successive candles ; this can certainly occur over the weekend market shut down / restart and might also occur between a market evening closure and re-opening the following day.

Observing the Marketscope (Excel) data; - the given time for any candle is the Opening time for the candle but the specific data gives values for the Closing time of the candle.

The problem is (as has previously been discussed) is that there is a finite period after a new bar is opened for the closing values of the previous bar to be finalised... therefore (particulaly) robot trading may be flawed by timing inconsistency.

All I have repeated requested on several forums is that FXCM issue a definate live flag / ping precisely when the closing values are announced. This request appears repeatedly to have fallen on deaf ears...

Sincerely, John (aka "Bebbspoke")
User avatar
Bebbspoke
FXCodeBase: Confirmed User
 
Posts: 170
Joined: Tue Aug 16, 2011 4:04 am
Location: Walton on the Naze UK

Re: wrong Daily candles

Postby frAnton » Wed Jan 30, 2013 10:47 am

Bebbspoke wrote:To frAnton and all; - are you expecting the impossible? -
Surely if a candle closes at a specific value; - the subsequent contiguous candle MUST open at the SAME value
Sincerely, John (aka "Bebbspoke")


Hi John,

I believe that it works slightly different: candles, bars, lines or any other graphical representation of the incoming quotes are just a representation of a let's say it incoming signal. To see the actual incoming signal we have to go all the way down to the tick level. Only on the tick graph it shows how the actual value(the price, the quote) is linked to time.
FxConnect API gives us this information (i.e. how the value is linked to time) by attaching the timestamp - "Time when the tick has been generated on a server" to every tick that is sent from the server to the client through the API.
From this point it is up to the client how it wants to form candles or bars. For example, your client (by saying client I mean the app, the robot) can take the very last tick that belongs to the time interval as an end quote for this interval or it might take the very first tick of the next time interval as an end of the previous interval. Another words two sequential ticks that have timestamps like 01:01:59:719 and 01:02:00:158 might or might not belong to the same time interval (to the same 1 minute candle ).
The values of these two ticks might or might not be the same. If the values are different and if your app takes these two ticks as belonging to two different time intervals, then we have a situation that the second time interval starts from the different value than the first interval ends.
Does it make sense?

From this point of view, it is very unclear to me why MarketScope 2.0 loses the tick and when it happens.

I hope Ekaterina can highlight this for me.

thanks,
Anton.
frAnton
 
Posts: 74
Joined: Tue Apr 05, 2011 11:41 pm
Location: California

Re: wrong Daily candles

Postby Sokebome » Wed Jan 30, 2013 4:08 pm

You are not right. I am assured. I can defend the position. Write to me in PM, we will talk.
Acheter GГ©nГ©rique Yasmin en ligne. Acheter Drospirenone - Ethinyl Estradiol sans ordonnance / Birth Control
zofran
Sokebome
 
Posts: 1
Joined: Fri Jan 25, 2013 9:29 am
Location: Netherlands Antilles

Re: wrong Daily candles

Postby Ekaterina » Wed Jan 30, 2013 8:29 pm

Hi Martin, Anton and John,

I hope that I won't muss it up!

Is the Close Price of a candle determined with the first tick that falls 'outside' of the candle range or is it the last tick that still is inside the candle's time duration? Example, for a H1 bar, would it be the tick of 13:59 / 59 seconds or the tick at 14:00 / 1 second? I guess you must have a rule for this.


The CLOSE price is defined by the last tick that is included in the bar interval. In Martin's example it is "it be the tick of 13:59 / 59 seconds".

I have been under the impression that in above example the tick at 14:00 / 1 second is taken for both the close price of the previous hourly candle and the open price of the next hourly candle, but maybe it is totally different?



The rule in Marketscope is that the begging of a new bar is equal to the ending of a previous one. Which means that the OPEN price is equal to the CLOSE one. Again in the Martin's example it will be a prices formed by the "it be the tick of 13:59 / 59 seconds".

But you should pay attention, that I have taken your examples just for the simplicity. In reality ticks do not always match with seconds (or time intervals). So the close and open prices are equal to the last tick in the interval.

Also, I do not get why a tick is lost. Which one is lost and why?


Sorry for a little bit of confusion. What I mean is that this "first" tick is not counted as an open price. That is what I supposed by the "lost". But in fact it is handled by Marketscope as all other ticks in a bar.

Best regards,
Ekaterina
Ekaterina
 

Re: wrong Daily candles

Postby frAnton » Thu Jan 31, 2013 2:17 am

Ekaterina wrote:
Sorry for a little bit of confusion. What I mean is that this "first" tick is not counted as an open price. That is what I supposed by the "lost". But in fact it is handled by Marketscope as all other ticks in a bar.

Best regards,
Ekaterina


ok, I thought of it in a reversed way.
So you guys ignore the very first tick of a current minute by taking the value of the very last tick of the previous minute as a value of the first tick of the current one.
So for the trade session what is 8 hours long there would be 480 ticks ignored for the instrument, is that right?

I assume that the same trick is used when MarketScope is forming candles on all time frames, huh?

thanks,
Anton.
frAnton
 
Posts: 74
Joined: Tue Apr 05, 2011 11:41 pm
Location: California

Re: wrong Daily candles

Postby Ekaterina » Fri Feb 01, 2013 4:19 am

Hi Anton,

So for the trade session what is 8 hours long there would be 480 ticks ignored for the instrument, is that right?


Not actually. As I have said before Marketscope doesn't ignore any tick, it handles all of them. The only point here is that each first tick of each bar is not counted as an open price. That's it. It is a logic of Marketscope at the moment.
But as this logic is not quite comfortable for the users and developers, a new logic is already being developed. It is very likely, that in the next release (one after the upcoming) the new logic will be implemented: open price will be defined by the first tick in a period.

Best regards,
Ekaterina
Ekaterina
 

Re: getting historical data is a pain

Postby mstreck » Sat Feb 09, 2013 11:36 am

Hi,

thank you for expaining the rule of the current MarketScope release. I believe for automated trading we have to know these little details.
I am aware that we are talking about an asynchronous system looking at ticks, my examples were just simplified to make the point how the rule works and now I know it.

Once you change this rule, PLEASE make this visible somewhere in the documentation of changes.

Cheers,
Martin
mstreck
FXCodeBase: Initiate
 
Posts: 161
Joined: Wed May 30, 2012 1:42 am

Re: wrong Daily candles

Postby Ekaterina » Mon Feb 11, 2013 5:40 am

Hi Martin,

Once you change this rule, PLEASE make this visible somewhere in the documentation of changes.


Thank you for your suggestion! We will certainly take it into account.


Best regards,
Ekaterina
Ekaterina
 

Previous

Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 4 guests