Navigation:Home > Content >

W_Pro_Binary_Atom_Bomb_v2+Pro_RSI&DYMI-3.mq4

Time: 2016-04-26 | Download file:W_Pro_Binary_Atom_Bomb_v2+Pro_RSI&DYMI-3.mq4

//+------------------------------------------------------------------+
//|                                                       Пример.mq4 |
//|                                           WINNER, Copyright 2017 |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "WINNER, Copyright 2017"
#property link      "http://binary-forum.com/conversations/add?to=WINNER"
#property version   "1.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 clrChartreuse
#property indicator_color2 clrRed
#property indicator_width1 1
#property indicator_width2 1

////////// ***  ИЗМЕНЯТЬ СТРОКИ 19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,38,40,41,42,43,44,45,46,47,48,49,51 *** ///////////
extern string ___="Настройки Binary_Atom_Bomb_v2";//=======================================
extern int Sistem=1;//1 - Sistem_1, 2 - Sistem_2
extern int Signal=2;//1 - Start_Signal, 2 - All_Signal
extern int Bands=1;//Bands, 1 - Off, 2 - On
extern int TD_1=5;
extern int TD_2=8;
extern int Similar=5;
extern int Rsi_Per=3;
extern int UpDown=2;
extern int Rsi_level=7;
extern int BB=20;
extern double BB_Step=2.7;
extern int Step_Pips=2;
extern int Test_bar=100000;
extern int Martin=0;
extern bool Alert_= false;
extern string ____="Настройки Pro_RSI&DYMI-3";//=======================================
extern string _____="Параметры RSI";//=======================================
extern int RSI_Per=3;//Период
extern int RSI_H=85;//Максимальный уровень
extern int RSI_L=15;//Минимальный уровень
extern string ______="Параметры DYMI";//=======================================
extern int price=0;//0 - Close price, 1 - Open price, 2 - High price, 3 - Low price
extern int StdDevPeriod=5;
extern int MAStdDevPeriod=10;
extern int MAStdDevMode=0;
extern int DMIPeriod=14;
extern int DmiLowerLimit=3;
extern int DmiUpperLimit=30;
extern int PlotMode=0;
extern int DYMI_H=80;//Максимальный уровень
extern int DMYMI_L=20;//Минимальный уровень

extern double  ArrowsMnoj=0.3;//Отступ стрел

                              ////////// ***  ДАЛЬШЕ НЕ ТРОГАТЬ!!!  *** ///////////////

double GetDistSdvig(){  return(iATR(NULL,0,70,1)*ArrowsMnoj); }
double Sdvig=0;
double UpArr[],DnArr[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit()
  {

   Sdvig=GetDistSdvig();

   IndicatorBuffers(2);
   SetIndexBuffer(0,UpArr);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,233);
   SetIndexBuffer(1,DnArr);
   SetIndexArrow(1,234);
   SetIndexStyle(1,DRAW_ARROW);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//----

   int limit=0;
//----
   if(prev_calculated==0)
      limit=rates_total-20;
//----
   if(prev_calculated>0)
      limit=rates_total-prev_calculated;

//----
   for(int i=limit;i>=0;i--)
     {

      double indup = iCustom(NULL, 0, "W_Binary_Atom_Bomb_v2+Pro_RSI&DYMI-3","",Sistem,Signal,Bands,TD_1,TD_2,Similar,Rsi_Per,UpDown,Rsi_level,BB,BB_Step,Step_Pips,Test_bar,Martin,Alert_,"","",RSI_Per,RSI_H,RSI_L,"",price,StdDevPeriod,MAStdDevPeriod,MAStdDevMode,DMIPeriod,DmiLowerLimit,DmiUpperLimit,PlotMode,DYMI_H,DMYMI_L,0, i);
      double inddn = iCustom(NULL, 0, "W_Binary_Atom_Bomb_v2+Pro_RSI&DYMI-3","",Sistem,Signal,Bands,TD_1,TD_2,Similar,Rsi_Per,UpDown,Rsi_level,BB,BB_Step,Step_Pips,Test_bar,Martin,Alert_,"","",RSI_Per,RSI_H,RSI_L,"",price,StdDevPeriod,MAStdDevPeriod,MAStdDevMode,DMIPeriod,DmiLowerLimit,DmiUpperLimit,PlotMode,DYMI_H,DMYMI_L,1, i);


      if(indup != EMPTY_VALUE) UpArr[i]=Low[i]-Sdvig;
      else UpArr[i] = EMPTY_VALUE;
      if(inddn != EMPTY_VALUE) DnArr[i]=High[i]+Sdvig;
      else DnArr[i] = EMPTY_VALUE;


     }

   return(rates_total);
  }
//+------------------------------------------------------------------+

Recommend