Light Style© by Fisana

Перейти к содержимому


РАММ сервис NordFx: копируй сделки лучших трейдеров форекс


NordFX

Фотография
- - - - -

Помогите


  • Пожалуйста, авторизуйтесь, чтобы ответить
49 ответов в этой теме

#31 Andrei210

Andrei210

    записался

  • Пользователи ST test (off)
  • PipPip
  • 38 сообщений

Опубликовано 13 Декабрь 2011 - 04:27

Доброго времени суток!

У меня такая просьба, можно ли индикатор i-Sessions, сделать так, чтоб он зоны сессии выделял не фоном, а просто рамкой. Сам пытался разобраться, но не вижу где это вообще может отображаться. Если есть возможность, помогите.

Где то на просторах форума есть этот индикатор.Посмотрите http://forum.masterf...?showtopic=4031 пост №4 .

#32 Velnedy

Velnedy

    прописался

  • Пользователи ST test (off)
  • PipPipPip
  • 80 сообщений

Опубликовано 13 Декабрь 2011 - 05:23

Где то на просторах форума есть этот индикатор.Посмотрите http://forum.masterf...?showtopic=4031 пост №4 .


Спасибо за помощь, но моя просьба заключена в следующем, чтоб в настройках изменить этот индикатор, таким образом, чтоб вместо фоновой закраски сессионных зон, была просто рамка этой зоны. Вот как то так. Подскажите, как это можно сделать.

#33 zah

zah

    живет тут

  • Конкурс (off)
  • PipPipPipPipPip
  • 156 сообщений

Опубликовано 15 Декабрь 2011 - 08:36


Где то на просторах форума есть этот индикатор.Посмотрите http://forum.masterf...?showtopic=4031 пост №4 .


Спасибо за помощь, но моя просьба заключена в следующем, чтоб в настройках изменить этот индикатор, таким образом, чтоб вместо фоновой закраски сессионных зон, была просто рамка этой зоны. Вот как то так. Подскажите, как это можно сделать.



могу предложить такой вариант индюка

Вложенные файлы


--------------------------------------------------------------------------------------------------
Благодарность проходит быстро, страх-никогда! (М.Пьюзо "Крестный отец")
".....Они настолько поглощены незначительными подъёмами и спадами, что пропускают большие движения. Почти неизменно у огромного большинства есть сделки, открытые в противоположную сторону, в то время как широкий тренд идёт полным ходом. Спекулянт, который настаивает на том, чтобы пытаться получить прибыль от незначительных внутридневных движений, никогда не сможет использовать в своих интересах следующее важное изменение на рынке, когда оно произойдет..."
"How To Trade in Stocks" Jesse L.Livermore
Skype: zah_berkut
Кафедра FMA_Sar
Факультет Пробой Флета

#34 Velnedy

Velnedy

    прописался

  • Пользователи ST test (off)
  • PipPipPip
  • 80 сообщений

Опубликовано 15 Декабрь 2011 - 11:12

могу предложить такой вариант индюка


Да, спасибо, что то такое я и предполагал.

Сообщение изменено: Velnedy, 15 Декабрь 2011 - 11:13 .


#35 enjoy

enjoy

    записался

  • Пользователи ST test (off)
  • PipPip
  • 30 сообщений

Опубликовано 08 Март 2012 - 03:00

Всем здравствуйте, помогите пожалуйста. Нашла код советника,но при компиляции выдает 3 ошибки. Если есть возможность помогите их исправить. Спасибо


