← К каталогу
Исходный код · ID 1782

dz_inverse_fisher_transform_of_oma_rsi_nmc_2.mq5

Похожие материалы по тегам

!!!-mt4 x-xardg-rsi.mq5MQL5 / MetaTrader 5 · 2 общих тегов!!! rsi ma simple+arrows 1.2 (mtf).mq5MQL5 / MetaTrader 5 · 2 общих теговea robofibo source v.11.2.mq4MQL4 / MetaTrader 4 · 2 общих теговsureforexhedingvonepointoneone.mq4MQL4 / MetaTrader 4 · 2 общих теговsureforexhedging 1.10 optimized.mq4MQL4 / MetaTrader 4 · 2 общих теговsureforexhedging 1.09 a (2).mq4MQL4 / MetaTrader 4 · 2 общих тегов
Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

Индикатор для MetaTrader 4, рассчитывающий и отображающий обратное преобразование Фишера на основе сглаженной RSI с адаптивной скоростью. Использует внешнюю DLL dynamicZone.dll для определения зон вероятности покупки и продажи. Поддерживает работу на нескольких таймфреймах и интерполяцию данных между барами.

Настройки программы

НастройкаОписание
TimeFrame Таймфрейм — Выбор таймфрейма для расчёта индикатора или специальный режим возврата номера бара
RSIPeriod Период RSI — Период расчёта индикатора относительной силы
RSIPrice Цена RSI — Тип цены, используемой для расчёта RSI
OmaSpeed Скорость OMA — Коэффициент скорости сглаживающего фильтра OMA
OmaAdaptive Адаптивная OMA — Включение адаптивного режима сглаживания OMA
SmoothPeriod Период сглаживания — Период второго уровня сглаживания после RSI
SmoothSpeed Скорость сглаживания — Коэффициент скорости второго уровня сглаживания
SmoothAdaptive Адаптивное сглаживание — Включение адаптивного режима для второго уровня сглаживания
DzLookBack Глубина динамической зоны — Количество баров для анализа при определении зон вероятности
DzBuyProbability Вероятность покупки — Порог вероятности для формирования зоны покупки
DzSellProbability Вероятность продажи — Порог вероятности для формирования зоны продажи
Interpolate Интерполяция — Включение интерполяции значений между барами при отображении на чужом таймфрейме
Получить полный код

Поиск по коду файла

#property  indicator_separate_window
#property  indicator_buffers   8
#property  indicator_color1    LimeGreen
#property  indicator_color2    DarkGray
#property  indicator_color3    Orange
#property  indicator_color4    DarkGray
#property  indicator_color5    Orange
#property  indicator_color6    Orange
#property  indicator_color7    LimeGreen
#property  indicator_color8    LimeGreen
#property  indicator_width5    2
#property  indicator_width6    2
#property  indicator_width7    2
#property  indicator_width8    2
#property  indicator_maximum   1
#property  indicator_minimum  -1
#property  indicator_style1   STYLE_DOT
#property  indicator_style2   STYLE_DOT
#property  indicator_style3   STYLE_DOT
#import "dynamicZone.dll"
   double dzBuy(double& sourceArray[],double probabiltyValue, int lookBack, int bars, int i );
   double dzSell(double& sourceArray[],double probabiltyValue, int lookBack, int bars, int i );
#import

extern string TimeFrame         = "Current time frame";
extern int    RSIPeriod         =  32;
extern int    RSIPrice          =  PRICE_CLOSE;
extern double OmaSpeed          = 1.5;
extern bool   OmaAdaptive       = true;
extern double SmoothPeriod      =  3;
extern double SmoothSpeed       =  3;
extern bool   SmoothAdaptive    =  true;
extern int    DzLookBack        = 35;
extern double DzBuyProbability  = 0.15;
extern double DzSellProbability = 0.15;
extern bool   Interpolate       = true;

double ifishua[];
double ifishub[];
double ifishda[];
double ifishdb[];
double ifisher[];
double up[];
double dn[];
double mi[];

string indicatorFileName;
bool   returnBars;
bool   calculateValue;
int    timeFrame;

int init()
{
      // код доступен только после оплаты
   }
int deinit()
{
   return(0);
}

