N-day chart candle generation rules

Questions about MCFX and MCFX Data Feed.
yosnappyj
Posts: 112
Joined: 14 Feb 2007

N-day chart candle generation rules

Postby yosnappyj » 19 Jun 2007

Could someone (Andrew, Kate?) clarify the rules by which MCFX governs n-day charts?

From what I've been able to figure out, it appears that at New York close (2100 GMT, 2300H my local time), a new candle is opened with the same timestamp as the most recent candle.

[If the chart is not refreshed, but is left from day to day, a sequence of these daily candles will sprout on the n-day chart. I hesitate to assume that this is unintentional.]

Between 2100GMT and 2200GMT, reloading the chart will maintain this condition. After 2200GMT, on Monday to Thursday, reloading the chart causes MCFX to regroup the daily candles into new n-day groups, so that the most recent completed candle is timestamped with the previous day's date, and groups the preceding n days.

On Fridays, it seems that reloading the chart causes the bars to be regrouped so that the most recent active n-day bar corresponds to the weekly close, i.e. the end of the current day.

To illustrate, consider a 3-day chart created on a Tuesday, made up by grouping trading days together in threes.

In each case, the last candle (marked with an asterisk) is the active one:


(Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu)*


At 2100GMT on Tuesday evening, this becomes:

(Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu) (Tu)*

and at 2200GMT:

(Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We)*


At 2100GMT on Wednesday evening, this becomes:

(Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We) (We)*

and at 2200GMT:

(We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th)*


At 2100GMT on Thursday evening, this becomes:

(We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th) (Th)*

and at 2200GMT:

(Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr)*


If the chart is never reloaded, it ends up looking like this:

(Th Fr Mo) (Tu We Th) (Fr Mo Tu) (We Th Fr) (Mo Tu We) (Th Fr Mo) (Tu) (We) (Th) (Fr)*


