The time at which an indicator recalculates

Back to topics list To post a new topic, please log in or register
avatar
112
peterhw1 2015.07.25 13:39
 
The following data is part of my 'log' file and represents data from a custom indicator.
In this case the variable is on the 1 minute chart, last value (i.e. 0 )and 5 periods
At 1 second past 15 minutes the variable changes (as expected) and remains the same throughout the fifteenth minute (as expected)
The first data into the sixteenth minute is 7th second but no change and not until 16:09 did the data change.
I understand that Frday , 10:00 p.m.  plus is a reason for the 'next tick' not being until 16:07 but don't understand why the custom indicator did not change (as in did at 16:09).
The same happened to other indicators (20, 40 & 80 period but not shown) when clearly the candle chart (for 1 min) shows different values for each of the indicators

2015.07.24 22:15:01 USDJPY 30070 G-I EMA01_0_005 = 123.77341
2015.07.24 22:15:57 USDJPY 30070 G-I EMA01_0_005 = 123.77341
2015.07.24 22:16:07 USDJPY 30070 G-I EMA01_0_005 = 123.77341
2015.07.24 22:16:08 USDJPY 30070 G-I EMA01_0_005 = 123.77341

Any ideas why this should happen and how best to avoid the consequences ?


avatar
313
JD4 2015.07.25 19:32 #
 

The ticks only come in when the system tells them to, there is no set amount of ticks per minute.  Because of the way the specific markets work (London, New York, etc.), you might not get as many ticks some times of the day compared to others when the markets are really busy.  That will affect the data within the minute bar depending on if there is enough variation among the values of the ticks received within that minute.  The minute bar (or candle or whatever indicator style you use) is basically all of the ticks received within that minute added together.  In theory, if there is not enough sales, you could have no change at all for multiple minutes.  If your indicator is reading the information directly from the ticks, then like the minute bar, your indicator might not change information shown until it receives a change.

I am not sure I would consider this consequences.  Did you try testing it when the market is more active?

avatar
112
peterhw1 2015.07.26 11:50 #
 

Hi JD4 - thanks for the reponse.

I understand - I think.

The situation occurred at the end of the trading week and in demo mode - but I took a trade and almost immediately closed (because 2 indicators had the same value - to 5 decimal places at least).

The indicators I used also appeared to cross at this point in time

I already had code to ensure a further trade would not be considered until the next minute when the indicators should have been updated. 

In this case the figures were the same and hence I took the same trade and closed it. 

It was the unusual nature of this trade that drew my attention to the events.


Thanks again

avatar
1111
Ovo 2015.07.26 12:38 #
 

Not sure what your complaint is above, you speak about some indicator variable, but it looks more like you speak about the tick price.

A tick is generated at server whenever the price changes, and the price has two values to watch - ask & bid. All charts are constructed with bid (though there are some unintended exceptions), but the tick also comes when ask changes alone. No idea what price your indicators work with.

avatar
112
peterhw1 2015.07.26 12:56 #
 
Ovo:

Not sure what your complaint is above, you speak about some indicator variable, but it looks more like you speak about the tick price.

A tick is generated at server whenever the price changes, and the price has two values to watch - ask & bid. All charts are constructed with bid (though there are some unintended exceptions), but the tick also comes when ask changes alone. No idea what price your indicators work with.

Not sure I understand the point of your comment.

By means of explanation:-

A set of circumstances occurred which lead to an unexpected (to me) result.

JD4 made an explanation

I responded with thanks and took the time to explain in a little more detail about the set of circumstances I had encountered.

I have not COMPLAINED as you suggest - about anything

Doesn't really matter what the indicator does but I access the information using  the following code. 

The '1' represents a 1 minute chart

I had expected this code to produce new data (unless it had not changed) on the first tick in the the next minute but it didn't and the variable updated in what was in fact the third tick . 

Normally every tick within the same minute would generate the same response from the iCustom statement

Details are in my original post

EMA01_0_005      = iCustom( My_OrderSymbol, 1 , "ABC", 5, 0,  0);
avatar
13009
WHRoeder 2015.07.26 14:05 #
 
peterhw1:

I have not COMPLAINED as you suggest - about anything

The '1' represents a 1 minute chart

I had expected this code to produce new data (unless it had not changed) on the first tick in the the next minute but it didn't and the variable updated in what was in fact the third tick .

Normally every tick within the same minute would generate the same response from the iCustom statement

  1. You must have a complaint or a problem or you wouldn't have posted.
  2. Don't hard code numbers; if you mean the minute chart say that: PERIOD_M1
  3. Only new value if you called it in OnTick.
  4. EMA01_0_005      = iCustom( My_OrderSymbol, 1 , "ABC", 5, 0,  0);
    You are asking for bar zero value. The Close[0] changes every tick, so any indicator can change value every tick.
Back to topics list  

To add comments, please log in or register