Search This Blog

Friday

Indicator i-Regr v2. Channel regression


The second version of Forex - indicators i-Regr and i-Regr H&L ..

Added features:

Applied_price - price used to calculate regression channel: 0-CLOSE; 1-OPEN; 2-HIGH; 3-LOW; 4-MEDIAN; 5-TYPICAL; 6-WEIGHTED

data - enter the date and time on which the calculation of the regression channel. The string in the format "yyyy.mm.dd hh: mi". Setting bars are ignored.

degree - varies from 1 to 61 ...

Forex Indicators

Indicator Igrok


Forex - the indicator on how Igor Toschakov (LAIgrok) - author of "FOREX, playing for money, a strategy of victory." Easy Forex - the indicator shows the level of the opening day.

Download forex - LED Igrok

Wednesday

Fourier Extrapolation of Indicator.mq4


This forex indicator is a modification of the indicator Extrapolator, which uses only the first method of extrapolation (Fourier) and adding the possibility of using the values of the selected indicators as input data.Фурье ряд. Attached indicator uses spectral analysis of the selected indicator, and extrapolates these values into the future using the Fourier series. For example, the indicator is selected Williams Percent Range. Vector in [] the values of the selected indicator. The graph at the bottom, black line in the window FEoI - value indicator, Blue Line - the Fourier series for the past values, the red line - extrapolation of Fourier series in the future. Predicted values begin with LastBar-1 and include the last known bar in the history of LastBar for continuous docking of modeled past (Blue Line) and future (red line) values.

Forex Indicators

Input data:

extern int LastBar = 200, / / Number of the last bar of history. 0 is the last on the schedule.
extern int PastBars = 500, / / Number of bars in history, which made the spectral analysis and fitting of Fourier series
extern int FutBars = 200 / / Number of bars in the prediction
HarmNo=PastBars extern int HarmNo = 10 / / Number of members in the Fourier number; HarmNo = 0 selects the maximum number of harmonic components HarmNo = PastBars
extern double FreqTOL = 0.0001; / / The accuracy of calculations of frequencies by the method of Quinn-Fernández

The line where the change is indicated at the bottom of the selected indicator red

