Guarda come scaricare robot di trading gratuitamente
Ci trovi su Telegram!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Visualizzazioni:
6293
Valutazioni:
(30)
Pubblicato:
2013.02.06 13:17
Aggiornato:
2016.09.20 10:02
Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

Target:

Due to the creation of an indicator, which needed to determine the direction of a trend formed earlier in order to further solve the algorithm, I came up with a certain formula to measure the trend strength (closeness of this trend to the ideal) as a percentage.

Below is represented the illustration that to my point of view symbolizes the ideal trend (on the left side is the down trend, on the right side is the up trend). Next to each trend are indicated existence conditions of an ideal trend:

The algorithm:

At first, to write this function I decided to enter the rating system, i.e. for every true condition some "ball" variable gets one rating. Further on these ratings were formed into this variable and after calculating the ratings at last the received number of ratings was divided by the maximum possible number and multiplied by 100% that allows conversing the received ratings into a percentage.

Actually the function itself is given in the Func_Trend.mqh.

Another type of analysis:

Then I came up with another idea, which supposed a non-uniform accrual of ratings. For example, for the most important conditions more ratings would be accrued. So the idea of counting the ratings by power of two was created and the more important the condition is, the higher the power of two will be.

Below is represented the illustration with a lot of number of conditions for each trend. More important conditions are located at the beginning of the list:

The conditions were added into the functions and the sense of calculating the ratings changed, but, in general, the trend percentage remained the same. It can be seen in the Func_Trend_2.mqh.

Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/1506

AFL Winner AFL Winner

The oscillator for intraday trading.

PFE2 PFE2

The smooth oscillator performed in the form of the color histogram

NDuet NDuet

Two different period Moving Averages to define the direction of the trend and the semaphore signal indicator to specify the moment for settlement of a deal

TrendLine Touch Alert TrendLine Touch Alert

This indicator simply alerts and sends email every time the trend line touched by the price.