# Detect trend of an index

My question is about determining the trend and it can break down to 3 parts.

To clarify, a trend in my point of view, and in simple form, is the last close at time t relative to its time reference, i.e t0, so that close at t - close at t0 > 0, then it is RISING trend, or else falling.

But the above mentioned method is too simple, so i am looking for others method. I know in normal case, when stochastic %K is above %D, the trend is rising. However if i simply use %k above %d, when the %k fall below %d, the fall trend may be just began, or sometimes the index fall for just a bit, and will kill rising later. So using %k above %d will be too sensitive, and didnt leave room to confirm the real trend.

As a result, we found out the MACD indicator have some use here since it is lagging. Normally when the MACD line is above the signal line, it is a rising trend.

So my first part of question is a general one: suggest a good trend indicator / method, by any time frame / time reference t

Looking at the image below, side by side with 1-min data and 5-mins data, but look at where blue arrows, it seems using MACD line above / below may not be consistent.

My second part of the questions: How to avoid this mis-leading case? And why this happened?

My third part of the questions: Does it work out if you determine a trend from 5-min time frame data and determine turnning point from 1-min time frame data, basically mixing use of different time-frames data.

• I don't think your question had anything to do with the charts coming from an index, so you may consider editing the question – LazyCat Apr 15 '19 at 17:43
• Please edit this question to ask a very specific question. How do you define a correct trend? Why do we have to use a lagged MACD to do that? Your also asking if looking at different time frames can help? – Jacques Joubert Apr 15 '19 at 18:58
• @LazyCat chart is just a form to display the data, it is just for vision-aiding, i am interested in the underlying data(index). I have edited the question to make it more explict – Edison Lo Apr 17 '19 at 9:19
• @JacquesJoubert I have edited the question to be more explicit, MACD is lagging so even KD just break each other, it is not necessarily the change of trend, using KD can be a more stable choice, but it has lagging issue. Yes i am asking if using different time frame can aid determining the trend – Edison Lo Apr 17 '19 at 9:20

### Questions:

1=> Does anyone have a suggestion to determine a trend correctly.

My answer is in general and an opinion. Hong Kong Stock Exchange is third largest market behind Tokyo and Shanghai and most volatile market in the world. It is related to Singapore, Shanghai and Shenzhen, Korea, Taiwan and other famous Asian markets.

For rough overall trends, one might look into daily charts, as you can see in below. You can see that now it is in upward, since you can see that the green candles are intersecting with the upper line of the BBs.

BBs, MACD and VWAP are three good and reasonable indicators to look into for future trends, of-course depends on which time-frames one might be looking at (1-min, 5-min, 15-min, 1-hour, ..., daily).

### Daily Chart

Futures are positive based on this chart, due to many instances of intersecting green candles and upper BBs.

There are much more technicals such as MACD and VWAP to discuss, but I just wanted to give a perspective of being rather difficult to determine a trend correctly.

2=> Does it work out if you determine a trend from 5-min time frame data and determine turning point from 1-min time frame data, basically mixing use of different time-frames data.

For your second question, it is also difficult to answer, but your key point is valid, you usually look into a combination of time-frames to estimate the trend of another future time-frame.

About does it work, maybe or probably not, since several macroeconomic parameters might unexpectedly or relatively unexpectedly hit a market, especially Hang Seng Futures, because HKE is a relatively large market relative to Hong Kong economy, as it is of-course one of the key cornerstones/financial centers of Asian markets.

### Edit:

• I'm not specialized on minutes charts.
• Since market futures are related to macro-economics, are much difficult to estimate a trend, even for minutes, almost impossible to be correct for the full trend. You might only find part of the trend based on specific indicators and probabilities, only based on hands on experience.
• I see your MACD/MACD signals, it is a good indicator to scan, as you can see, they are one of my indicators too in my charts.
• No machine learning, no algorithms, no other fancy methods are recommended for this task, and nothing that creates distractions.

# Have A Protocol and Optimize Your Protocol

The protocol we like to follow:

### Before Chart

• If not you, you then might need a sharp focused rational trader to do this future market estimation, maybe with 2-3 other trading/investing assistants to prepare materials, yet making final decisions single-handedly. (Check if the key trader is ready today. Not, no decisions, only watching.)

