Discussion of article "The Indicators of the Micro, Middle and Main Trends" - page 2

 
TalonTrader:

Hi Dima.  Great work! 

Minor correction:  Noticed that figure 7 has a mislabeled action.   You open a long position at the bottom and have a great trade, but then you "close short position" after the rise instead of "close long position"

Hi Steven. Yes, you are right.

In russian version was close long, this is translation artefact))

 
MetaQuotes:

New article The Indicators of the Micro, Middle and Main Trends is published:

Author: Dima

 

Why my MQL5 Wizard is different from yours?

In step of "Parameters of Signal Module" , I could't find Signal based on Middle/Micro trend. In addition, I already compile the indicator and be able to use it into icustom idicator.

 

Forum on trading, automated trading systems and testing trading strategies

Discussion of article "Several Ways of Finding a Trend in MQL5"

newdigital, 2014.06.25 20:45

How to detect forex trends

Detecting a trend is an important part of predicting direction in a currency pair. Tomorrow’s prices usually follow or continue today’s trend. There will, of course, be reversals and ranging behavior within the trend but it is easier to trade with a known trend than to predict when it changes. The task of the forex trader is to detect variations or waves of sentiment. The trader needs to ask: is there a shape to changes in sentiment and can it be detected? To answer this question, we can turn to price break charts (also called three-line break charts). In recent months, Bloomberg Professional stations added these charts. They also are available in many retail charting programs such as eSignal and ProRealTime.

Price break charts show only a new high close or a new low close. For example, if a trader using a candlestick chart of a daytime interval converts it to a three-line price break chart, he would see the price action from a different vantage point. The price break chart would only show consecutive new day high closes, or consecutive new day low closes. If no new high or new low is reached, then no additional bar would appear. But when the price reverses, it shows a new column only if the price reverses three previous highs (downward reversal) or three previous lows. This is why it is called a three-line break chart. The conditions for a bullish and bearish reversal are easily identified.


Three-line break charts enable significant insights into the shape of sentiment in the price action. A trader can detect the prevailing sentiment, how strong it is, whether a change in sentiment has occurred and project where the next trend reversal will occur. Several examples of using the three-line break as an indicator occurred in the GBP/USD pair in 2009 (see “Show me the move”).



The year started with a series of three consecutive new lows. It then reversed to a distance of four new consecutive highs. The sequence reversed back to four new consecutive lows followed by three consecutive new highs. In April, we see a very significant sentiment event, a flip-flop. This is a new downward reversal followed immediately by an upward reversal. In other words, market sentiment did not continue into a series. When a flip-flop occurs, it is rarely followed by another immediate reversal and therefore is a signal that the trend direction after the flip-flop will continue for a longer distance. This is exactly what occurred. The GBP/USD flipped from a low of 1.4252 on March 30 to a high of 1.5002 on April 15.

Also in the pound, we see a long sequence of 20 new consecutive day highs that occurred between May 1 and June 11, taking it from 1.4490 to 1.6598. While the ultimate length of the sequence is not predicable, what was clear to the trader was that the previous highest uptrend sequence before the long run up was five new consecutive highs. When a previous sequence of highs or lows is broken by a new sequence, this is an alert that the sentiment is becoming stronger than ever.

After the 20 new consecutive highs were achieved, GBP/USD no longer had the energy to repeat this sequence. It entered into a series of smaller consecutive new daily highs, and reversals into consecutive new lows. GBP/USD ended with a reversal up with two consecutive new daily highs.

Price break charts can be used for any time frame. Scalpers could use a one-minute price break to spot what is the intra-hour prevailing sentiment. While price break charts do not predict the duration, or the distance of a new trend, they reveal the strength of the prevailing sentiment. That can be enough to get an edge for the scalper or the long-term trader.



 

Hi Dima, your test results demonstrate why trend following strategies generally work as expected (if done right). I can only join praising the article (even if a little late) and think it should be possible to create essentially the same trading system with ZigZag indicators or with Donchian channels. I am still curious about this part:

MetaQuotes Software Corp.: 

New article The Indicators of the Micro, Middle and Main Trends is published:

5. Trade Signals Class for Use in MQL5 Wizard

  • [...] The duration and magnitude of the movement is specified by the parameters dT and dP, respectively. The values ​​of these parameters should be determined on the basis of studying the history of this instrument.  