I have a few further questions and points I want to make about this, but first could you confirm (I'm not at all certain) that I've correctly understood the process that MCFX follows?

User avatar
Kate
Posts: 758
Joined: 08 Dec 2006

Postby Kate » 26 Jun 2007

As far as I understand from your description you are requesting data in bars back? If it is right, then the current logic of governing N-day charts is obvious. Bars back are calculated from a certain floating starting point that defaults to the current day. So when you reload the chart after New York close the starting point changes and this change affects the sequence of bars. In this case I recommend you to use interval requests (From/To).

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 26 Jun 2007

As far as I understand from your description you are requesting data in bars back?
Right.
If it is right, then the current logic of governing N-day charts is obvious.
With respect, if it were obvious, I wouldn't need to ask for clarification.
Bars back are calculated from a certain floating starting point that defaults to the current day. So when you reload the chart after New York close the starting point changes and this change affects the sequence of bars.
That's how I assumed things should work, but they don't appear to be quite so simple. The starting point only appears to shift to the new day one hour after NY close, which means that for that one hour, an n-day chart effectively displays X n-day bars, one 1-day bar, and one 1-hour bar, even after reloading. That seems to be the case whether I use exchange time or local time. I wondered if there was a rationale for this time delay.

Also, at risk of repeating myself, Friday's bar in a "bars back" chart seems to be handled differently from other days, meaning that an n-day "bars back" chart has an active n-day bar only on Fridays, and effectively an active 1-day bar on other days. I wondered if there was a rationale for this difference.
In this case I recommend you to use interval requests (From/To).
Thanks. That makes sense.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 27 Jun 2007

In the interest of clarity, let me explain what it is I'm trying to do.

I'm devising a set of rules for medium-term trade entry points based on candlesticks combined with a custom indicator in the n-day charts. Both the indicator and the candlestick formation are based on closing price, so I'm checking my charts at NY close every day to make a decision whether or not to open a medium-term trade. Ideally, I want to see a closed n-day bar on every n-day chart in every pair every day at 2300H my local time.

Currently the problem using "bars back" charts is that there is (or seems to me to be - we seem to disagree on that point) a lag of one hour between NY close, and MCFX re-plotting its n-day "bars back" charts on reload. That means that at NY close I'm not looking at a freshly completed n-day bar, but a 1-day old n-day bar, a 1-day bar, and a freshly opened 1-hour bar. This means that the indicator triggering market entry at 2300H can't be calculated until midnight. The exception is (or again, seems to be) on Fridays, when the active bar is an n-day bar.

I can use "from/to" charts to ensure that I'm always looking at a completed n-day bar in every pair at the close of every session (and thanks again for that suggestion), but that seems to imply that I have to manually reset the "from" date of every chart in every pair every day.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 28 Jun 2007

Currently the problem using "bars back" charts is that there is (or seems to me to be - we seem to disagree on that point) a lag of one hour between NY close, and MCFX re-plotting its n-day "bars back" charts on reload. That means that at NY close I'm not looking at a freshly completed n-day bar, but a 1-day old n-day bar, a 1-day bar, and a freshly opened 1-hour bar. This means that the indicator triggering market entry at 2300H can't be calculated until midnight. The exception is (or again, seems to be) on Fridays, when the active bar is an n-day bar.
Here are some screen grabs.

obvious_a.png shows four images of the same 3-day chart, the first three taken shortly after NY close on Wednesday evening (2300H local time), and the fourth an hour later (after 0000H Thursday, local time). The three labelled candles in the first three charts are effectively a 3-day candle, a 1-day candle, and an active 1-hour candle.

obvious_b.png shows two images of the same 3-day chart, the first taken shortly after NY close on Thursday evening, again showing effectively a 3-day candle, a 1-day candle, and a 1-hour candle. The second is just after midnight local time. The last candle is now dated 29/06 (Friday's close) and is, uniquely, an active 3-day bar.
Attachments
obvious_b.png
(60.22 KiB) Downloaded 1238 times
obvious_a.png
(98.14 KiB) Downloaded 1213 times

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 05 Jul 2007

The starting point only appears to shift to the new day one hour after NY close, which means that for that one hour, an n-day chart effectively displays X n-day bars, one 1-day bar, and one 1-hour bar, even after reloading. That seems to be the case whether I use exchange time or local time. I wondered if there was a rationale for this time delay.

Also, at risk of repeating myself, Friday's bar in a "bars back" chart seems to be handled differently from other days, meaning that an n-day "bars back" chart has an active n-day bar only on Fridays, and effectively an active 1-day bar on other days. I wondered if there was a rationale for this difference.
I'll be more direct.

Why does MCFX shift the "floating starting point" of its n-day "bars back" charts at a time that doesn't coincide with the session break?

Why are Friday's n-day "bars back" charts handled differently from the other days?

Why do you consider this behaviour obvious?

Guest

Postby Guest » 08 Jul 2007

Still no helpful answer to your complete questions from last month Yosnappyj - or perhaps it was a private reply?

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 09 Jul 2007

Still no helpful answer to your complete questions from last month Yosnappyj - or perhaps it was a private reply?
In fact Kate's reply ("don't use 'bars back' charts") was quite helpful. But I haven't received any further response in private.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 11 Jul 2007

In fact Kate's reply ("don't use 'bars back' charts") was quite helpful.
That's not to say, of course, that I wouldn't greatly appreciate a timely response to my other questions.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 14 Jul 2007

Yosnappyj,
Kate left in the company so I will respond to your question the next week. I need time analyze the issue.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 15 Jul 2007

Kate left in the company
That's too bad. If you're able to, please pass on my very best wishes.
so I will respond to your question the next week. I need time analyze the issue.
Thanks.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 17 Jul 2007

Kate left in the company
That's too bad. If you're able to, please pass on my very best wishes.


It is not bad. She had good time in the company and she is just moving to another city...
I will send your regards.
I will start to work on your issue tomorrow.
Thanks.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 20 Jul 2007

It is not bad. She had good time in the company and she is just moving to another city...
"That's too bad" is just an idiomatic expression of mild disappointment or regret - in this case that the members of this forum (assuming that I'm not the only one left) will no longer enjoy the pleasure of Ms Tokareva's lively wit. Rostov on the Don is the poorer for her leaving.

Best regards.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 24 Jul 2007

Yosnappyj,
The problem is quite complicated and I'm passing it to QA department for investigation.

yosnappyj
Posts: 112
Joined: 14 Feb 2007

Postby yosnappyj » 24 Jul 2007

The problem is quite complicated and I'm passing it to QA department for investigation.
Thanks.


Return to “MCFX”