거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
31431
평가:
(14)
게시됨:
2008.11.20 07:03
업데이트됨:
2016.11.22 07:32
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

In the days of the burdensome thoughts about the effectiveness of oscillators usage I often needed the normalization of their values, i.e. the adduction of the oscillations of the indicator to the range [-1;1]. This often opens new possibilities, the simpliest of them is the controlling of the values of the indicator by the concrete levels (0.5, 0.8 or others), and not by some casual values estimated approximately depending on the market. Of course, if the indicator is already normalized there is no need to consider this product, and if it is not...use it, please, don't judge me strictly for the raw code.

Parameters:

string Indicator - the indicator itself that is passed to the icustom() function then. Unfortunately, the MQL4 automatization tools are not enough for the addition of the standard indicators here. On the other hand, who can prevent a curious coder from changing an entry in the program?
int mode - the number of the necessary line of the initial indicator...
int param1
int param2 - ... and its parameters. Unfortunately again, the imagination of the MQL developers is enough just for allowing themselves to write functions with the variable number of parameters (like Print), and for supporting the address arithmetics (in my opinion, the last one is made solely to make the common users feel themselves inferior comparing to the gods :)))). So let's work manually.

Picture:

Comments:

The calculations are performed in two stages:

1. At the initialization stage (the init() function, if somebody doesn't know:) the whole array of the indicator data is analized with a view to the calculation of the distinctive period, i.e. the period within which the mean square value of the indicator can provide the insight to the that mean square value (MSV) but on the whole history.

Let me explain. Suppose we have an oscillator and we've calculated its mean square for several consecutive oscillation periods. So let's make an agreement that there must be, for example, 3 periods (as I have - #define PERIODS_CHARACTERISTIC 3, I recommend not to use more, otherwise the processor will be orverloaded). The essence of the calculation is brought to the determination of how many bars on the average long one period (i.e. 2*average interval between two zeros of the indicator), and to the multiplication of the obtained value by 3.

2. It is left to calculate MSV for every bar (like the square root of the dispersion) on the obtained three periods, to normalize the value of our indicator on it, and in the end to adduce everything to the dynamical diapason [-1;1] by means of passing it through the compressor-function f(x)=tanh(x) (hyperbolic tangent, I had to write the function by myself:))

A pure technical example. The green line in the picture is my very old oscillator that characterizes the activity of the market (in point of fact it is the same as the MACD but it is by the volumes). The blue one - is the oscillator too, but is already passed through the -=Normalizator=-. The +-0.75, +-0.5, +-0.25 levels are clearly seen, and also you can see that all maximums and minimums, the regions of increasing and decreasing, and the points of crossing the zero level keep their positions.

So, here you are... I'm not at fault if somebody don't like it.

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/8572

Murrey Math Lines (Support and Resistance) Murrey Math Lines (Support and Resistance)

MM Lines are drawn where support and resistance is.

Traders Dynamic Index with Visual and Audible Alerts Traders Dynamic Index with Visual and Audible Alerts

I added audible alerts so that when a strong buy or strong sell signal it can generate alerts when the "SoundOn" input variable is set to true.

Lot_Volume Lot_Volume

The automatic calculation of the lot size from the specified percent of free assests.

Pivots_Test Pivots_Test

We place the pending orders at the support and resistance levels.