Author: Dima

  1. Is there any known standard method for determining reasonable (or even optimal) choices of the parameters dT and dP?
  2. Which criteria should we use, at all?
Having functions for choosing the parameters we could regularly call them for turning the EA into a self-adaptive trading system. The trends are certainly less stable during intraday trading but using respective shows good opportunities, too. So I dare to conclude that the risk is not so much greater since prices need to be treated as random variables no matter which timeframe we use. But being able to find new parameters more quickly is more important the lower the timeframe is.
 
this indicator does not open on my mt5 can anyone help me???????????
Files:
 
SATISFACTORY WORLD #:
this indicator does not open on my mt5 can anyone help me???????????

  1. Paste all 3 mqh files into your MQL5\Include\Indicators folder.
  2. Compile each mqh file.
  3. Copy all 3 mqh files into your MQL5\Include folder.
  4. Copy all 3 mq5 files into your MQL5\Indicators folder.
  5. Compile each mq5 file.
 
Also, rename textdisplay__1.mqh to TextDisplay.mqh
 
Clement #:

 

Why my MQL5 Wizard is different from yours?

In step of "Parameters of Signal Module" , I could't find Signal based on Middle/Micro trend. In addition, I already compile the indicator and be able to use it into icustom idicator.

Dima mentioned a "Masters MQL5" template that appears to be used to make the MT5 Signals Module recognize ganntrendsignal.mqh. I'm unable to find this Masters MQL5 template.

I copied ganntrendsignal.mqh to the MySignals folder in MT5 and the file remains unrecognized.

I'm presently reading Trading Signal Generator Based on a Custom Indicator - MQL5 Articles. The sample mysignal.mqh file posted there is recognized by the MT5 Signals Module. Maybe the code in mysignal.mqh holds the answer.

Trading Signal Generator Based on a Custom Indicator
Trading Signal Generator Based on a Custom Indicator
  • www.mql5.com
How to create a trading signal generator based on a custom indicator? How to create a custom indicator? How to get access to custom indicator data? Why do we need the IS_PATTERN_USAGE(0) structure and model 0?
 
Atsushi Yamanaka #:

The generated EA doesn't work...

What's wrong??


Here is classic me, replying 13 years later...

Thank you, Atsushi, for posting a source file of your generated EA. I have come to believe that the MT5 Wizard has been extensively updated, and that Dima was simply referring to the old Wizard as the "MQL5 Masters Template." As a result, the current Wizard likely cannot work with the old signals mqh files posted in this thread. Therefore, I opened your old EA source code and noticed two potential issues:

  1. The #include statements in your EA code likely need to be updated. Each user likely has her or his own preferred directory. For example, if your EA code is referencing Expert\Signal and your mqh files are actually in Expert\Signal\MySignals, that's not going to work.
  2. Similarly to my previous TextDisplay file name debacle, I found that there are capital letters in the file names referenced in your EA source code while the posted file names are all lowercase letters. You can either change the references in the EA code, or rename the actual files.

I actually did this, and your code otherwise appears to be running with the indicators pre-attached to the chart. I received 3 non-fatal "Changing of timeseries is forbidden" statements in the Experts tab, but based on  Error: CExpertBase::SetPriceSeries: changing of timeseries is forbidden - Automatic Trade - Expert Advisors and Automated Trading - MQL5 programming forum, I believe that I can ignore it.

One caveat is that this workaround doesn't work in the current version of MT5 Strategy Tester. I'm presently waiting for trading conditions to return true in forward testing...

Error: CExpertBase::SetPriceSeries: changing of timeseries is forbidden
Error: CExpertBase::SetPriceSeries: changing of timeseries is forbidden
  • 2011.11.06
  • Luis Sampaio
  • www.mql5.com
Hi Guys, Anyone could help me with this? I`ve done a simple EMA Cross signal, after that I used MQL5 Wizard to built my EA...
 

Quick update...

The problem is not the MT5 Strategy Tester. It's the old Gann.mq5 EA and mqh files that are incompatible with the entire updated MT5 platform. There were no trades executed in forward testing just like in back testing.

Upon further inspection of the indicators' source codes, I found a ready-made GlobalVariable coupled with each pointer. GlobalVariableGet is the answer for EA coding!