int start() int start ()
{ (
ArrayInitialize(in,EMPTY_VALUE); ArrayInitialize (in, EMPTY_VALUE);
ArrayInitialize(pv,EMPTY_VALUE); ArrayInitialize (pv, EMPTY_VALUE);
ArrayInitialize(fv,EMPTY_VALUE); ArrayInitialize (fv, EMPTY_VALUE);

//Choose indicator and find the average of its np past values / / Choose indicator and find the average of its np past values
double x[]; //stores indicator values double x []; / / stores indicator values
ArrayResize(x,np); ArrayResize (x, np);
double av=0.0; double av = 0.0;
for(int i=-lb;i<> for (int i =- lb; i
{ (
in[i+lb]=0.5+iWPR(NULL,0,50,i+lb)/100.0; //change indicator here in [i + lb] = 0.5 + iWPR (NULL, 0,50, i + lb) / 100.0; / / change indicator here
if(i>=0) if (i> = 0)
{ (
x[i]=in[i+lb]; x [i] = in [i + lb];
av+=x[i]; av + = x [i];
} )
} )
av/=np; av / = np;

//Prepare modeled data / / Prepare modeled data
for(i=0;i<> for (i = 0; i
{ (
pv[i]=av; pv [i] = av;
if(i<=nf) fv[i]=av; if (i <= nf) fv [i] = av;
}< /p> <>//Fit trigomometric series )

/ / Fit trigomometric series
double w,m,c,s; double w, m, c, s;
for(int harm=1;harm<=HarmNo;harm++) for (int harm = 1; harm <= HarmNo; harm + +)
{ (
Freq(x,w,m,c,s); Freq (x, w, m, c, s);
for(i=0;i<> for (i = 0; i
{ (
pv[i]+=m+c*MathCos(w*i)+s*MathSin(w*i); pv [i] + = m + c * MathCos (w * i) + s * MathSin (w * i);
if(i<=nf) fv[i]+=m+c*MathCos(w*i)-s*MathSin(w*i); if (i <= nf) fv [i] + = m + c * MathCos (w * i)-s * MathSin (w * i);
} )
} )

//Reorder the predicted vector / / Reorder the predicted vector
for(i=0;i<=(nf-1)/2;i++) for (i = 0; i <= (nf-1) / 2; i + +)
{ (
double tmp=fv[i]; double tmp = fv [i];
fv[i]=fv[nf-i]; fv [i] = fv [nf-i];
fv[nf-i]=tmp; fv [nf-i] = tmp;
} )
return(0); return (0);
} )


Download forex - LED Fourier Extrapolation of Indicator.mq4

Sunday

Indicator 2MAGoodCooked

This Forex - LED draws arrows on the restoration of the trend after the rollback. If the fast moving average above the slow, then fast in the 1-2 bar moves down and turns up - on the graph shows up-arrow, similar to the other side. Small arrows show a recovery after all the setbacks, fatty - the first arrow in a new direction. Yellow crosses - the point of intersection of moving averages (crosses from below - the intersection of the top, a cross on top - the intersection of down).

Forex Indicator

Parameters:

FastMAPeriod - a period of rapid AI,
FastMAMethod - Quick method AI: 0-SMA, 1-EMA, 2-SMMA, 3-LWMA,
FastMAPrice - Price rapid AI: 0-Close, 1-Open, 2-High, 3-Low, 4-Median, 5-Typical, 6-Weighted,
SlowMAPeriod - sluggish AI,
SlowMAMethod - Method slow AI: 0-SMA, 1-EMA, 2-SMMA, 3-LWMA,
SlowMAPrice - slow price: AI 0-Close, 1-Open, 2-High, 3-Low, 4-Median, 5-Typical, 6-Weighted,
TwoBar - Check kinkiness AI left of the extremum on the two bars on the right is always on one bar, see the picture below.

indicator forex

When TwoBar = true left of the extremum (red vertical line), fast moving average (blue) should be raised (to sell) or lowered (to buy) in the two bars, while TwoBar = false just a bar.

Note:

The first two are used to buffer the indicator moving averages, by default do not have color, you can set the color (the tab "Colors" window display properties) and they will be displayed on the graph.


Download forex indicator 2MAGoodCooked

Friday

Indicators of volume


Normalized Volume Oscillator Indicator

This indicator is developed from the idea of using the normalized volumes

First, the normalized values are now expressed as a percentage of the average value over the period. Accordingly, the data on the graph, and can now take negative values, which means a lull in the market.

Another useful innovation is the color histogram columns depending on the amount of normalized volume.

- The blue color indicates that the current amount is less than the average for the period;
- Dark green means a small excess amount compared with the average for the period;
- Light green indicates that the increase overcame Fibo-level 38,2% compared with the average for the period;
- Yellow means that the increase overcame Fibo-level 61,8% compared with the average for the period;
- White (in the figure below - the red, that is not merged with the background) color indicates that the increase in the level broke the 100% compared with the average for the period.



Oscillator normalized volume

The figure above shows an example of using an oscillator normalized volume when analyzing the probability of breakdown pivot-levels.
The yellow column of the histogram shows that the breakdown in the near future is possible. White (in the picture - red) column indicates that the breakdown is happening right now, and he likely is true.

The indicator works best on relatively small taymfreymah (15 min).
In terms of long-term trend breakdown alleviated because overall volume for the period is high. In this case it is sufficient to bar histogram was green.

Download Indicator

Normalized Volume Indicator

When the market is in a position close to the Flat, the majority of indicators will generate many false signals. Meanwhile, there is a simple way to filter out, if not all, a very substantial part of such signals. Since the emergence of strong trend movements in the market are almost always accompanied by an increase in the volume, the use of volume indicator can be an effective solution for determining the optimal entry point into the market.

Proposed indicator normalized volume builds a schedule ticks value assigned to the average volume for the period. Through this normalization of the current value can be a simple and clear criteria for possible entry into the market. Thus, finding the line above the 1.0 schedule indicates that the current value is higher than the average for the period and because the signals from the indicators, which are traded, should be regarded as true. 8. Recommended period averaging 8.



Download Forex Indicator Normalized Volume


Indicator Level Sensor

Quote:
"Market Profile was developed by Peter Steidlmayer, a remarkable and ingenious thinker. He found a natural expression of the market (volume) and submitted it this way (bell curve) so that you can read unbiased information generated market. While trading, the seems to be an art, a solid trading methodology can minimize its subjective elements and maximize the objective. Most market participants do so, considering many factors external to the market itself, - the foot, the duration of the price movement in a given direction, the schedule of when to sell ( for example, only the first two hours of work), and the like. These external factors, improving the trading, most of them are aimed at reducing subjectivity. But traders need to use inside information to develop a strategy for entry and exit, and to identify the moment when the actual trade potential show itself. isolating the internal information, technical analysis attempts to build a mental structure. To understand what mental construction, it is useful to recall how the chess grandmasters. If at any time, the game show for a second grand master chess board, he will be able to reconstruct the exact position of each figure. However, if you also show him a second random (not playing) a combination of chess pieces, it will not be able to reconstruct it. Why? Because the grand master to understand the position of each figure in terms of mental constructions. Berär board does not fit in any of these structures, so they can not organize what he saw. "
Link to full text: http://www.forextimes.ru/article/a26747p.htm
By: http://www.spekulant.ru/

Indicator of market structure

The indicator shows the total number of ticks, which held the price at this level, it allows a good idea to use completely different set of models.

Equilibrium market has a tendency to form a parabolic

STEP - vertical step in the points.

Indicators Forex indicator of market structure
Indicators Forex Indicators of market structure

Download an indicator of market structure

Indicator ATR MA Oscillator

Oscillator type OsMA, but interpreted for the oscillator ATR. I have used as dop.signal (intersection of 0) to exit the position with a profit:). EURUSD normalized to 4 hours. . Varies between ATR and the period of the signal lines in the code, you can also change the method of calculating the moving average for the ATR. Now = MODE_SMMA;

Forex Indicators



Download forex - indicator of ATR MA Oscillator

Sunday

Murrey's Indicators

Indicator MMLevls_VG

Indicators Forex Indicators Murray

Download indicator MMLevls_VG

Indicator Murrey_Math_Line_X

Carefully read the description inside the Adviser.

Forex Indicators Indicator Murrey_Math_Line_X
Download Forex indicator Murray Murrey_Math_Line_X

Indicator MMLevls_VG

The most accurate description and confusing indicator point

Indicators Forex Indicator MMLevls_VG

Download forex indicator Murray MMLevls_VG

Indicators of correlation

Indicator korrellyatsii

Forex - indicator considers the correlation of currency pairs.

Input parameters:

 extern string  OtherChart = "EURUSD" ; extern string OtherChart = "EURUSD";
extern int n = 20 ; extern int n = 20;
extern bool UseOpen = true ; extern bool UseOpen = true;
extern bool UseClose = false ; extern bool UseClose = false;
extern bool UseHigh = false ; extern bool UseHigh = false;
extern bool UseLow = false ; extern bool UseLow = false;
extern int CalcBars = 400 ; extern int CalcBars = 400;
The formula for calculating:
Индикаторы Форекс Индикатор корелляции

where

Индикаторы Форекс Индикатор корелляции

and

Индикаторы Форекс Индикатор корелляции

The prices of two assets in the same timeframs. n - the period for which consider the correlation. x и y x and y with a dash on top - this is the mean value of x or y in the last n bars.




Example of USDCHF and EURUSD:

Indicators Forex Indicator korellyatsii



Download forex - LED korellyatsii

Forex indicator Corelation

The indicator is designed to find correlations between different tools. Allows you to superimpose one graph on top of another and visually identified as correlated between the different tools. Also allows you to overlay moving averages (Moving Average).

Input parameters:

  • simbol_name - ticker tool, the schedule of which will be imposed on the current.
  • bars_for_autoscale - the number of bars on which the graphics will be scaled (0 - maximum number)
  • inverse - turning upside-down schedule
  • MA - show or no moving average to overlay graphics (true - show; false - no)
  • MAPeriod - period moving average
  • MAOnly - only shows the moving average (hide schedule)

Scaling takes place in such a way that the maximum and minimum on the plot in the N-bars (the bars_for_autoscale) coincide.

The indicator can be used to hedge their risks and trading strategies for spredovyh correlating pairs.

Download forex indicator for metatrader Corelation


Indicator for Forex - L_Correlation

A calculation of correlation coefficient between two graphs, quotations currency pair (exchange rate between the pair, which is attached to the chart the indicator, and a pair specified in the options bar).

In the window display is shown:

  • Graph of correlation coefficient (you can turn off the display, as shown in the drawings)
  • Schedule moving average correlation coefficient of the curve (you can turn off the display)
  • The average value of correlation coefficient for the specified number of recent bars
  • Histogram of the values of correlation coefficient (distribution function)

Options bar

Mode = 0, 1, 2... - The parameter that determines to what it is setting the price schedule to calculate the correlation (0 - to the closing price of the bar, 1 - for the difference between the price and the closing price of the opening, 2 - for the price to the closing price of the maximum bar ... completely - see comment in the code indicator)

Pair = "USDCHF", "EURUSD"Currency pair that you want to calculate the correlation factor
ShowCorrelation = true - if you want to display the buffer coefficient of correlation, = false, if you do not need
ShowMA = true - if you want to display the buffer moving average correlation coefficient, = false, if you do not need
CorrelationRadius = 15 - the radius of correlation
MA_Period = 10 - period moving average
ResultingBars = 0 - number of bars on which the final average of the calculated correlation coefficient (the value displayed in the lower left corner). the average is considered for all values of correlation coefficient

FontName = "Verdana" - the font, which displays the mean value of coefficient. корреляции Correlation
FontSize = 10 - font size
FontColor = Black - font color

Extras

  • Now it is possible to calculate the autocorrelation (controlled parameter AutoCorrelation, setting AutoCorrelationShift - deflection). In this mode, the parameter is ignored Pair.
  • (EssentialLevel) extrema ratio (auto-) correlations, which exceed a preset level (EssentialLevel)

ShowEssentialPoints - The number of significant points to be displayed. it shows all the points, if =- 1, it does not appear

  • In the autocorrelation in the chart shows the area, which were essential factor

ShowEssentialRanges - Number of Borders significant intervals (vertical lines) to display. If = 0, then display the border, if =- 1, it does not appear

ShowEssentialRectangles - ShowEssentialRectangles - The number of significant areas (rectangles in the chart) to display. If = 0, it shows all the areas, if =- 1, it does not appear

  • Added the ability to automatically select parameters and CorrelationRadius AutoCorrelationShift depending on the time-frame (for this you need to install them with zeros)
  • New versions of the basic functions (ie, the possible value of the Mode). For more information, see the commentary to the code of an indicator.
  • In the final inscription shows two kinds of average value of coefficient. correlations: the first number - this is a maximum of the histogram and the second - this time with a moving average for the entire length of stories (or just under the last ResultingBars bars)
  • ShowSummary Display of final markings inc (off) Parameter ShowSummary


Download Forex Indicator L_Correlation

DiNapoli's indicators

DinapoliTargets - Objectives DiNapoli

Objectives DiNapoli

Indicator for MT4

//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| DinapoliTargets.mq4 | / / | DinapoliTargets.mq4 |
//| mishanya_fx@yahoo.com | / / | Mishanya_fx@yahoo.com |
//| | / / | |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+

#property copyright "mishanya" # property copyright "mishanya"
#property link "mishanya_fx@yahoo.com" # property link "mishanya_fx@yahoo.com"

#property indicator_chart_window # property indicator_chart_window
#property indicator_buffers 1 # property indicator_buffers 1
#property indicator_color1 Blue # property indicator_color1 Blue
//---- input parameters //---- Input parameters
extern int barn=300; extern int barn = 300;
extern int Length=6; extern int Length = 6;
//---- buffers //---- Buffers
double ExtMapBuffer1[]; double ExtMapBuffer1 [];
//double ExtMapBuffer2[]; / / double ExtMapBuffer2 [];
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Custom indicator initialization function | / / | Custom indicator initialization function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int init() int init ()
{ (
//---- indicators //---- Indicators
SetIndexEmptyValue(0,0.0); SetIndexEmptyValue (0,0.0);
//SetIndexDrawBegin(0, barn); / / SetIndexDrawBegin (0, barn);
//SetIndexStyle(0,DRAW_SECTION); / / SetIndexStyle (0, DRAW_SECTION);
SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer (0, ExtMapBuffer1);

//----
return(0); return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Custor indicator deinitialization function | / / | Custor indicator deinitialization function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int deinit() int deinit ()
{ (

ObjectDelete("Start line"); ObjectDelete ( "Start line");
ObjectDelete("Stop line"); ObjectDelete ( "Stop line");
ObjectDelete("Target1 line"); ObjectDelete ( "Target1 line");
ObjectDelete("Target2 line"); ObjectDelete ( "Target2 line");
ObjectDelete("Target3 line"); ObjectDelete ( "Target3 line");
return(0); return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Custom indicator iteration function | / / | Custom indicator iteration function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int start() int start ()
{ (
int counted_bars=IndicatorCounted(); int counted_bars = IndicatorCounted ();
int shift,Swing,Swing_n,uzl,i,zu,zd,mv; int shift, Swing, Swing_n, uzl, i, zu, zd, mv;
double PointA,PointB,PointC,Target1,Target2,Target3,Fantnsy,CrazyDream,Start,Stop; double PointA, PointB, PointC, Target1, Target2, Target3, Fantnsy, CrazyDream, Start, Stop;
double LL,HH,BH,BL,NH,NL; double LL, HH, BH, BL, NH, NL;
double Uzel[10000][3]; double Uzel [10000] [3];
string text; string text;
// loop from first bar to current bar (with shift=0) / / Loop from first bar to current bar (with shift = 0)
Swing_n=0;Swing=0;uzl=0; Swing_n = 0; Swing = 0; uzl = 0;
BH =High[barn];BL=Low[barn];zu=barn;zd=barn; BH = High [barn]; BL = Low [barn]; zu = barn; zd = barn;

for (shift=barn;shift>=0;shift--) { for (shift = barn; shift> = 0; shift -) (
LL=10000000;HH=-100000000; LL = 10000000; HH =- 100000000;
for (i=shift+Length;i>=shift+1;i--) { for (i = shift + Length; i> = shift +1; i -) (
if (Low[i]< ll="Low[i];} if (Low [i]
if (High[i]>HH) {HH=High[i];} if (High [i]> HH) (HH = High [i];)
} )


if (Low[shift] if (Low [shift] HH){ HH) (
Swing=2; Swing = 2;
if (Swing_n==1) {zu=shift+1;} if (Swing_n == 1) (zu = shift +1;)
if (Swing_n==-1) {zd=shift+1;} if (Swing_n ==- 1) (zd = shift +1;)
} else { ) Else (
if (Low[shift] if (Low [shift]
if (High[shift]>HH) {Swing=1;} if (High [shift]> HH) (Swing = 1;)
} )

if (Swing!=Swing_n && Swing_n!=0) { if (Swing! = Swing_n & & Swing_n! = 0) (
if (Swing==2) { if (Swing == 2) (
Swing=-Swing_n;BH = High[shift];BL = Low[shift]; Swing =- Swing_n; BH = High [shift]; BL = Low [shift];
} )
uzl=uzl+1; uzl = uzl +1;
if (Swing==1) { if (Swing == 1) (
Uzel[uzl][1]=zd; Uzel [uzl] [1] = zd;
Uzel[uzl][2]=BL; Uzel [uzl] [2] = BL;
} )
if (Swing==-1) { if (Swing ==- 1) (
Uzel[uzl][1]=zu; Uzel [uzl] [1] = zu;
Uzel[uzl][2]=BH; Uzel [uzl] [2] = BH;
} )
BH = High[shift]; BH = High [shift];
BL = Low[shift]; BL = Low [shift];
} )

if (Swing==1) { if (Swing == 1) (
if (High[shift]>=BH) {BH=High[shift];zu=shift;}} if (High [shift]> = BH) (BH = High [shift]; zu = shift;))
if (Swing==-1) { if (Swing ==- 1) (
if (Low[shift]<=BL) {BL=Low[shift]; zd=shift;}} if (Low [shift] <= BL) (BL = Low [shift]; zd = shift;))
Swing_n=Swing; Swing_n = Swing;
} )
for (i=1;i<=uzl;i++) { for (i = 1; i <= uzl; i + +) (
//text=DoubleToStr(Uzel[i][1],0); / / text = DoubleToStr (Uzel [i] [1], 0);
//text=; / / text =;
mv=StrToInteger(DoubleToStr(Uzel[i][1],0)); mv = StrToInteger (DoubleToStr (Uzel [i] [1], 0));
//ExtMapBuffer1[mv]=Uzel[i][2]; / / ExtMapBuffer1 [mv] = Uzel [i] [2];
} )

PointA = Uzel[uzl-2][2]; PointA = Uzel [uzl-2] [2];
PointB = Uzel[uzl-1][2]; PointB = Uzel [uzl-1] [2];
PointC = Uzel[uzl][2]; PointC = Uzel [uzl] [2];

Comment(PointA," ",PointB," ",PointC); Comment (PointA, "", PointB, "", PointC);

Target1=NormalizeDouble((PointB-PointA)*0.618+PointC,4); Target1 = NormalizeDouble ((PointB-PointA) * 0.618 + PointC, 4);
Target2=PointB-PointA+PointC; Target2 = PointB-PointA + PointC;
Target3=NormalizeDouble((PointB-PointA)*1.618+PointC,4); Target3 = NormalizeDouble ((PointB-PointA) * 1.618 + PointC, 4);
Fantnsy=NormalizeDouble((PointB-PointA)*2.618+PointC,4); Fantnsy = NormalizeDouble ((PointB-PointA) * 2.618 + PointC, 4);
CrazyDream=NormalizeDouble((PointB-PointA)*4.618+PointC,4); CrazyDream = NormalizeDouble ((PointB-PointA) * 4.618 + PointC, 4);
if (PointB if (PointB
{ (
Start= NormalizeDouble((PointB-PointA)*0.318+PointC,4)-(Ask-Bid); Start = NormalizeDouble ((PointB-PointA) * 0.318 + PointC, 4) - (Ask-Bid);
Stop=PointC+2*(Ask-Bid); Stop = PointC +2 * (Ask-Bid);
} )
if (PointB>PointC) if (PointB> PointC)
{ (
Start= NormalizeDouble((PointB-PointA)*0.318+PointC,4)+(Ask-Bid); Start = NormalizeDouble ((PointB-PointA) * 0.318 + PointC, 4) + (Ask-Bid);
Stop=PointC-2*(Ask-Bid); Stop = PointC-2 * (Ask-Bid);
} )


if (ObjectFind("Start Line") != 0) if (ObjectFind ( "Start Line")! = 0)
{ (
ObjectCreate("Start line",OBJ_HLINE,0,Time[0],Start); ObjectCreate ( "Start line", OBJ_HLINE, 0, Time [0], Start);
ObjectSet("Start line",OBJPROP_COLOR,Honeydew); ObjectSet ( "Start line", OBJPROP_COLOR, Honeydew);
ObjectSet("Start line",OBJPROP_WIDTH,1); ObjectSet ( "Start line", OBJPROP_WIDTH, 1);
ObjectSet("Start line",OBJPROP_STYLE,STYLE_DOT); ObjectSet ( "Start line", OBJPROP_STYLE, STYLE_DOT);
} )
else
{ (
ObjectMove("Start line", 0,Time[0],Start); ObjectMove ( "Start line", 0, Time [0], Start);
} )

if (ObjectFind("Stop Line") != 0) if (ObjectFind ( "Stop Line")! = 0)
{ (
ObjectCreate("Stop line",OBJ_HLINE,0,Time[0],Stop); ObjectCreate ( "Stop line", OBJ_HLINE, 0, Time [0], Stop);
ObjectSet("Stop line",OBJPROP_COLOR,Red); ObjectSet ( "Stop line", OBJPROP_COLOR, Red);
ObjectSet("Stop line",OBJPROP_WIDTH,1); ObjectSet ( "Stop line", OBJPROP_WIDTH, 1);
ObjectSet("Stop line",OBJPROP_STYLE,STYLE_DOT); ObjectSet ( "Stop line", OBJPROP_STYLE, STYLE_DOT);
} )
else
{ (
ObjectMove("Stop line", 0,Time[0],Stop); ObjectMove ( "Stop line", 0, Time [0], Stop);
} )

if (ObjectFind("Target1 Line") != 0) if (ObjectFind ( "Target1 Line")! = 0)
{ (
ObjectCreate("Target1 line",OBJ_HLINE,0,Time[0],Target1); ObjectCreate ( "Target1 line", OBJ_HLINE, 0, Time [0], Target1);
ObjectSet("Target1 line",OBJPROP_COLOR,Green); ObjectSet ( "Target1 line", OBJPROP_COLOR, Green);
ObjectSet("Target1 line",OBJPROP_WIDTH,1); ObjectSet ( "Target1 line", OBJPROP_WIDTH, 1);
ObjectSet("Target1 line",OBJPROP_STYLE,STYLE_DOT); ObjectSet ( "Target1 line", OBJPROP_STYLE, STYLE_DOT);
} )
else
{ (
ObjectMove("Target1 line", 0,Time[0],Target1); ObjectMove ( "Target1 line", 0, Time [0], Target1);
} )

if (ObjectFind("Target2 Line") != 0) if (ObjectFind ( "Target2 Line")! = 0)
{ (
ObjectCreate("Target2 line",OBJ_HLINE,0,Time[0],Target2); ObjectCreate ( "Target2 line", OBJ_HLINE, 0, Time [0], Target2);
ObjectSet("Target2 line",OBJPROP_COLOR,Yellow); ObjectSet ( "Target2 line", OBJPROP_COLOR, Yellow);
ObjectSet("Target2 line",OBJPROP_WIDTH,1); ObjectSet ( "Target2 line", OBJPROP_WIDTH, 1);
ObjectSet("Target2 line",OBJPROP_STYLE,STYLE_DOT); ObjectSet ( "Target2 line", OBJPROP_STYLE, STYLE_DOT);
} )
else
{ (
ObjectMove("Target2 line", 0,Time[0],Target2); ObjectMove ( "Target2 line", 0, Time [0], Target2);
} )

if (ObjectFind("Target3 Line") != 0) if (ObjectFind ( "Target3 Line")! = 0)
{ (
ObjectCreate("Target3 line",OBJ_HLINE,0,Time[0],Target3); ObjectCreate ( "Target3 line", OBJ_HLINE, 0, Time [0], Target3);
ObjectSet("Target3 line",OBJPROP_COLOR,DarkOrchid); ObjectSet ( "Target3 line", OBJPROP_COLOR, DarkOrchid);
ObjectSet("Target3 line",OBJPROP_WIDTH,1); ObjectSet ( "Target3 line", OBJPROP_WIDTH, 1);
ObjectSet("Target3 line",OBJPROP_STYLE,STYLE_DOT); ObjectSet ( "Target3 line", OBJPROP_STYLE, STYLE_DOT);
} )
else
{ (
ObjectMove("Target3 line", 0,Time[0],Target3); ObjectMove ( "Target3 line", 0, Time [0], Target3);
} )
return(0); return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+

Уровни Динаполи Din_fibo_high Dinapoli Levels Din_fibo_high

Одна из версий канала ДиНаполи One version of the channel DiNapoli



Индикатор под МТ4 Indicator for MT4
 //+------------------------------------------------------------------------------------+ //+----------------------------------------------- -------------------------------------+
//| Din_fibo_high.mq4 | / / | Din_fibo_high.mq4 |
//| unknown author, get from kaizer, conversed by Rosh | / / | Unknown author, get from kaizer, conversed by Rosh |
//| link to kaizer: http://forum.alpari-idc.ru/profile.php?mode=viewprofile&u=4196161 | / / | Link to kaizer: http://forum.alpari-idc.ru/profile.php?mode=viewprofile&u=4196161 |
//| http://forexsystems.ru/phpBB/index.php| / / | Http://forexsystems.ru/phpBB/index.php |
//+------------------------------------------------------------------------------------+ //+----------------------------------------------- -------------------------------------+

#property copyright "unknown author, get from kaizer, conversed by Rosh" # property copyright "unknown author, get from kaizer, conversed by Rosh"
#property link "http://forexsystems.ru/phpBB/index.php" # property link "http://forexsystems.ru/phpBB/index.php"

#property indicator_chart_window # property indicator_chart_window
#property indicator_buffers 2 # property indicator_buffers 2
#property indicator_color1 Blue # property indicator_color1 Blue
#property indicator_color2 Yellow # property indicator_color2 Yellow
//---- input parameters //---- Input parameters
extern int Ch_Period=3; extern int Ch_Period = 3;
extern double Ratio=0.786; extern double Ratio = 0.786;
extern bool SetAllBars=false; extern bool SetAllBars = false;
//---- buffers //---- Buffers
double ExtMapBuffer1[]; double ExtMapBuffer1 [];
double ExtMapBuffer2[]; double ExtMapBuffer2 [];
double tvBuffer[]; double tvBuffer [];
int hh,ll,first,counterPeriod; int hh, ll, first, counterPeriod;
double tv,MaH,MaL; double tv, MaH, MaL;
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Проверим - разделитель диапазона или нет | / / | Check - separator band or not |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
bool isDelimeter(int _Period, int _shift) bool isDelimeter (int _Period, int _shift)
{ (
bool result=false; Bool result = false;
//----
switch (_Period) Switch (_Period)
{ (
case 5:result=(TimeMinute(Time[_shift])==0)&&(TimeHour(Time[_shift])==0); break; case 5: result = (TimeMinute (Time [_shift]) == 0) & & (TimeHour (Time [_shift]) == 0); break;
case 15:result=(TimeMinute(Time[_shift])==0)&&(TimeHour(Time[_shift])==0); break; case 15: result = (TimeMinute (Time [_shift]) == 0) & & (TimeHour (Time [_shift]) == 0); break;
case 30:result=(TimeMinute(Time[_shift])==0)&&(TimeHour(Time[_shift])==0); break; case 30: result = (TimeMinute (Time [_shift]) == 0) & & (TimeHour (Time [_shift]) == 0); break;
case 60:result=(TimeMinute(Time[_shift])==0)&&(TimeHour(Time[_shift])==0); break; case 60: result = (TimeMinute (Time [_shift]) == 0) & & (TimeHour (Time [_shift]) == 0); break;
case 240:result=(TimeDayOfWeek(Time[_shift])==1)&&(TimeHour(Time[_shift])==0); break; case 240: result = (TimeDayOfWeek (Time [_shift]) == 1) & & (TimeHour (Time [_shift]) == 0); break;
case 1440:result=(TimeDay(Time[_shift])==1)||((TimeDay(Time[_shift])==2 && TimeDay(Time[_shift+1])!=1))||((TimeDay(Time[_shift])==3 && TimeDay(Time[_shift+1])!=2)); break; case 1440: result = (TimeDay (Time [_shift]) == 1 )||(( TimeDay (Time [_shift]) == 2 & & TimeDay (Time [_shift +1])! = 1 ))||(( TimeDay (Time [_shift]) == 3 & & TimeDay (Time [_shift +1])! = 2)); break;
case 10080:result=TimeDay(Time[_shift])<=7 && TimeMonth(Time[_shift])==1; break; case 10080: result = TimeDay (Time [_shift]) <= 7 & & TimeMonth (Time [_shift]) == 1; break;
default: Print("Недопустимый период!!!"); default: Print ( "Invalid time !!!");
} )
//----
return(result); Return (result);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Установим MaH и MaL на границе диапазона | / / | Install MaH and on the border of the range MaL |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
void SetHnL(int _shift) void SetHnL (int _shift)
{ (
//----
int i=_shift+1; Int i = _shift +1;
counterPeriod=0; CounterPeriod = 0;
while (counterPeriod While (counterPeriod
{ (
while (tvBuffer[i]==0.0 && i While (tvBuffer [i] == 0.0 & & i
counterPeriod++; CounterPeriod + +;
i++; I + +;
} )
i--; I -;
hh=Highest(NULL,0,MODE_HIGH,i-_shift,_shift+1); Hh = Highest (NULL, 0, MODE_HIGH, i-_shift, _shift +1);
ll=Lowest(NULL,0,MODE_LOW,i-_shift,_shift+1); Ll = Lowest (NULL, 0, MODE_LOW, i-_shift, _shift +1);
tv=NormalizeDouble((High[hh]+Low[ll]+Close[_shift+1])/3.0,Digits); tv = NormalizeDouble ((High [hh] + Low [ll] + Close [_shift +1]) / 3.0, Digits);
MaH=tv+NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaH = tv + NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
MaL=tv-NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaL = tv-NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
tvBuffer[_shift]=tv; TvBuffer [_shift] = tv;
ExtMapBuffer1[_shift]=MaH; ExtMapBuffer1 [_shift] = MaH;
ExtMapBuffer2[_shift]=MaL; ExtMapBuffer2 [_shift] = MaL;
SetMovingHnL(i, _shift); SetMovingHnL (i, _shift);

//----
return; Return;
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Установим MaH и MaL внутри диапазона | / / | Install MaH and MaL within the range |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
void SetMovingHnL(int _DelimeterBar,int CurBar) void SetMovingHnL (int _DelimeterBar, int CurBar)
{ (
double delta; Double delta;
//----
delta=(tvBuffer[_DelimeterBar]-tvBuffer[CurBar])/(_DelimeterBar-CurBar); delta = (tvBuffer [_DelimeterBar]-tvBuffer [CurBar ])/(_ DelimeterBar-CurBar);
//----
return; Return;
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Установим MaH и MaL на правом краю | / / | Install MaH MaL and on the right side of |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
void SetValuesNullBar(int _shift) void SetValuesNullBar (int _shift)
{ (
//----
int i=_shift; Int i = _shift;
while (tvBuffer[i]==0.0) i++; While (tvBuffer [i] == 0.0) i + +;
for (int j=i-1;j>_shift;j--) For (int j = i-1; j> _shift; j -)
{ (
ExtMapBuffer1[j]=0.0; ExtMapBuffer1 [j] = 0.0;
ExtMapBuffer2[j]=0.0; ExtMapBuffer2 [j] = 0.0;
} )
i=_shift; I = _shift;
counterPeriod=0; CounterPeriod = 0;
while (counterPeriod While (counterPeriod
{ (
while (tvBuffer[i]==0.0 && i While (tvBuffer [i] == 0.0 & & i
counterPeriod++; CounterPeriod + +;
i++; I + +;
} )
i--; I -;
hh=Highest(NULL,0,MODE_HIGH,i-_shift,_shift); Hh = Highest (NULL, 0, MODE_HIGH, i-_shift, _shift);
ll=Lowest(NULL,0,MODE_LOW,i-_shift,_shift); Ll = Lowest (NULL, 0, MODE_LOW, i-_shift, _shift);
tv=NormalizeDouble((High[hh]+Low[ll]+Close[_shift])/3.0,Digits); tv = NormalizeDouble ((High [hh] + Low [ll] + Close [_shift]) / 3.0, Digits);
MaH=tv+NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaH = tv + NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
MaL=tv-NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaL = tv-NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
ExtMapBuffer1[_shift]=MaH; ExtMapBuffer1 [_shift] = MaH;
ExtMapBuffer2[_shift]=MaL; ExtMapBuffer2 [_shift] = MaL;
//SetMovingHnL(j, _shift); / / SetMovingHnL (j, _shift);
//----
return; Return;
}//-------------------------------------------------------------------+ }//----------------------------------------------- --------------------+
//| Custom indicator initialization function | / / | Custom indicator initialization function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int init() int init ()
{ (
//---- indicators //---- Indicators
IndicatorBuffers(3); IndicatorBuffers (3);
if (SetAllBars) If (SetAllBars)
{ (
SetIndexStyle(0,DRAW_LINE); SetIndexStyle (0, DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer (0, ExtMapBuffer1);
SetIndexLabel(0,"MaH"); SetIndexLabel (0, "MaH");
SetIndexEmptyValue(0,0.0); SetIndexEmptyValue (0,0.0);

SetIndexStyle(1,DRAW_LINE); SetIndexStyle (1, DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer (1, ExtMapBuffer2);
SetIndexLabel(1,"MaL"); SetIndexLabel (1, "MaL");
SetIndexEmptyValue(1,0.0); SetIndexEmptyValue (1,0.0);
} )
else Else
{ (
SetIndexStyle(0,DRAW_SECTION); SetIndexStyle (0, DRAW_SECTION);
SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer (0, ExtMapBuffer1);
SetIndexLabel(0,"MaH"); SetIndexLabel (0, "MaH");
SetIndexEmptyValue(0,0.0); SetIndexEmptyValue (0,0.0);

SetIndexStyle(1,DRAW_SECTION); SetIndexStyle (1, DRAW_SECTION);
SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer (1, ExtMapBuffer2);
SetIndexLabel(1,"MaL"); SetIndexLabel (1, "MaL");
SetIndexEmptyValue(1,0.0); SetIndexEmptyValue (1,0.0);
} )

SetIndexBuffer(2,tvBuffer); SetIndexBuffer (2, tvBuffer);
SetIndexEmptyValue(2,0.0); SetIndexEmptyValue (2,0.0);

//----
return(0); Return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Custor indicator deinitialization function | / / | Custor indicator deinitialization function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int deinit() int deinit ()
{ (
//----

//----
return(0); Return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
//| Custom indicator iteration function | / / | Custom indicator iteration function |
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+
int start() int start ()
{ (
int counted_bars=IndicatorCounted(); Int counted_bars = IndicatorCounted ();
int cnt,limit; Int cnt, limit;

//----
if (Period()==10080) return; If (Period () == 10080) return;
if (counted_bars<0)> If (counted_bars <0)>
if (counted_bars>0) limit=Bars-counted_bars; If (counted_bars> 0) limit = Bars-counted_bars;
if (counted_bars==0) If (counted_bars == 0)
{ (
// найти первый и второй разделитель и установить limit / / Find the first and second divider and set the limit
cnt=Bars-1; Cnt = Bars-1;
while (!isDelimeter(Period(),cnt)) cnt--; While (! IsDelimeter (Period (), cnt)) cnt -;
first=cnt; First = cnt;
cnt--; Cnt -;
counterPeriod=0; CounterPeriod = 0;
while (counterPeriod While (counterPeriod
{ (
while (!isDelimeter(Period(),cnt)) cnt--; While (! IsDelimeter (Period (), cnt)) cnt -;
cnt--; Cnt -;
counterPeriod++; CounterPeriod + +;
} )
cnt++; Cnt + +;
hh=Highest(NULL,0,MODE_HIGH,first-cnt,cnt+1); hh = Highest (NULL, 0, MODE_HIGH, first-cnt, cnt +1);
ll=Lowest(NULL,0,MODE_LOW,first-cnt,cnt+1); Ll = Lowest (NULL, 0, MODE_LOW, first-cnt, cnt +1);
tv=NormalizeDouble((High[hh]+Low[ll]+Close[cnt+1])/3.0,Digits); tv = NormalizeDouble ((High [hh] + Low [ll] + Close [cnt +1]) / 3.0, Digits);
MaH=tv+NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaH = tv + NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
MaL=tv-NormalizeDouble((High[hh]-Low[ll])/2.0*Ratio,Digits); MaL = tv-NormalizeDouble ((High [hh]-Low [ll]) / 2.0 * Ratio, Digits);
tvBuffer[cnt]=tv; TvBuffer [cnt] = tv;
ExtMapBuffer1[cnt]=MaH; ExtMapBuffer1 [cnt] = MaH;
ExtMapBuffer2[cnt]=MaL; ExtMapBuffer2 [cnt] = MaL;
limit=cnt-1; Limit = cnt-1;
} )
//----
for (int shift=limit;shift>=0;shift--) For (int shift = limit; shift> = 0; shift -)
{ (
if (isDelimeter(Period(),shift)) SetHnL(shift);// else SetMovingHnL(shift); if (isDelimeter (Period (), shift)) SetHnL (shift); / / else SetMovingHnL (shift);
if (shift==0) SetValuesNullBar(shift); If (shift == 0) SetValuesNullBar (shift);
} )

return(0); Return (0);
} )
//+------------------------------------------------------------------+ //+----------------------------------------------- -------------------+