//+——————————————————————+
//| Fisher_m11.mq4 |
//| Copyright © 23.07.2006 MartinG |
//| home.arcor.de/cam06/fisher |
//+——————————————————————+
#property copyright “Copyright © 23.07.2006 MartinG”
#property link “http://home.arcor.de/cam06/fisher”
//—-
#property indicator_separate_window
//#property indicator_minimum -1
//#property indicator_maximum 1
#property indicator_buffers 3
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_width2 4
#property indicator_width3 4
//—-
int LeftNum1=56;
int LeftNum2=56;
//—-
extern int RangePeriods=10;
extern double PriceSmoothing=0.3; // =0.67 bei Fisher_m10
extern double IndexSmoothing=0.3; // =0.50 bei Fisher_m10
string ThisName=”Fisher_m11″;
int DrawStart;
//—- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
IndicatorBuffers(4);
SetIndexLabel(0,”Fish”);
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,ExtMapBuffer4);
//—-
string Text=ThisName;
Text=Text+” (rPeriods “+RangePeriods;
Text=Text+”, pSmooth “+DoubleToStr(PriceSmoothing,2);
Text=Text+”, iSmooth “+DoubleToStr(IndexSmoothing,2);
Text=Text+”) “;
IndicatorShortName(Text);
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
DrawStart=2*RangePeriods+4; // DrawStart= BarNumber calculated from left to right
SetIndexDrawBegin(1,DrawStart);
SetIndexDrawBegin(2,DrawStart);
//—-
if (PriceSmoothing>=1.0)
{
PriceSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (PriceSmoothing=1.0)
{
IndexSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (IndexSmoothing<0)
{
IndexSmoothing=0;
Alert(”Fish61: PriceSmothing factor mustn”t be negative!”);
}
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
if (Bars {
Alert(”Fish84: Not enough Bars loaded to calculate FisherIndicator with RangePeriods=”,RangePeriods);
return(-1);
}
//—-
int counted_bars=IndicatorCounted();
if (counted_bars0) counted_bars–;
//—-
int Position=Bars-counted_bars; // Position = BarPosition calculated from right to left
int LeftNum1=Bars-Position; // when more bars are loaded the Position of a bar changes but not its LeftNum
if (LeftNum1=0)
{
CalculateCurrentBar(Position);
Position–;
}
//—-
return(0);
}
//+——————————————————————+
//| Single Bar Calculation function |
//+——————————————————————+
int CalculateCurrentBar(int pos)
{
double LowestLow, HighestHigh, GreatestRange, MidPrice;
double PriceLocation, SmoothedLocation, FishIndex, SmoothedFish;
//—-
LowestLow=Low[Lowest(NULL,0,MODE_LOW,RangePeriods,pos)];
HighestHigh=High[Highest(NULL,0,MODE_HIGH,RangePeriods,pos)];
if (HighestHigh-LowestLow -1 < PriceLocation 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird
// FisherIndex
if(1-SmoothedLocation!=0) FishIndex=MathLog((1+SmoothedLocation)/(1-SmoothedLocation));
else Alert(”Fisher129: Unerlaubter Zustand bei Bar Nummer “,Bars-pos);
// Smoothing of FisherIndex
ExtMapBuffer1[pos]=IndexSmoothing*ExtMapBuffer1[pos+1]+(1.0-IndexSmoothing)*FishIndex;
if (Bars-pos0) // up trend
{
ExtMapBuffer2[pos]=SmoothedFish;
ExtMapBuffer3[pos]=0;
}
else // else down trend
{
ExtMapBuffer2[pos]=0;
ExtMapBuffer3[pos]=SmoothedFish;
}
//—-
return(0);
}
//+——————————————————————+

#36 PetrMFXV

PetrMFXV

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 183 сообщений

Опубликовано 10 Март 2012 - 07:42

Всем здравствуйте, помогите пожалуйста. Нашла код советника,но при компиляции выдает 3 ошибки. Если есть возможность помогите их исправить. Спасибо


//+——————————————————————+
//| Fisher_m11.mq4 |
//| Copyright © 23.07.2006 MartinG |
//| home.arcor.de/cam06/fisher |
//+——————————————————————+
#property copyright “Copyright © 23.07.2006 MartinG”
#property link “http://home.arcor.de/cam06/fisher”
//—-
#property indicator_separate_window
//#property indicator_minimum -1
//#property indicator_maximum 1
#property indicator_buffers 3
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_width2 4
#property indicator_width3 4
//—-
int LeftNum1=56;
int LeftNum2=56;
//—-
extern int RangePeriods=10;
extern double PriceSmoothing=0.3; // =0.67 bei Fisher_m10
extern double IndexSmoothing=0.3; // =0.50 bei Fisher_m10
string ThisName=”Fisher_m11″;
int DrawStart;
//—- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
IndicatorBuffers(4);
SetIndexLabel(0,”Fish”);
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,ExtMapBuffer4);
//—-
string Text=ThisName;
Text=Text+” (rPeriods “+RangePeriods;
Text=Text+”, pSmooth “+DoubleToStr(PriceSmoothing,2);
Text=Text+”, iSmooth “+DoubleToStr(IndexSmoothing,2);
Text=Text+”) “;
IndicatorShortName(Text);
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
DrawStart=2*RangePeriods+4; // DrawStart= BarNumber calculated from left to right
SetIndexDrawBegin(1,DrawStart);
SetIndexDrawBegin(2,DrawStart);
//—-
if (PriceSmoothing>=1.0)
{
PriceSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (PriceSmoothing=1.0)
{
IndexSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (IndexSmoothing<0)
{
IndexSmoothing=0;
Alert(”Fish61: PriceSmothing factor mustn”t be negative!”);
}
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
if (Bars {
Alert(”Fish84: Not enough Bars loaded to calculate FisherIndicator with RangePeriods=”,RangePeriods);
return(-1);
}
//—-
int counted_bars=IndicatorCounted();
if (counted_bars0) counted_bars–;
//—-
int Position=Bars-counted_bars; // Position = BarPosition calculated from right to left
int LeftNum1=Bars-Position; // when more bars are loaded the Position of a bar changes but not its LeftNum
if (LeftNum1=0)
{
CalculateCurrentBar(Position);
Position–;
}
//—-
return(0);
}
//+——————————————————————+
//| Single Bar Calculation function |
//+——————————————————————+
int CalculateCurrentBar(int pos)
{
double LowestLow, HighestHigh, GreatestRange, MidPrice;
double PriceLocation, SmoothedLocation, FishIndex, SmoothedFish;
//—-
LowestLow=Low[Lowest(NULL,0,MODE_LOW,RangePeriods,pos)];
HighestHigh=High[Highest(NULL,0,MODE_HIGH,RangePeriods,pos)];
if (HighestHigh-LowestLow -1 < PriceLocation 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird
// FisherIndex
if(1-SmoothedLocation!=0) FishIndex=MathLog((1+SmoothedLocation)/(1-SmoothedLocation));
else Alert(”Fisher129: Unerlaubter Zustand bei Bar Nummer “,Bars-pos);
// Smoothing of FisherIndex
ExtMapBuffer1[pos]=IndexSmoothing*ExtMapBuffer1[pos+1]+(1.0-IndexSmoothing)*FishIndex;
if (Bars-pos0) // up trend
{
ExtMapBuffer2[pos]=SmoothedFish;
ExtMapBuffer3[pos]=0;
}
else // else down trend
{
ExtMapBuffer2[pos]=0;
ExtMapBuffer3[pos]=SmoothedFish;
}
//—-
return(0);
}
//+——————————————————————+


Во-первых, это код не советника, а индюка.
Во-вторых, там гораздо больше ошибок.
В-третьих, алгоритм функции CalculateCurrentBar очень странный. Особенно эти операторы:

if (HighestHigh-LowestLow -1 < PriceLocation 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird

В первом вообще ошибка. В этом тоже ошибка:

if (Bars-pos0) // up trend

Откуда взялась переменная pos0, если допустить что это входной параметр pos функции, то очень странно выглядет определение тренда выражением

if (Bars-pos)

Также бардак с буферами индюка. Короче, во вложении индюк с исправленным синтаксисом, но он ничего показывать не будет. Ищите нормальный код.

Вложенные файлы


Сообщение изменено: PetrMFXV, 10 Март 2012 - 07:46 .


#37 enjoy

enjoy

    записался

  • Пользователи ST test (off)
  • PipPip
  • 30 сообщений

Опубликовано 15 Март 2012 - 10:43


Всем здравствуйте, помогите пожалуйста. Нашла код советника,но при компиляции выдает 3 ошибки. Если есть возможность помогите их исправить. Спасибо


//+——————————————————————+
//| Fisher_m11.mq4 |
//| Copyright © 23.07.2006 MartinG |
//| home.arcor.de/cam06/fisher |
//+——————————————————————+
#property copyright “Copyright © 23.07.2006 MartinG”
#property link “http://home.arcor.de/cam06/fisher”
//—-
#property indicator_separate_window
//#property indicator_minimum -1
//#property indicator_maximum 1
#property indicator_buffers 3
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_width2 4
#property indicator_width3 4
//—-
int LeftNum1=56;
int LeftNum2=56;
//—-
extern int RangePeriods=10;
extern double PriceSmoothing=0.3; // =0.67 bei Fisher_m10
extern double IndexSmoothing=0.3; // =0.50 bei Fisher_m10
string ThisName=”Fisher_m11″;
int DrawStart;
//—- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
IndicatorBuffers(4);
SetIndexLabel(0,”Fish”);
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,ExtMapBuffer4);
//—-
string Text=ThisName;
Text=Text+” (rPeriods “+RangePeriods;
Text=Text+”, pSmooth “+DoubleToStr(PriceSmoothing,2);
Text=Text+”, iSmooth “+DoubleToStr(IndexSmoothing,2);
Text=Text+”) “;
IndicatorShortName(Text);
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
DrawStart=2*RangePeriods+4; // DrawStart= BarNumber calculated from left to right
SetIndexDrawBegin(1,DrawStart);
SetIndexDrawBegin(2,DrawStart);
//—-
if (PriceSmoothing>=1.0)
{
PriceSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (PriceSmoothing=1.0)
{
IndexSmoothing=0.9999;
Alert(”Fish61: PriceSmothing factor has to be smaller 1!”);
}
if (IndexSmoothing<0)
{
IndexSmoothing=0;
Alert(”Fish61: PriceSmothing factor mustn”t be negative!”);
}
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
if (Bars {
Alert(”Fish84: Not enough Bars loaded to calculate FisherIndicator with RangePeriods=”,RangePeriods);
return(-1);
}
//—-
int counted_bars=IndicatorCounted();
if (counted_bars0) counted_bars–;
//—-
int Position=Bars-counted_bars; // Position = BarPosition calculated from right to left
int LeftNum1=Bars-Position; // when more bars are loaded the Position of a bar changes but not its LeftNum
if (LeftNum1=0)
{
CalculateCurrentBar(Position);
Position–;
}
//—-
return(0);
}
//+——————————————————————+
//| Single Bar Calculation function |
//+——————————————————————+
int CalculateCurrentBar(int pos)
{
double LowestLow, HighestHigh, GreatestRange, MidPrice;
double PriceLocation, SmoothedLocation, FishIndex, SmoothedFish;
//—-
LowestLow=Low[Lowest(NULL,0,MODE_LOW,RangePeriods,pos)];
HighestHigh=High[Highest(NULL,0,MODE_HIGH,RangePeriods,pos)];
if (HighestHigh-LowestLow -1 < PriceLocation 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird
// FisherIndex
if(1-SmoothedLocation!=0) FishIndex=MathLog((1+SmoothedLocation)/(1-SmoothedLocation));
else Alert(”Fisher129: Unerlaubter Zustand bei Bar Nummer “,Bars-pos);
// Smoothing of FisherIndex
ExtMapBuffer1[pos]=IndexSmoothing*ExtMapBuffer1[pos+1]+(1.0-IndexSmoothing)*FishIndex;
if (Bars-pos0) // up trend
{
ExtMapBuffer2[pos]=SmoothedFish;
ExtMapBuffer3[pos]=0;
}
else // else down trend
{
ExtMapBuffer2[pos]=0;
ExtMapBuffer3[pos]=SmoothedFish;
}
//—-
return(0);
}
//+——————————————————————+


Во-первых, это код не советника, а индюка.
Во-вторых, там гораздо больше ошибок.
В-третьих, алгоритм функции CalculateCurrentBar очень странный. Особенно эти операторы:

if (HighestHigh-LowestLow -1 < PriceLocation 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird

В первом вообще ошибка. В этом тоже ошибка:

if (Bars-pos0) // up trend

Откуда взялась переменная pos0, если допустить что это входной параметр pos функции, то очень странно выглядет определение тренда выражением

if (Bars-pos)

Также бардак с буферами индюка. Короче, во вложении индюк с исправленным синтаксисом, но он ничего показывать не будет. Ищите нормальный код.

Спасибо

#38 Максим Дмитриевич

Максим Дмитриевич

    прописался

  • Пользователи ST test (off)
  • PipPipPip
  • 60 сообщений

Опубликовано 16 Март 2012 - 03:29

Здравствуйте помогите пожалуйста!! Напишите советника который будет автоматически открывать и закрывать сделки по единственному сигналу индикатора, возможно такое? если да то я выложу индикатор, и попробуем осуществить это..

#39 Максим Дмитриевич

Максим Дмитриевич

    прописался

  • Пользователи ST test (off)
  • PipPipPip
  • 60 сообщений

Опубликовано 16 Март 2012 - 03:42

Там по сути все просто как меняется цвет сопровождения открывается позиция, как он меняется на другой цвет закрывается и открывается новый ордер в противоположную сторону

#40 enjoy

enjoy

    записался

  • Пользователи ST test (off)
  • PipPip
  • 30 сообщений

Опубликовано 22 Март 2012 - 04:31

.... Короче, во вложении индюк с исправленным синтаксисом, но он ничего показывать не будет. Ищите нормальный код.

Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо

#41 enjoy

enjoy

    записался

  • Пользователи ST test (off)
  • PipPip
  • 30 сообщений

Опубликовано 22 Март 2012 - 04:39


.... Короче, во вложении индюк с исправленным синтаксисом, но он ничего показывать не будет. Ищите нормальный код.

Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо

Ой, а как мне индюка сюда прикрепить чет не получилось...

#42 enjoy

enjoy

    записался

  • Пользователи ST test (off)
  • PipPip
  • 30 сообщений

Опубликовано 22 Март 2012 - 04:55



.... Короче, во вложении индюк с исправленным синтаксисом, но он ничего показывать не будет. Ищите нормальный код.

Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо

Ой, а как мне индюка сюда прикрепить чет не получилось...

Тогда вот так:
//+------------------------------------------------------------------+
//| Fisher_m11.mq4 |
//| Copyright © 23.07.2006 MartinG |
//| http://home.arcor.de/cam06/fisher |
//+------------------------------------------------------------------+
#property copyright "Copyright © 23.07.2006 MartinG"
#property link "http://home.arcor.de...e/cam06/fisher"
//----
#property indicator_separate_window
//#property indicator_minimum -1
//#property indicator_maximum 1
#property indicator_buffers 4
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_width2 4
#property indicator_width3 4
//----
int LeftNum1=56;
int LeftNum2=56;
//----
extern int RangePeriods=55;
extern double PriceSmoothing=0.03; // =0.67 bei Fisher_m10
extern double IndexSmoothing=0.00; // =0.50 bei Fisher_m10
extern int Left_Right=0;
extern int Up_Down = 0;
string ThisName="Fisher_m11";
int DrawStart;
int k;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(4);
SetIndexLabel(0,"Fish");
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,ExtMapBuffer4);
//----
string Text=ThisName;
Text=Text+" (rPeriods "+RangePeriods;
Text=Text+", pSmooth "+DoubleToStr(PriceSmoothing,2);
Text=Text+", iSmooth "+DoubleToStr(IndexSmoothing,2);
Text=Text+") ";
IndicatorShortName(Text);
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
DrawStart=2*RangePeriods+4; // DrawStart= BarNumber calculated from left to right
SetIndexDrawBegin(1,DrawStart);
SetIndexDrawBegin(2,DrawStart);
//----
if (PriceSmoothing>=1.0)
{
PriceSmoothing=0.9999;
Alert("Fish61: PriceSmothing factor has to be smaller 1!");
}
if (PriceSmoothing<0)
{
PriceSmoothing=0;
Alert("Fish61: PriceSmothing factor mustn''t be negative!");
}
if (IndexSmoothing>=1.0)
{
IndexSmoothing=0.9999;
Alert("Fish61: PriceSmothing factor has to be smaller 1!");
}
if (IndexSmoothing<0)
{
IndexSmoothing=0;
Alert("Fish61: PriceSmothing factor mustn''t be negative!");
}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
if (Bars<DrawStart)
{
Alert("Fish84: Not enough Bars loaded to calculate FisherIndicator with RangePeriods=",RangePeriods);
return(-1);
}
//----
int counted_bars=IndicatorCounted();
if (counted_bars<0) return(-1);
if (counted_bars>0) counted_bars--;
double LowestLow, HighestHigh, GreatestRange, MidPrice;
double PriceLocation, SmoothedLocation, FishIndex, SmoothedFish;
//----
int pos=Bars-counted_bars ;
// k=pos;
// Position = BarPosition calculated from right to left
int LeftNum1=Bars-pos; // when more bars are loaded the Position of a bar changes but not its LeftNum
if (LeftNum1<RangePeriods+1) { pos=Bars-RangePeriods-1; }
//----
while(pos>=0)
{
LowestLow=Low[Lowest(NULL,0,MODE_LOW,RangePeriods,pos)];
HighestHigh=High[Highest(NULL,0,MODE_HIGH,RangePeriods,pos)];
if (HighestHigh-LowestLow<0.1*Point)HighestHigh=LowestLow+0.1*Point;
GreatestRange=HighestHigh-LowestLow;
MidPrice=(High[pos]+Low[pos])/2;
k=pos+Left_Right;
// PriceLocation in current Range
if (GreatestRange!=0)
{
PriceLocation=(MidPrice-LowestLow)/GreatestRange;
PriceLocation= 2.0*PriceLocation - 1.0; // -> -1 < PriceLocation < +1
}
// Smoothing of PriceLocation
ExtMapBuffer4[k]=PriceSmoothing*ExtMapBuffer4[k+1]+(1.0-PriceSmoothing)*PriceLocation;
SmoothedLocation=ExtMapBuffer4[k];
if (SmoothedLocation> 0.99) SmoothedLocation= 0.99; // verhindert, dass MathLog unendlich wird
if (SmoothedLocation<-0.99) SmoothedLocation=-0.99; // verhindert, dass MathLog minuns unendlich wird
// FisherIndex
if(1-SmoothedLocation!=0) FishIndex=MathLog((1+SmoothedLocation)/(1-SmoothedLocation));
else Alert("Fisher129: Unerlaubter Zustand bei Bar Nummer ",Bars-(k));
// Smoothing of FisherIndex
ExtMapBuffer1[k]=IndexSmoothing*ExtMapBuffer1[k+1]+(1.0-IndexSmoothing)*FishIndex;
if (Bars-pos<DrawStart)ExtMapBuffer1[k]=0;
SmoothedFish=ExtMapBuffer1[k];
//----
if (SmoothedFish>0) // up trend
{
ExtMapBuffer2[k]=SmoothedFish;
ExtMapBuffer3[k]=0;
}
else // else down trend
{
ExtMapBuffer2[k]=0;
ExtMapBuffer3[k]=SmoothedFish;
}
//----
pos-- ;
}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Single Bar Calculation function |
//+------------------------------------------------------------------+


//+---------------------------------------------

#43 PetrMFXV

PetrMFXV

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 183 сообщений

Опубликовано 22 Март 2012 - 07:58

Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо


Попробуйте этот, но я его не тестил, по моему должен работать Размещенное изображение .

Вложенные файлы



#44 PetrMFXV

PetrMFXV

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 183 сообщений

Опубликовано 22 Март 2012 - 08:02


Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо


Попробуйте этот, но я его не тестил, по моему должен работать Размещенное изображение .

Не тот архив прикрепил, сейчас подправлю.

#45 PetrMFXV

PetrMFXV

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 183 сообщений

Опубликовано 22 Март 2012 - 10:30



Всем привет я нашла нужного индюка все работает как часикиРазмещенное изображение , ребята у меня просьба к тем кто понимает в програмировании, добавьте звуковой сигнал чтобы при пересечеии гистограммой нулевой линии индюк мне что нибудь громко пропищал. Спасибо


Попробуйте этот, но я его не тестил, по моему должен работать Размещенное изображение .

Не тот архив прикрепил, сейчас подправлю.


Извините, что так долго, проверял в живую. Можно еще подправить, а то на текущей свече срабатывает и еще не факт что свеча закроется в соответствие сигналу Размещенное изображение .

Вложенные файлы






Посетителей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных пользователей

Рейтинг брокеров форекс: кто лидер, кто аутсайдер и почему?




Masterforex-V NordFX

Rambler's Top100

Принимаем Z-Payment