Discussion of article "What is a trend and is the market structure based on trend or flat?"
In my opinion, this is the best article on market analysis. The most difficult question in trading is told in an accessible language: is it trend or flat?
Thank you to the author for a great article and ideas that can be developed in your own developments.
Well done Maxim!
Very good article.
Only maths for FOREX market does not work (it is known why).
Try to develop your research on the Stock and Derivatives markets.
I think you should take SPOT and BA futures, as well as near and far futures of the same BA as a basis for analysis.
I am sure that it will turn out to be a great tool for trading.
Added
If you like my tips, don't forget about dividends.
In my opinion, this is the best article on market analysis. The most difficult question in trading is told in an accessible language: is it trending or flat?
Thank you to the author for a great article and ideas that can be developed in your own developments.
Thank you, I will write more sequels.
Well done, Maxim!
Very good article.
Only maths does not work for FOREX market (it is known why).
Try to develop your research on the Stock and Derivatives markets.
It seems that it is necessary to take SPOT and BA futures, as well as near and far futures of the same BA as a basis for analysis.
I am sure that it will turn out to be an excellent tool for trading.
Added
If you like my tips, don't forget the dividends.
Thanks.
About the stock market, I've already checked how it works on stocks, the first thought I had was how it could be used. It is indeed easier to make money on stocks because they are more trending than currencies, but not all of them. What you can successfully apply it to is assets with high correlation, for example to analyse and trade sber/sberp. This pair will turn out to be flat and accordingly it can be traded with a simple strategy or different oil can be used. That is, we make pairs of correlated assets and trade a flat strategy. But some instruments can be traded in pure form. The same Sber shows good results, Aeroflot, AMD, APPL....
So, yes, analyse the underlying asset, but you can trade derivatives.
Thank you.
About the stock market, I've already checked how it works on stocks, the first thought I had was how it could be used. It is indeed easier to make money on stocks because they are more trending than currencies, but not all of them. What you can successfully apply it to is assets with high correlation, for example to analyse and trade sber/sberp. This pair will turn out to be flat and accordingly it can be traded with a simple strategy or different oil can be used. That is, we make pairs of correlated assets and trade a flat strategy. But some instruments can be traded in pure form. The same Sber shows good results, Aeroflot, AMD, APPL....
So, yes, analyse the underlying asset, but you can trade derivatives.
You have not quite understood my point.
You need to analyse three instruments to determine the trend:
SPOT + near-term futures on this BA + futures following the near-term futures.
But you should not forget about dividends (gap of SPOT and futures on which dividends fall).
Such analysis will give a more complete picture of the current trend.
You didn't quite get my point.
To determine the trend, you need to analyse three instruments:
SPOT + near-term futures for this BA + futures following the near-term.
But it is necessary not to forget about dividends (gap of SPOT and futures on which dividends fall)
Such analysis will give a more complete picture of the current trend.
Good idea, now I get it.... Taking dividends into account is an important point! If we cut out all the gaps related to payments, we will get an instrument with more upward trending, it will be a big project to analyse all this, but it is a worthwhile idea.
Good idea, now I get it.... Taking dividends into account is an important point! If we cut out all the gaps related to payments, we get an instrument with more upward trending, a big project if you analyse all this, but it is a worthwhile idea.
In fact, it is not that complicated.
Formula for calculating the theoretical price of stock futures
// F = S * (1 + r * n/365) - DIV
// F - theoretical futures price
// S - SPOT Price
// r - Central Bank Rate
// n - number of days to expiry
// DIV - Dividends
Added
You may need the following functions:
//+------------------------------------------------------------------+ //| Expert Get spot function| //+------------------------------------------------------------------+ string GetSpot(const string a_symbol) { if(StringFind(a_symbol, "AFLT") > -1) { return("AFLT"); } else if(StringFind(a_symbol, "AFKS") > -1) { return("AFKS"); } else if(StringFind(a_symbol, "ALRS")> -1) { return("ALRS"); } else if(StringFind(a_symbol, "CHMF")> -1) { return("CHMF"); } else if(StringFind(a_symbol, "Eu-")> -1) { return("EURRUB_TOM"); } else if(StringFind(a_symbol, "FEES")> -1) { return("FEES"); } else if(StringFind(a_symbol, "GMKR")> -1) { return("GMKN"); } else if(StringFind(a_symbol, "GAZR")> -1) { return("GAZP"); } else if(StringFind(a_symbol, "HYDR")> -1) { return("HYDR"); } else if(StringFind(a_symbol, "LKOH")> -1) { return("LKOH"); } else if(StringFind(a_symbol, "MAGN")> -1) { return("MAGN"); } else if(StringFind(a_symbol, "MOEX")> -1) { return("MOEX"); } else if(StringFind(a_symbol, "MGNT")> -1) { return("MGNT"); } else if(StringFind(a_symbol, "MTSI")> -1) { return("MTSS"); } else if(StringFind(a_symbol, "NOTK")> -1) { return("NVTK"); } else if(StringFind(a_symbol, "NLMK")> -1) { return("NLMK"); } else if(StringFind(a_symbol, "PLZL")> -1) { return("PLZL"); } else if(StringFind(a_symbol, "ROSN")> -1) { return("ROSN"); } else if(StringFind(a_symbol, "RTKM")> -1) { return("RTKM"); } else if(StringFind(a_symbol, "SNGP")> -1) { return("SNGSP"); } else if(StringFind(a_symbol, "SNGR")> -1) { return("SNGS"); } else if(StringFind(a_symbol, "SBPR")> -1) { return("SBERP"); } else if(StringFind(a_symbol, "SBRF")> -1) { return("SBER"); } else if(StringFind(a_symbol, "Si-")> -1) { return("USDRUB_TOM"); } else if(StringFind(a_symbol, "TRNF")> -1) { return("TRNFP"); } else if(StringFind(a_symbol, "TATN")> -1) { return("TATN"); } else if(StringFind(a_symbol, "VTBR")> -1) { return("VTBR"); } else if(StringFind(a_symbol, "FIVE")> -1) { return("FIVE"); } else if(StringFind(a_symbol, "TCSI")> -1) { return("TCSG"); } else if(StringFind(a_symbol, "YNDF")> -1) { return("YNDX"); } else if(StringFind(a_symbol, "ED-")> -1) { return("NONE"); } else if(StringFind(a_symbol, "AUDU")> -1) { return("NONE"); } else if(StringFind(a_symbol, "GBPU")> -1) { return("NONE"); } else if(StringFind(a_symbol, "UCAD")> -1) { return("NONE"); } else if(StringFind(a_symbol, "UCHF")> -1) { return("NONE"); } else if(StringFind(a_symbol, "UJPY")> -1) { return("NONE"); } else if(StringFind(a_symbol, "UUAH")> -1) { return("NONE"); } else if(StringFind(a_symbol, "UTRY")> -1) { return("NONE"); } else if(StringFind(a_symbol, "CY-")> -1) { return("NONE"); } return(""); }
#define YDay 365 //Banking Year //+------------------------------------------------------------------+ //| Expert Get days befor expiration function | //+------------------------------------------------------------------+ int GetExpiration(const string aSymbol, const datetime b_time) { MqlDateTime ExpData, CurData; datetime expir_time = datetime(SymbolInfoInteger(aSymbol, SYMBOL_EXPIRATION_TIME)); TimeToStruct(expir_time, ExpData); TimeToStruct(b_time, CurData); // TimeTradeServer(CurData); if(ExpData.year != CurData.year) { return(int(YDay) * (ExpData.year - CurData.year) - CurData.day_of_year + ExpData.day_of_year); } else { return(ExpData.day_of_year - CurData.day_of_year); } } //Call function int expir = GetExpiration(Symbol(), TimeTradeServer());
It will not work on demo, as there is no SPOT on demo
Actually, it's not that hard.
Formula for calculating the theoretical price of stock futures
// F = S * (1 + r * n/365) - DIV
// F - theoretical futures price
// S - SPOT price
// r - Central Bank Rate
// n - number of days until expiry
// DIV - Dividends
Added
You may find the following functions useful:
It will not work on demo, as there is no SPOT on demo
Horror
That's not good at all. A trend is not a probability density distribution of increments (quote), it is just a straight line. It has to be constructed with skill .
So where's your "skill"?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article What is a trend and is the market structure based on trend or flat? has been published:
Traders often talk about trends and flats but very few of them really understand what a trend/flat really is and even fewer are able to clearly explain these concepts. Discussing these basic terms is often beset by a solid set of prejudices and misconceptions. However, if we want to make profit, we need to understand the mathematical and logical meaning of these concepts. In this article, I will take a closer look at the essence of trend and flat, as well as try to define whether the market structure is based on trend, flat or something else. I will also consider the most optimal strategies for making profit on trend and flat markets.
This approach allows us to dynamically evaluate the change speed of the trading instrument trendiness degree. The animation below shows the dynamics of the increment probability density distribution for AMD shares relative to the reference distribution. M1 timeframe candles are used as a basis. The animation is built for 40 steps, 1000 samples. The block size changes dynamically depending on the current average volatility.
Unlike GBPUSD, the distribution of the AMD shares increment probability density is not symmetric to zero. The upward trend component is clearly present. This means that the trend continuation probability is slightly higher when an upward step is followed by an upward step compared to the case when a downward step is followed by a downward step. This means it is more reasonable to open Buy deals on such an instrument. In this case, it is possible to remain profitable even while entering the market at random points.
Author: Maxim Romanov