• Look into a few key markets that are closed before Honk Kong, of-course U.S. is the first to look (U.K., Germany, etc.). Also listed neighbor markets (Japan, Singapore, Shanghai, Shenzhen, Korea, Taiwan, etc.)

• Look into US daily economic factors such as OBFRVOL, T10Y2Y, DGS10, FFR, also LIBOR of UK
• Look into similar Hong Kong economic numbers (e.g., HIBOR, daily numbers, commodities, etc.), make sure look into monthly unemployment and other factors on a timely basis.
• Check relevant exchange rates.
• News related to Hong Kong markets, then news related to Hong Kong Futures (similar to Dow Futures, etc.)

### Open Chart

• Pick a key indicator, maybe BBs, and 2-3 other supplementary indicators MACD, VWAP, EMAC20 crossing MA50, etc.

• If you wish, weight them simple (Ax1+Bx2+Cx3), maybe linearly, and maybe in your mind. If necessary, maybe write a simple linear macro on your chart.

• On a daily basis, open charts and walk from daily to minutely charts using a set of indicators.

• Watch your indicators, and you will start seeing patterns, make some generalized rules, and maybe remember this rule before all other rules that:

• All your rules is to break one day You might need to be prepared for this rule.

### Estimate Trend

• Look into the key indicator, maybe this:

• When green candles reaches upper BBs, after a minimum of three touches, the probability of breaking down passes 50%

and vice versa

• When red candles reaches lower BBs, after a minimum of three touches, the probability of moving up becomes +50%

• Then, look into other indicators, and they have to do the same green passes, you can see that the rule is not definite.

• Define to see how you might estimate a trend (Sorry! can't help you here!)

### Decision making

• Only that key expert (trader) makes decision, when ready, with no doubt.

Doubt = NO DECISION, ONLY WATCHING

In sum, both your questions include uncertainty , it is up to you, and answers to them are just based on probabilities and hands on experience on Hang Seng Futures.

• I 'd like to thanks for your detailed answer first. However, when looking at minute data, it intersect with upper and lower boundary of BB frequently, so it wont be a very good indicator. Actually i am looking for some proposed method of self chose indicator and the way to determine it. And for the other indicators you have mentioned, RSI just work similar like Stochastic. Traditional usage of strategy like RSI above 70 then looking for the change of trend may not working, just as the photo i attached in above, MACD and KD are both signaling a falling trend but the index keep rising – Edison Lo Apr 17 '19 at 9:47
• Hi @Emma Actually my question is quite an open one, as long as you can suggest a working method to determine a trend for your choice of time frames(minutes time frame), with a criteria when the index just fell from its recent high at time t, no matter later on it will go up again or continue falling, the trend at time t needs to be rising, serve as a buffer to confirm a trend – Edison Lo Apr 18 '19 at 12:13

I think part of the problem may be a lack of a formal definition for what constitutes the trend. At least it lacks a definition of some kind of statistical property. (I was thinking autocorrelation but then realised that a random walk could also look as if it were trending)

I am not convinced that the MACD indicator is the best way to do this. I would investigate point and figure plots. This may solve this problem: "so that even when the index just turned, it is still part of the original trend".

Part of this problem may be that it is almost by nature going to be a lagging indicator since one can only say that the trend continued after the fact.

A far reaching idea is to train a machine learning model, perhaps a recurrent neural network, to identify when a trend has officially broken. Not a forecast though, just a indicator. (Although I am sceptical to this approach, how long would your sequences be? Do we use a many-to-many or a many-to-one architecture?)

• Yes i am open to any suggestion for trend detection, you can purpose your method with your choose of time frame. Indeed a random walk may work out, but if the index is fluctuating, MACD LINE and signal line will cross each other frequently and can determined it is not a clear trend for rising / falling, but if we just use random walk here, we may get the wrong idea. My sequences wont be more than 15 5-mins row data(75 1min, 5 15 mins) – Edison Lo Apr 17 '19 at 9:24
• I think that part of the problem is that you are using a fixed time interval sampling technique. I would swap to the volume clock to remady a few of the concerns. It also negates the need to have multiple time frames analyzed. I would adjust the volume sampling to be about 1/50 of the 30 day rolling avg volume. – Jacques Joubert Apr 17 '19 at 12:04