double trend[];
int start()
{
      // код доступен только после оплаты
   }
   int i,r,counted_bars=IndicatorCounted();
      if(counted_bars<0) return(-1);
      if(counted_bars>0) counted_bars--;
           int limit=MathMax(Bars-counted_bars,Bars-1);
           if (returnBars) { up[0] = limit+1; return(0); }
           if (ArraySize(trend)!=Bars) ArrayResize(trend,Bars);

   if (calculateValue || timeFrame==Period())
   {
      if (!calculateValue) if (trend[limit]== 1) CleanPoint(limit,ifishua,ifishub);
      if (!calculateValue) if (trend[limit]==-1) CleanPoint(limit,ifishda,ifishdb);

      for(i=limit, r=Bars-i-1; i>=0; i--,r++)
      {
         double rsi = 0.1*(iRsi(iMA(NULL,0,1,0,MODE_SMA,RSIPrice,i),RSIPeriod,OmaSpeed,OmaAdaptive,i)-50);      
         double avg = iOma(rsi,SmoothPeriod,SmoothSpeed,SmoothAdaptive,i,2);
         ifisher[i] = (MathExp(2*avg)-1)/(MathExp(2*avg)+1);
         trend[r]   = trend[r-1];
         up[i]      = dzSell(ifisher, DzSellProbability, DzLookBack, Bars, i);
         mi[i]      = dzSell(ifisher, 0.5              , DzLookBack, Bars, i);
         dn[i]      = dzBuy (ifisher, DzBuyProbability,  DzLookBack, Bars, i);
            if (ifisher[i] < up[i] && ifisher[i] > dn[i]) trend[r] =  0;
            if (ifisher[i] > up[i])                       trend[r] =  1;
            if (ifisher[i] < dn[i])                       trend[r] = -1;
            if (calculateValue) continue;

            ifishda[i] = EMPTY_VALUE; ifishdb[i] = EMPTY_VALUE;         
            ifishua[i] = EMPTY_VALUE; ifishub[i] = EMPTY_VALUE;         
               if (trend[r]== 1) PlotPoint(i,ifishua,ifishub,ifisher);
               if (trend[r]==-1) PlotPoint(i,ifishda,ifishdb,ifisher);
      }
      return(0);
   }      

   limit = MathMax(limit,MathMin(Bars-1,iCustom(NULL,timeFrame,indicatorFileName,"returnBars",0,0)*timeFrame/Period()));
   if (trend[limit]== 1) CleanPoint(limit,ifishua,ifishub);
   if (trend[limit]==-1) CleanPoint(limit,ifishda,ifishdb);
   for(i=limit, r=Bars-i-1; i>=0; i--,r++)
   {
      int y = iBarShift(NULL,timeFrame,Time[i]);
         ifisher[i] = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",RSIPeriod,RSIPrice,OmaSpeed,OmaAdaptive,SmoothPeriod,SmoothSpeed,SmoothAdaptive,DzLookBack,DzBuyProbability,DzSellProbability,3,y);
         up[i]      = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",RSIPeriod,RSIPrice,OmaSpeed,OmaAdaptive,SmoothPeriod,SmoothSpeed,SmoothAdaptive,DzLookBack,DzBuyProbability,DzSellProbability,0,y);
         mi[i]      = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",RSIPeriod,RSIPrice,OmaSpeed,OmaAdaptive,SmoothPeriod,SmoothSpeed,SmoothAdaptive,DzLookBack,DzBuyProbability,DzSellProbability,1,y);
         dn[i]      = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",RSIPeriod,RSIPrice,OmaSpeed,OmaAdaptive,SmoothPeriod,SmoothSpeed,SmoothAdaptive,DzLookBack,DzBuyProbability,DzSellProbability,2,y);
         ifishda[i] = EMPTY_VALUE; 
         ifishdb[i] = EMPTY_VALUE;         
         ifishua[i] = EMPTY_VALUE; 
         ifishub[i] = EMPTY_VALUE;         
         trend[r]   = trend[r-1

Показано первые 50% кода (символов: 8160)

Открыть по тарифу

Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.

Разовая покупка файла

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
816₽ ≈ $9.97