Новые сообщения · Участники · Правила форума · Поиск · RSS · Вход · Регистрация ·

Страница 103 из 133«12101102103104105132133»
Форум трейдеров » Скрипты Советники Индикаторы для Metatrader4/Metatrader5 » MT 4 MQL программирование, помощь. » Аллерт в Индикатор Alert() Alert Arrow (Алерт на экране после сигнала индикатора + уведомления почта)
Аллерт в Индикатор Alert() Alert Arrow

expforexДата: Среда, 03.04.2013, 18:22 | Сообщение # 1
Главный Администартор
Группа: Администраторы
Сообщений: 9037
Награды: 29
Статус: Offline


[Бонусы за сообщения ]



Алерт в индикатор. Как вставить Alert и Arrow в индикатор?

Внимание: Если Вы хотите чтобы Вам помогли в данной теме, пожалуйста:
1. Прикрепите индикатор, в который требуется вставить алерт. Открытый код!
2. Прикрепите картинку с данного индикатора, где ВЫ добавили стрелки и показали когда должен вознкиать алерт
3. Опишите словами подробно когда должен звучать алерт.

4. Сделайте краткое описание индикатора!

Наиболее частыми запросами в поисковике и в темах разных форумах встречаются фразы:
"Индикатора алерт","индикатор alert","Как добавить в индикатор звуковой сигнал?","Помогите вставить звуковой сигнал в индикатор", "Как вставить Alert и Стрелки ", "Как отправить сообщение на почту или телефон при сигнале от индикатора?"
В данной статье я попытаюсь максимально подробно рассказать легкий путь добавления Alert Mail Push Arrow в любой индикатор от www.expforex.com




Предисловие

Для того, чтобы начать правильную установку Алертов в Ваш индикатор, необходимо иметь открытый код Вашего индикатора. Декомпилированный код нежелателен, потому , что для новичка декомпилированный код представляет минимум информации. В нем трудно разобраться. А также у
Вас после редактирования могут возникнуть проблемы с компиляцией.


Начало работы

В первую очередь Вам необходимо выяснить, какие индикаторные буферы дают тот или иной сигнал, какова цель создания алерта, Каковы условия определения сигнала на индикаторе.
Важно: В индикаторах могут показываться только внешние буферы, определенные вначале кода переменной:
#property indicator_buffers 1
Но также в индикаторе могут быть скрытые буферы, которые задаются в функции init() и объявляются переменной:
IndicatorBuffers(7);
Нам нужны только первые буферы. Если например у Вас стоит 1 внешний буфер, то смотрим на переменную:
SetIndexBuffer(0,SarBuffer);
0 - это первый буфер
1 - это второй буфер .........



Настройки Алертов:
extern string Alerts="Алерты и стрелки от www.expforex.com";
extern bool AlerT=true;  // Выдавать алерт на экран
extern bool Mail=true;   // Посылать сообщение
extern bool Push=true;   // Посылать ПУШ на телефон
extern bool Arrow=true;  // Ставить стрелки на сигналах
extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом


Внимание!
Данная ветка создана для ПОМОЩИ, а не для редактирования Вашего кода. Если Вы желаете каких то особых алертов  - обращайтесь в раздел программирование.
Просьбы выполняются с наиболее интересными индикаторами, без доработок, в свободное время и под хорошее настроение.


Прикрепите индикатор и картинку с сигналами.

Прикрепления: DT-ZigZag-Lauer.mq4(3Kb)


Программирование на заказ || Наши Разработки

 
Сообщение

Алерт в индикатор. Как вставить Alert и Arrow в индикатор?

Внимание: Если Вы хотите чтобы Вам помогли в данной теме, пожалуйста:
1. Прикрепите индикатор, в который требуется вставить алерт. Открытый код!
2. Прикрепите картинку с данного индикатора, где ВЫ добавили стрелки и показали когда должен вознкиать алерт
3. Опишите словами подробно когда должен звучать алерт.

4. Сделайте краткое описание индикатора!

Наиболее частыми запросами в поисковике и в темах разных форумах встречаются фразы:
"Индикатора алерт","индикатор alert","Как добавить в индикатор звуковой сигнал?","Помогите вставить звуковой сигнал в индикатор", "Как вставить Alert и Стрелки ", "Как отправить сообщение на почту или телефон при сигнале от индикатора?"
В данной статье я попытаюсь максимально подробно рассказать легкий путь добавления Alert Mail Push Arrow в любой индикатор от www.expforex.com




Предисловие

Для того, чтобы начать правильную установку Алертов в Ваш индикатор, необходимо иметь открытый код Вашего индикатора. Декомпилированный код нежелателен, потому , что для новичка декомпилированный код представляет минимум информации. В нем трудно разобраться. А также у
Вас после редактирования могут возникнуть проблемы с компиляцией.


Начало работы

В первую очередь Вам необходимо выяснить, какие индикаторные буферы дают тот или иной сигнал, какова цель создания алерта, Каковы условия определения сигнала на индикаторе.
Важно: В индикаторах могут показываться только внешние буферы, определенные вначале кода переменной:
#property indicator_buffers 1
Но также в индикаторе могут быть скрытые буферы, которые задаются в функции init() и объявляются переменной:
IndicatorBuffers(7);
Нам нужны только первые буферы. Если например у Вас стоит 1 внешний буфер, то смотрим на переменную:
SetIndexBuffer(0,SarBuffer);
0 - это первый буфер
1 - это второй буфер .........



Настройки Алертов:
extern string Alerts="Алерты и стрелки от www.expforex.com";
extern bool AlerT=true;  // Выдавать алерт на экран
extern bool Mail=true;   // Посылать сообщение
extern bool Push=true;   // Посылать ПУШ на телефон
extern bool Arrow=true;  // Ставить стрелки на сигналах
extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом


Внимание!
Данная ветка создана для ПОМОЩИ, а не для редактирования Вашего кода. Если Вы желаете каких то особых алертов  - обращайтесь в раздел программирование.
Просьбы выполняются с наиболее интересными индикаторами, без доработок, в свободное время и под хорошее настроение.


Прикрепите индикатор и картинку с сигналами.

Автор - expforex
Дата добавления - 03.04.2013 в 18:22

zmeiДата: Среда, 25.11.2015, 18:50 | Сообщение # 1021
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

Код
Код[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    CycleIdentifier.mq4 |[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]#property copyright ""[color=#828282]#property link      ""[color=#828282]//----[color=#828282]#property indicator_separate_window[color=#828282]#property indicator_buffers 6[color=#828282]//----[color=#828282]#property indicator_color1 DarkGray[color=#828282]#property indicator_color2 Lime[color=#828282]#property indicator_color3 Red[color=#828282]#property indicator_color4 DarkGreen[color=#828282]#property indicator_color5 Brown[color=#828282]//----[color=#828282]#property indicator_minimum -1.2[color=#828282]#property indicator_maximum 1.2[color=#828282]//----[color=#828282]extern int       PriceActionFilter=1;[color=#828282]extern int       Length=3;[color=#828282]extern int       MajorCycleStrength=4;[color=#828282]extern bool      UseCycleFilter=false;[color=#828282]extern int       UseFilterSMAorRSI=1;[color=#828282]extern int       FilterStrengthSMA=12;[color=#828282]extern int       FilterStrengthRSI=21;[color=#828282]//----[color=#828282]double LineBuffer[];[color=#828282]double MajorCycleBuy[];[color=#828282]double MajorCycleSell[];[color=#828282]double MinorCycleBuy[];[color=#828282]double MinorCycleSell[];[color=#828282]double ZL1[];[color=#828282]//----[color=#828282]double CyclePrice=0.0, Strength =0.0, SweepA=0.0, SweepB=0.0;[color=#828282]int Switch=0, Switch2=0,   SwitchA=0, SwitchB=0, SwitchC=0, SwitchD=0, SwitchE=0, SwitchAA=0, SwitchBB=0;[color=#828282]double Price1BuyA=0.0, Price2BuyA=0.0;[color=#828282]int Price1BuyB=1.0, Price2BuyB=1.0;[color=#828282]double Price1SellA=0.0, Price2SellA=0.0;[color=#828282]int Price1SellB=0.0, Price2SellB=0.0;[color=#828282]bool ActiveSwitch=True, BuySwitchA=FALSE, BuySwitchB=FALSE, SellSwitchA=FALSE, SellSwitchB=FALSE;[color=#828282]int BuySellFac=01;[color=#828282]bool Condition1, Condition2, Condition3, Condition6;[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]int init()    [color=#828282]{   [color=#828282]SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);   [color=#828282]SetIndexBuffer(0,LineBuffer);   [color=#828282]SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(1,MajorCycleBuy);   [color=#828282]SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(2,MajorCycleSell);   [color=#828282]SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(3,MinorCycleBuy);   [color=#828282]SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(4,MinorCycleSell);   [color=#828282]SetIndexStyle(5,DRAW_NONE);   [color=#828282]SetIndexBuffer(5,ZL1);   [color=#828282]SetIndexEmptyValue(1,0.0);   [color=#828282]SetIndexEmptyValue(2,0.0);   [color=#828282]SetIndexEmptyValue(3,0.0);   [color=#828282]SetIndexEmptyValue(4,0.0);   [color=#828282]SetIndexEmptyValue(5,0.0);   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]int deinit() {return(0);}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+  [color=#828282]extern string Alerts="Алерты и стрелки от www.expforex.com";  [color=#828282]extern bool AlerT=true;  // Выдавать алерт на экран            [color=#828282]extern bool Mail=true;   // Посылать сообщение           [color=#828282]extern bool Push=true;   // Посылать ПУШ на телефон  [color=#828282]extern bool Arrow=true;  // Ставить стрелки на сигналах  [color=#828282]extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом  [color=#828282]int timeee;              // Внутренняя переменная  [color=#828282]string nameInd; [color=#828282]void SetArrow(int cd, color cl,              [color=#828282]string nm="", datetime t1=0, double p1=0, int sz=3) {  [color=#828282]if (nm=="") nm=DoubleToStr(Time[0], 0);  [color=#828282]if (t1<=0) t1=Time[0];  [color=#828282]if (p1<=0) p1=Bid;  [color=#828282]nameInd=WindowExpertName( );[color=#828282]int wind=WindowFind(nameInd);[color=#828282]wind=0;  [color=#828282]if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_ARROW, wind, 0,0);  [color=#828282]ObjectSet(nm, OBJPROP_TIME1    , t1);  [color=#828282]ObjectSet(nm, OBJPROP_PRICE1   , p1);  [color=#828282]ObjectSet(nm, OBJPROP_ARROWCODE, cd);  [color=#828282]ObjectSet(nm, OBJPROP_COLOR    , cl);  [color=#828282]ObjectSet(nm, OBJPROP_WIDTH    , sz);[color=#828282]} [color=#828282]void Expforex_AlertArrow(string text="",int arrowdir=0,bool history=false,int i=0)  [color=#828282]{   [color=#828282]nameInd=WindowExpertName();   [color=#828282]int wind=WindowFind(nameInd);   [color=#828282]if(wind==-1)wind=0;   [color=#828282]ObjectCreate("Originalalert",OBJ_LABEL,wind,0,0);   [color=#828282]ObjectSetText("Originalalert","Модификация AlertArrow www.expforex.com",10,"Arial Bold",Red);   [color=#828282]ObjectSet("Originalalert",OBJPROP_CORNER,2);   [color=#828282]ObjectSet("Originalalert",OBJPROP_XDISTANCE,200);   [color=#828282]ObjectSet("Originalalert",OBJPROP_YDISTANCE,10);   [color=#828282]if(!history)     [color=#828282]{      [color=#828282]if(AlerT) Alert(text);      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift],0),Time[shift],Low[shift]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift],0),Time[shift],High[shift]);      [color=#828282]if(!IsTesting())if(Mail) SendMail(text,text);      [color=#828282]if(!IsTesting())if(Push) SendNotification(text);     [color=#828282]}   [color=#828282]if(history)     [color=#828282]{      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],Low[shift+i]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],High[shift+i]);
[color=#828282]}
[color=#828282]}
[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]int start()   [color=#828282]{   [color=#828282]int counted_bars=IndicatorCounted();   [color=#828282]if(counted_bars<0) return(-1);   [color=#828282]// if(counted_bars>0) counted_bars--;   [color=#828282]// int position=Bars-1;   [color=#828282]int position=Bars-counted_bars;   [color=#828282]if (position<0) position=0;[color=#828282]//----   [color=#828282]int rnglength=250;   [color=#828282]double range=0.0, srange=0.0;   [color=#828282]for(int pos=position; pos >=0; pos--)     [color=#828282]{      [color=#828282]srange=0.0;      [color=#828282]int j=0;      [color=#828282]for(int i=0;i<rnglength;i++)        [color=#828282]{         [color=#828282]j++;         [color=#828282]int posr=pos + i;         [color=#828282]if (posr>=Bars)            [color=#828282]break;         [color=#828282]srange=srange + (High [posr]- Low[posr]);        [color=#828282]}      [color=#828282]range=srange/j * Length;      [color=#828282]int BarNumber=Bars-pos; //??????????      [color=#828282]if (BarNumber < 0)         [color=#828282]BarNumber=0;      [color=#828282]CyclePrice=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos);      [color=#828282]if (UseFilterSMAorRSI==1)         [color=#828282]ZL1[pos]=ZeroLag(CyclePrice,FilterStrengthSMA, pos);      [color=#828282]if (UseFilterSMAorRSI==2)         [color=#828282]ZL1[pos]=ZeroLag( iRSI(NULL, 0, 14, CyclePrice, FilterStrengthRSI ), FilterStrengthRSI, pos);      [color=#828282]if (ZL1 [pos]> ZL1[pos+1])         [color=#828282]SwitchC=1;      [color=#828282]if (ZL1 [pos]< ZL1[pos+1])         [color=#828282]SwitchC=2;      [color=#828282]if (BarNumber<=1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepA =range;         [color=#828282]else            [color=#828282]SweepA=Strength;         [color=#828282]Price1BuyA =CyclePrice;         [color=#828282]Price1SellA =CyclePrice;        [color=#828282]}      [color=#828282]/* ***************************************************************** */      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch > -1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price1BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && (SwitchC==2) && BuySwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos + BarNumber - Price1BuyB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos + BarNumber - Price1BuyB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchA)                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos +BarNumber - Price1BuyB]=0;                  [color=#828282]LineBuffer[pos +BarNumber - Price1BuyB]=0;                 [color=#828282]}               [color=#828282]Price1BuyA=CyclePrice;               [color=#828282]Price1BuyB=BarNumber;               [color=#828282]BuySwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price1BuyA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;//MinorBuySell - DarkGreen                     [color=#828282]LineBuffer[pos +SwitchA]=-1;//line                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;  //MinorBuySell                     [color=#828282]LineBuffer[pos +SwitchA]=-1; //line                     [color=#828282]SwitchD=1;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]SwitchD=0;                    [color=#828282]}                  [color=#828282]BuySwitchA=TRUE;                  [color=#828282]double cyclePrice1=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice - cyclePrice1>=SweepA;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice>=cyclePrice1 * (1 + SweepA/1000);                    [color=#828282]}                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch= - 1;                     [color=#828282]Price1SellA=CyclePrice;                     [color=#828282]Price1SellB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}           [color=#828282]}         [color=#828282]if(Switch < 1)           [color=#828282]{            [color=#828282]if (CyclePrice > Price1SellA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==1 && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0;//MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB]=0;//line                 [color=#828282]}               [color=#828282]Price1SellA=CyclePrice;               [color=#828282]Price1SellB=BarNumber;               [color=#828282]SellSwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price1SellA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1SellB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1; // MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1; //"CycleLine"                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && (SwitchC==2))                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1;//MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1;//CycleLine                     [color=#828282]SwitchD =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchD =0;                  [color=#828282]SellSwitchA=TRUE;                  [color=#828282]double cyclePrice2=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition1=(cyclePrice2 - CyclePrice)>=SweepA;                  [color=#828282]else                     [color=#828282]Condition1=CyclePrice<=(cyclePrice2 * (1 - SweepA/1000));                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch=1;                     [color=#828282]Price1BuyA=CyclePrice;                     [color=#828282]Price1BuyB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MinorCycleBuy[pos]=0;      [color=#828282]MinorCycleSell[pos]=0;[color=#828282]//----      [color=#828282]if (BarNumber==1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepB =range *  MajorCycleStrength;         [color=#828282]else            [color=#828282]SweepB=Strength * MajorCycleStrength;         [color=#828282]Price2BuyA=CyclePrice;         [color=#828282]Price2SellA=CyclePrice;        [color=#828282]}      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch2  >  - 1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price2BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==2 && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0; //MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0;//MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line-----------                 [color=#828282]}               [color=#828282]Price2BuyA=CyclePrice;               [color=#828282]Price2BuyB=BarNumber;               [color=#828282]BuySwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price2BuyA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//               LineBuffer[pos + SwitchB] = -1; //line--------------                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//             LineBuffer[pos + SwitchB] = -1; //line-----------------                     [color=#828282]SwitchE =1;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]BuySwitchB=TRUE;                  [color=#828282]double cyclePrice3=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=CyclePrice - cyclePrice3>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice>=cyclePrice3 * (1 + SweepB/1000);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2= - 1;                     [color=#828282]Price2SellA=CyclePrice;                     [color=#828282]Price2SellB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]if (Switch2  < 1)           [color=#828282]{            [color=#828282]if (CyclePrice  > Price2SellA )              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC ==1 && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0; //"MajorBuySell",red                   [color=#828282]//      LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0;//"MajorBuySell",red                   [color=#828282]//              LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]Price2SellA=CyclePrice;               [color=#828282]Price2SellB=BarNumber;               [color=#828282]SellSwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price2SellA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2SellB ;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleSell[pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==2)                    [color=#828282]{                     [color=#828282]MajorCycleSell [pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                     [color=#828282]SwitchE =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]SellSwitchB=TRUE;                  [color=#828282]double cyclePrice4=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=cyclePrice4 - CyclePrice>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice<=cyclePrice4 * (1.0 - SweepB/1000.0);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2=1;                     [color=#828282]Price2BuyA=CyclePrice;                     [color=#828282]Price2BuyB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MajorCycleSell[pos]=0;      [color=#828282]MajorCycleBuy[pos]=0;     [color=#828282]}   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]double ZeroLag(double price, int length, int pos)  [color=#828282]{   [color=#828282]if (length < 3)     [color=#828282]{      [color=#828282]return(price);     [color=#828282]}   [color=#828282]double aa=MathExp(-1.414*3.14159/length);   [color=#828282]double bb=2*aa*MathCos(1.414*180/length);   [color=#828282]double CB=bb;   [color=#828282]double CC=-aa*aa;   [color=#828282]double CA=1 - CB - CC;   [color=#828282]double CD=CA*price + CB*ZL1[pos+1] + CC*ZL1[pos+2];   [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+ [color=#828282]nameInd=WindowExpertName( );          [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]<=75 && SarBuffer[shift]>75)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" UP",1);                    [color=#828282]timeee=Time[0];                          [color=#828282]}            [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]>=25 && SarBuffer[shift]<25)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" DN",2);                    [color=#828282]timeee=Time[0];                          [color=#828282]}[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]return(CD);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+

 
Сообщение
Код
Код[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    CycleIdentifier.mq4 |[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]#property copyright ""[color=#828282]#property link      ""[color=#828282]//----[color=#828282]#property indicator_separate_window[color=#828282]#property indicator_buffers 6[color=#828282]//----[color=#828282]#property indicator_color1 DarkGray[color=#828282]#property indicator_color2 Lime[color=#828282]#property indicator_color3 Red[color=#828282]#property indicator_color4 DarkGreen[color=#828282]#property indicator_color5 Brown[color=#828282]//----[color=#828282]#property indicator_minimum -1.2[color=#828282]#property indicator_maximum 1.2[color=#828282]//----[color=#828282]extern int       PriceActionFilter=1;[color=#828282]extern int       Length=3;[color=#828282]extern int       MajorCycleStrength=4;[color=#828282]extern bool      UseCycleFilter=false;[color=#828282]extern int       UseFilterSMAorRSI=1;[color=#828282]extern int       FilterStrengthSMA=12;[color=#828282]extern int       FilterStrengthRSI=21;[color=#828282]//----[color=#828282]double LineBuffer[];[color=#828282]double MajorCycleBuy[];[color=#828282]double MajorCycleSell[];[color=#828282]double MinorCycleBuy[];[color=#828282]double MinorCycleSell[];[color=#828282]double ZL1[];[color=#828282]//----[color=#828282]double CyclePrice=0.0, Strength =0.0, SweepA=0.0, SweepB=0.0;[color=#828282]int Switch=0, Switch2=0,   SwitchA=0, SwitchB=0, SwitchC=0, SwitchD=0, SwitchE=0, SwitchAA=0, SwitchBB=0;[color=#828282]double Price1BuyA=0.0, Price2BuyA=0.0;[color=#828282]int Price1BuyB=1.0, Price2BuyB=1.0;[color=#828282]double Price1SellA=0.0, Price2SellA=0.0;[color=#828282]int Price1SellB=0.0, Price2SellB=0.0;[color=#828282]bool ActiveSwitch=True, BuySwitchA=FALSE, BuySwitchB=FALSE, SellSwitchA=FALSE, SellSwitchB=FALSE;[color=#828282]int BuySellFac=01;[color=#828282]bool Condition1, Condition2, Condition3, Condition6;[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]int init()    [color=#828282]{   [color=#828282]SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);   [color=#828282]SetIndexBuffer(0,LineBuffer);   [color=#828282]SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(1,MajorCycleBuy);   [color=#828282]SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(2,MajorCycleSell);   [color=#828282]SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(3,MinorCycleBuy);   [color=#828282]SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(4,MinorCycleSell);   [color=#828282]SetIndexStyle(5,DRAW_NONE);   [color=#828282]SetIndexBuffer(5,ZL1);   [color=#828282]SetIndexEmptyValue(1,0.0);   [color=#828282]SetIndexEmptyValue(2,0.0);   [color=#828282]SetIndexEmptyValue(3,0.0);   [color=#828282]SetIndexEmptyValue(4,0.0);   [color=#828282]SetIndexEmptyValue(5,0.0);   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]int deinit() {return(0);}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+  [color=#828282]extern string Alerts="Алерты и стрелки от www.expforex.com";  [color=#828282]extern bool AlerT=true;  // Выдавать алерт на экран            [color=#828282]extern bool Mail=true;   // Посылать сообщение           [color=#828282]extern bool Push=true;   // Посылать ПУШ на телефон  [color=#828282]extern bool Arrow=true;  // Ставить стрелки на сигналах  [color=#828282]extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом  [color=#828282]int timeee;              // Внутренняя переменная  [color=#828282]string nameInd; [color=#828282]void SetArrow(int cd, color cl,              [color=#828282]string nm="", datetime t1=0, double p1=0, int sz=3) {  [color=#828282]if (nm=="") nm=DoubleToStr(Time[0], 0);  [color=#828282]if (t1<=0) t1=Time[0];  [color=#828282]if (p1<=0) p1=Bid;  [color=#828282]nameInd=WindowExpertName( );[color=#828282]int wind=WindowFind(nameInd);[color=#828282]wind=0;  [color=#828282]if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_ARROW, wind, 0,0);  [color=#828282]ObjectSet(nm, OBJPROP_TIME1    , t1);  [color=#828282]ObjectSet(nm, OBJPROP_PRICE1   , p1);  [color=#828282]ObjectSet(nm, OBJPROP_ARROWCODE, cd);  [color=#828282]ObjectSet(nm, OBJPROP_COLOR    , cl);  [color=#828282]ObjectSet(nm, OBJPROP_WIDTH    , sz);[color=#828282]} [color=#828282]void Expforex_AlertArrow(string text="",int arrowdir=0,bool history=false,int i=0)  [color=#828282]{   [color=#828282]nameInd=WindowExpertName();   [color=#828282]int wind=WindowFind(nameInd);   [color=#828282]if(wind==-1)wind=0;   [color=#828282]ObjectCreate("Originalalert",OBJ_LABEL,wind,0,0);   [color=#828282]ObjectSetText("Originalalert","Модификация AlertArrow www.expforex.com",10,"Arial Bold",Red);   [color=#828282]ObjectSet("Originalalert",OBJPROP_CORNER,2);   [color=#828282]ObjectSet("Originalalert",OBJPROP_XDISTANCE,200);   [color=#828282]ObjectSet("Originalalert",OBJPROP_YDISTANCE,10);   [color=#828282]if(!history)     [color=#828282]{      [color=#828282]if(AlerT) Alert(text);      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift],0),Time[shift],Low[shift]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift],0),Time[shift],High[shift]);      [color=#828282]if(!IsTesting())if(Mail) SendMail(text,text);      [color=#828282]if(!IsTesting())if(Push) SendNotification(text);     [color=#828282]}   [color=#828282]if(history)     [color=#828282]{      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],Low[shift+i]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],High[shift+i]);
[color=#828282]}
[color=#828282]}
[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]int start()   [color=#828282]{   [color=#828282]int counted_bars=IndicatorCounted();   [color=#828282]if(counted_bars<0) return(-1);   [color=#828282]// if(counted_bars>0) counted_bars--;   [color=#828282]// int position=Bars-1;   [color=#828282]int position=Bars-counted_bars;   [color=#828282]if (position<0) position=0;[color=#828282]//----   [color=#828282]int rnglength=250;   [color=#828282]double range=0.0, srange=0.0;   [color=#828282]for(int pos=position; pos >=0; pos--)     [color=#828282]{      [color=#828282]srange=0.0;      [color=#828282]int j=0;      [color=#828282]for(int i=0;i<rnglength;i++)        [color=#828282]{         [color=#828282]j++;         [color=#828282]int posr=pos + i;         [color=#828282]if (posr>=Bars)            [color=#828282]break;         [color=#828282]srange=srange + (High [posr]- Low[posr]);        [color=#828282]}      [color=#828282]range=srange/j * Length;      [color=#828282]int BarNumber=Bars-pos; //??????????      [color=#828282]if (BarNumber < 0)         [color=#828282]BarNumber=0;      [color=#828282]CyclePrice=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos);      [color=#828282]if (UseFilterSMAorRSI==1)         [color=#828282]ZL1[pos]=ZeroLag(CyclePrice,FilterStrengthSMA, pos);      [color=#828282]if (UseFilterSMAorRSI==2)         [color=#828282]ZL1[pos]=ZeroLag( iRSI(NULL, 0, 14, CyclePrice, FilterStrengthRSI ), FilterStrengthRSI, pos);      [color=#828282]if (ZL1 [pos]> ZL1[pos+1])         [color=#828282]SwitchC=1;      [color=#828282]if (ZL1 [pos]< ZL1[pos+1])         [color=#828282]SwitchC=2;      [color=#828282]if (BarNumber<=1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepA =range;         [color=#828282]else            [color=#828282]SweepA=Strength;         [color=#828282]Price1BuyA =CyclePrice;         [color=#828282]Price1SellA =CyclePrice;        [color=#828282]}      [color=#828282]/* ***************************************************************** */      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch > -1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price1BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && (SwitchC==2) && BuySwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos + BarNumber - Price1BuyB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos + BarNumber - Price1BuyB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchA)                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos +BarNumber - Price1BuyB]=0;                  [color=#828282]LineBuffer[pos +BarNumber - Price1BuyB]=0;                 [color=#828282]}               [color=#828282]Price1BuyA=CyclePrice;               [color=#828282]Price1BuyB=BarNumber;               [color=#828282]BuySwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price1BuyA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;//MinorBuySell - DarkGreen                     [color=#828282]LineBuffer[pos +SwitchA]=-1;//line                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;  //MinorBuySell                     [color=#828282]LineBuffer[pos +SwitchA]=-1; //line                     [color=#828282]SwitchD=1;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]SwitchD=0;                    [color=#828282]}                  [color=#828282]BuySwitchA=TRUE;                  [color=#828282]double cyclePrice1=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice - cyclePrice1>=SweepA;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice>=cyclePrice1 * (1 + SweepA/1000);                    [color=#828282]}                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch= - 1;                     [color=#828282]Price1SellA=CyclePrice;                     [color=#828282]Price1SellB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}           [color=#828282]}         [color=#828282]if(Switch < 1)           [color=#828282]{            [color=#828282]if (CyclePrice > Price1SellA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==1 && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0;//MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB]=0;//line                 [color=#828282]}               [color=#828282]Price1SellA=CyclePrice;               [color=#828282]Price1SellB=BarNumber;               [color=#828282]SellSwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price1SellA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1SellB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1; // MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1; //"CycleLine"                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && (SwitchC==2))                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1;//MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1;//CycleLine                     [color=#828282]SwitchD =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchD =0;                  [color=#828282]SellSwitchA=TRUE;                  [color=#828282]double cyclePrice2=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition1=(cyclePrice2 - CyclePrice)>=SweepA;                  [color=#828282]else                     [color=#828282]Condition1=CyclePrice<=(cyclePrice2 * (1 - SweepA/1000));                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch=1;                     [color=#828282]Price1BuyA=CyclePrice;                     [color=#828282]Price1BuyB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MinorCycleBuy[pos]=0;      [color=#828282]MinorCycleSell[pos]=0;[color=#828282]//----      [color=#828282]if (BarNumber==1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepB =range *  MajorCycleStrength;         [color=#828282]else            [color=#828282]SweepB=Strength * MajorCycleStrength;         [color=#828282]Price2BuyA=CyclePrice;         [color=#828282]Price2SellA=CyclePrice;        [color=#828282]}      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch2  >  - 1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price2BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==2 && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0; //MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0;//MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line-----------                 [color=#828282]}               [color=#828282]Price2BuyA=CyclePrice;               [color=#828282]Price2BuyB=BarNumber;               [color=#828282]BuySwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price2BuyA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//               LineBuffer[pos + SwitchB] = -1; //line--------------                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//             LineBuffer[pos + SwitchB] = -1; //line-----------------                     [color=#828282]SwitchE =1;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]BuySwitchB=TRUE;                  [color=#828282]double cyclePrice3=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=CyclePrice - cyclePrice3>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice>=cyclePrice3 * (1 + SweepB/1000);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2= - 1;                     [color=#828282]Price2SellA=CyclePrice;                     [color=#828282]Price2SellB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]if (Switch2  < 1)           [color=#828282]{            [color=#828282]if (CyclePrice  > Price2SellA )              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC ==1 && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0; //"MajorBuySell",red                   [color=#828282]//      LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0;//"MajorBuySell",red                   [color=#828282]//              LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]Price2SellA=CyclePrice;               [color=#828282]Price2SellB=BarNumber;               [color=#828282]SellSwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price2SellA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2SellB ;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleSell[pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==2)                    [color=#828282]{                     [color=#828282]MajorCycleSell [pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                     [color=#828282]SwitchE =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]SellSwitchB=TRUE;                  [color=#828282]double cyclePrice4=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=cyclePrice4 - CyclePrice>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice<=cyclePrice4 * (1.0 - SweepB/1000.0);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2=1;                     [color=#828282]Price2BuyA=CyclePrice;                     [color=#828282]Price2BuyB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MajorCycleSell[pos]=0;      [color=#828282]MajorCycleBuy[pos]=0;     [color=#828282]}   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]double ZeroLag(double price, int length, int pos)  [color=#828282]{   [color=#828282]if (length < 3)     [color=#828282]{      [color=#828282]return(price);     [color=#828282]}   [color=#828282]double aa=MathExp(-1.414*3.14159/length);   [color=#828282]double bb=2*aa*MathCos(1.414*180/length);   [color=#828282]double CB=bb;   [color=#828282]double CC=-aa*aa;   [color=#828282]double CA=1 - CB - CC;   [color=#828282]double CD=CA*price + CB*ZL1[pos+1] + CC*ZL1[pos+2];   [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+ [color=#828282]nameInd=WindowExpertName( );          [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]<=75 && SarBuffer[shift]>75)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" UP",1);                    [color=#828282]timeee=Time[0];                          [color=#828282]}            [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]>=25 && SarBuffer[shift]<25)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" DN",2);                    [color=#828282]timeee=Time[0];                          [color=#828282]}[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]return(CD);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+

Автор - zmei
Дата добавления - 25.11.2015 в 18:50

DezmondoffДата: Среда, 25.11.2015, 19:23 | Сообщение # 1022
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

Помогите вставить алерт, чтобы при появлении красных крестиков или синих точек возникал звуковой алерт. Индикатор отвечающий за них MVX - Fibos.mq4

Прикрепления: Forex.zip(96Kb) · 1397318.png(31Kb)
 
СообщениеПомогите вставить алерт, чтобы при появлении красных крестиков или синих точек возникал звуковой алерт. Индикатор отвечающий за них MVX - Fibos.mq4


Автор - Dezmondoff
Дата добавления - 25.11.2015 в 19:23

expforexДата: Среда, 25.11.2015, 19:51 | Сообщение # 1023
Главный Администартор
Группа: Администраторы
Сообщений: 9037
Награды: 29
Статус: Offline


[Бонусы за сообщения ]

zmei, приветствую прикрепите плиз сам индикатор



Программирование на заказ || Наши Разработки

 
Сообщениеzmei, приветствую прикрепите плиз сам индикатор

Автор - expforex
Дата добавления - 25.11.2015 в 19:51

expforexДата: Среда, 25.11.2015, 20:07 | Сообщение # 1024
Главный Администартор
Группа: Администраторы
Сообщений: 9037
Награды: 29
Статус: Offline


[Бонусы за сообщения ]

Dezmondoff, сделал

Прикрепления: MVX-Fibos_www.e.rar(42Kb)


Программирование на заказ || Наши Разработки

 
СообщениеDezmondoff, сделал

Автор - expforex
Дата добавления - 25.11.2015 в 20:07

DezmondoffДата: Среда, 25.11.2015, 20:39 | Сообщение # 1025
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

Спасибо

 
СообщениеСпасибо

Автор - Dezmondoff
Дата добавления - 25.11.2015 в 20:39

zmeiДата: Среда, 25.11.2015, 21:01 | Сообщение # 1026
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

Код
Код[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    CycleIdentifier.mq4 |[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]#property copyright ""[color=#828282]#property link      ""[color=#828282]//----[color=#828282]#property indicator_separate_window[color=#828282]#property indicator_buffers 6[color=#828282]//----[color=#828282]#property indicator_color1 DarkGray[color=#828282]#property indicator_color2 Lime[color=#828282]#property indicator_color3 Red[color=#828282]#property indicator_color4 DarkGreen[color=#828282]#property indicator_color5 Brown[color=#828282]//----[color=#828282]#property indicator_minimum -1.2[color=#828282]#property indicator_maximum 1.2[color=#828282]//----[color=#828282]extern int       PriceActionFilter=1;[color=#828282]extern int       Length=3;[color=#828282]extern int       MajorCycleStrength=4;[color=#828282]extern bool      UseCycleFilter=false;[color=#828282]extern int       UseFilterSMAorRSI=1;[color=#828282]extern int       FilterStrengthSMA=12;[color=#828282]extern int       FilterStrengthRSI=21;[color=#828282]//----[color=#828282]double LineBuffer[];[color=#828282]double MajorCycleBuy[];[color=#828282]double MajorCycleSell[];[color=#828282]double MinorCycleBuy[];[color=#828282]double MinorCycleSell[];[color=#828282]double ZL1[];[color=#828282]//----[color=#828282]double CyclePrice=0.0, Strength =0.0, SweepA=0.0, SweepB=0.0;[color=#828282]int Switch=0, Switch2=0,   SwitchA=0, SwitchB=0, SwitchC=0, SwitchD=0, SwitchE=0, SwitchAA=0, SwitchBB=0;[color=#828282]double Price1BuyA=0.0, Price2BuyA=0.0;[color=#828282]int Price1BuyB=1.0, Price2BuyB=1.0;[color=#828282]double Price1SellA=0.0, Price2SellA=0.0;[color=#828282]int Price1SellB=0.0, Price2SellB=0.0;[color=#828282]bool ActiveSwitch=True, BuySwitchA=FALSE, BuySwitchB=FALSE, SellSwitchA=FALSE, SellSwitchB=FALSE;[color=#828282]int BuySellFac=01;[color=#828282]bool Condition1, Condition2, Condition3, Condition6;[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]int init()    [color=#828282]{   [color=#828282]SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);   [color=#828282]SetIndexBuffer(0,LineBuffer);   [color=#828282]SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(1,MajorCycleBuy);   [color=#828282]SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(2,MajorCycleSell);   [color=#828282]SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(3,MinorCycleBuy);   [color=#828282]SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(4,MinorCycleSell);   [color=#828282]SetIndexStyle(5,DRAW_NONE);   [color=#828282]SetIndexBuffer(5,ZL1);   [color=#828282]SetIndexEmptyValue(1,0.0);   [color=#828282]SetIndexEmptyValue(2,0.0);   [color=#828282]SetIndexEmptyValue(3,0.0);   [color=#828282]SetIndexEmptyValue(4,0.0);   [color=#828282]SetIndexEmptyValue(5,0.0);   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]int deinit() {return(0);}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+  [color=#828282]extern string Alerts="Алерты и стрелки от www.expforex.com";  [color=#828282]extern bool AlerT=true;  // Выдавать алерт на экран            [color=#828282]extern bool Mail=true;   // Посылать сообщение           [color=#828282]extern bool Push=true;   // Посылать ПУШ на телефон  [color=#828282]extern bool Arrow=true;  // Ставить стрелки на сигналах  [color=#828282]extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом  [color=#828282]int timeee;              // Внутренняя переменная  [color=#828282]string nameInd; [color=#828282]void SetArrow(int cd, color cl,              [color=#828282]string nm="", datetime t1=0, double p1=0, int sz=3) {  [color=#828282]if (nm=="") nm=DoubleToStr(Time[0], 0);  [color=#828282]if (t1<=0) t1=Time[0];  [color=#828282]if (p1<=0) p1=Bid;  [color=#828282]nameInd=WindowExpertName( );[color=#828282]int wind=WindowFind(nameInd);[color=#828282]wind=0;  [color=#828282]if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_ARROW, wind, 0,0);  [color=#828282]ObjectSet(nm, OBJPROP_TIME1    , t1);  [color=#828282]ObjectSet(nm, OBJPROP_PRICE1   , p1);  [color=#828282]ObjectSet(nm, OBJPROP_ARROWCODE, cd);  [color=#828282]ObjectSet(nm, OBJPROP_COLOR    , cl);  [color=#828282]ObjectSet(nm, OBJPROP_WIDTH    , sz);[color=#828282]} [color=#828282]void Expforex_AlertArrow(string text="",int arrowdir=0,bool history=false,int i=0)  [color=#828282]{   [color=#828282]nameInd=WindowExpertName();   [color=#828282]int wind=WindowFind(nameInd);   [color=#828282]if(wind==-1)wind=0;   [color=#828282]ObjectCreate("Originalalert",OBJ_LABEL,wind,0,0);   [color=#828282]ObjectSetText("Originalalert","Модификация AlertArrow www.expforex.com",10,"Arial Bold",Red);   [color=#828282]ObjectSet("Originalalert",OBJPROP_CORNER,2);   [color=#828282]ObjectSet("Originalalert",OBJPROP_XDISTANCE,200);   [color=#828282]ObjectSet("Originalalert",OBJPROP_YDISTANCE,10);   [color=#828282]if(!history)     [color=#828282]{      [color=#828282]if(AlerT) Alert(text);      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift],0),Time[shift],Low[shift]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift],0),Time[shift],High[shift]);      [color=#828282]if(!IsTesting())if(Mail) SendMail(text,text);      [color=#828282]if(!IsTesting())if(Push) SendNotification(text);     [color=#828282]}   [color=#828282]if(history)     [color=#828282]{      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],Low[shift+i]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],High[shift+i]);
[color=#828282]}
[color=#828282]}
[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]int start()   [color=#828282]{   [color=#828282]int counted_bars=IndicatorCounted();   [color=#828282]if(counted_bars<0) return(-1);   [color=#828282]// if(counted_bars>0) counted_bars--;   [color=#828282]// int position=Bars-1;   [color=#828282]int position=Bars-counted_bars;   [color=#828282]if (position<0) position=0;[color=#828282]//----   [color=#828282]int rnglength=250;   [color=#828282]double range=0.0, srange=0.0;   [color=#828282]for(int pos=position; pos >=0; pos--)     [color=#828282]{      [color=#828282]srange=0.0;      [color=#828282]int j=0;      [color=#828282]for(int i=0;i<rnglength;i++)        [color=#828282]{         [color=#828282]j++;         [color=#828282]int posr=pos + i;         [color=#828282]if (posr>=Bars)            [color=#828282]break;         [color=#828282]srange=srange + (High [posr]- Low[posr]);        [color=#828282]}      [color=#828282]range=srange/j * Length;      [color=#828282]int BarNumber=Bars-pos; //??????????      [color=#828282]if (BarNumber < 0)         [color=#828282]BarNumber=0;      [color=#828282]CyclePrice=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos);      [color=#828282]if (UseFilterSMAorRSI==1)         [color=#828282]ZL1[pos]=ZeroLag(CyclePrice,FilterStrengthSMA, pos);      [color=#828282]if (UseFilterSMAorRSI==2)         [color=#828282]ZL1[pos]=ZeroLag( iRSI(NULL, 0, 14, CyclePrice, FilterStrengthRSI ), FilterStrengthRSI, pos);      [color=#828282]if (ZL1 [pos]> ZL1[pos+1])         [color=#828282]SwitchC=1;      [color=#828282]if (ZL1 [pos]< ZL1[pos+1])         [color=#828282]SwitchC=2;      [color=#828282]if (BarNumber<=1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepA =range;         [color=#828282]else            [color=#828282]SweepA=Strength;         [color=#828282]Price1BuyA =CyclePrice;         [color=#828282]Price1SellA =CyclePrice;        [color=#828282]}      [color=#828282]/* ***************************************************************** */      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch > -1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price1BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && (SwitchC==2) && BuySwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos + BarNumber - Price1BuyB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos + BarNumber - Price1BuyB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchA)                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos +BarNumber - Price1BuyB]=0;                  [color=#828282]LineBuffer[pos +BarNumber - Price1BuyB]=0;                 [color=#828282]}               [color=#828282]Price1BuyA=CyclePrice;               [color=#828282]Price1BuyB=BarNumber;               [color=#828282]BuySwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price1BuyA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;//MinorBuySell - DarkGreen                     [color=#828282]LineBuffer[pos +SwitchA]=-1;//line                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;  //MinorBuySell                     [color=#828282]LineBuffer[pos +SwitchA]=-1; //line                     [color=#828282]SwitchD=1;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]SwitchD=0;                    [color=#828282]}                  [color=#828282]BuySwitchA=TRUE;                  [color=#828282]double cyclePrice1=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice - cyclePrice1>=SweepA;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice>=cyclePrice1 * (1 + SweepA/1000);                    [color=#828282]}                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch= - 1;                     [color=#828282]Price1SellA=CyclePrice;                     [color=#828282]Price1SellB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}           [color=#828282]}         [color=#828282]if(Switch < 1)           [color=#828282]{            [color=#828282]if (CyclePrice > Price1SellA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==1 && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0;//MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB]=0;//line                 [color=#828282]}               [color=#828282]Price1SellA=CyclePrice;               [color=#828282]Price1SellB=BarNumber;               [color=#828282]SellSwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price1SellA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1SellB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1; // MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1; //"CycleLine"                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && (SwitchC==2))                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1;//MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1;//CycleLine                     [color=#828282]SwitchD =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchD =0;                  [color=#828282]SellSwitchA=TRUE;                  [color=#828282]double cyclePrice2=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition1=(cyclePrice2 - CyclePrice)>=SweepA;                  [color=#828282]else                     [color=#828282]Condition1=CyclePrice<=(cyclePrice2 * (1 - SweepA/1000));                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch=1;                     [color=#828282]Price1BuyA=CyclePrice;                     [color=#828282]Price1BuyB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MinorCycleBuy[pos]=0;      [color=#828282]MinorCycleSell[pos]=0;[color=#828282]//----      [color=#828282]if (BarNumber==1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepB =range *  MajorCycleStrength;         [color=#828282]else            [color=#828282]SweepB=Strength * MajorCycleStrength;         [color=#828282]Price2BuyA=CyclePrice;         [color=#828282]Price2SellA=CyclePrice;        [color=#828282]}      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch2  >  - 1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price2BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==2 && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0; //MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0;//MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line-----------                 [color=#828282]}               [color=#828282]Price2BuyA=CyclePrice;               [color=#828282]Price2BuyB=BarNumber;               [color=#828282]BuySwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price2BuyA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//               LineBuffer[pos + SwitchB] = -1; //line--------------                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//             LineBuffer[pos + SwitchB] = -1; //line-----------------                     [color=#828282]SwitchE =1;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]BuySwitchB=TRUE;                  [color=#828282]double cyclePrice3=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=CyclePrice - cyclePrice3>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice>=cyclePrice3 * (1 + SweepB/1000);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2= - 1;                     [color=#828282]Price2SellA=CyclePrice;                     [color=#828282]Price2SellB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]if (Switch2  < 1)           [color=#828282]{            [color=#828282]if (CyclePrice  > Price2SellA )              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC ==1 && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0; //"MajorBuySell",red                   [color=#828282]//      LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0;//"MajorBuySell",red                   [color=#828282]//              LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]Price2SellA=CyclePrice;               [color=#828282]Price2SellB=BarNumber;               [color=#828282]SellSwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price2SellA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2SellB ;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleSell[pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==2)                    [color=#828282]{                     [color=#828282]MajorCycleSell [pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                     [color=#828282]SwitchE =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]SellSwitchB=TRUE;                  [color=#828282]double cyclePrice4=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=cyclePrice4 - CyclePrice>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice<=cyclePrice4 * (1.0 - SweepB/1000.0);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2=1;                     [color=#828282]Price2BuyA=CyclePrice;                     [color=#828282]Price2BuyB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MajorCycleSell[pos]=0;      [color=#828282]MajorCycleBuy[pos]=0;     [color=#828282]}   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]double ZeroLag(double price, int length, int pos)  [color=#828282]{   [color=#828282]if (length < 3)     [color=#828282]{      [color=#828282]return(price);     [color=#828282]}   [color=#828282]double aa=MathExp(-1.414*3.14159/length);   [color=#828282]double bb=2*aa*MathCos(1.414*180/length);   [color=#828282]double CB=bb;   [color=#828282]double CC=-aa*aa;   [color=#828282]double CA=1 - CB - CC;   [color=#828282]double CD=CA*price + CB*ZL1[pos+1] + CC*ZL1[pos+2];   [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+ [color=#828282]nameInd=WindowExpertName( );          [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]<=75 && SarBuffer[shift]>75)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" UP",1);                    [color=#828282]timeee=Time[0];                          [color=#828282]}            [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]>=25 && SarBuffer[shift]<25)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" DN",2);                    [color=#828282]timeee=Time[0];                          [color=#828282]}[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]return(CD);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+

 
Сообщение
Код
Код[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    CycleIdentifier.mq4 |[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]#property copyright ""[color=#828282]#property link      ""[color=#828282]//----[color=#828282]#property indicator_separate_window[color=#828282]#property indicator_buffers 6[color=#828282]//----[color=#828282]#property indicator_color1 DarkGray[color=#828282]#property indicator_color2 Lime[color=#828282]#property indicator_color3 Red[color=#828282]#property indicator_color4 DarkGreen[color=#828282]#property indicator_color5 Brown[color=#828282]//----[color=#828282]#property indicator_minimum -1.2[color=#828282]#property indicator_maximum 1.2[color=#828282]//----[color=#828282]extern int       PriceActionFilter=1;[color=#828282]extern int       Length=3;[color=#828282]extern int       MajorCycleStrength=4;[color=#828282]extern bool      UseCycleFilter=false;[color=#828282]extern int       UseFilterSMAorRSI=1;[color=#828282]extern int       FilterStrengthSMA=12;[color=#828282]extern int       FilterStrengthRSI=21;[color=#828282]//----[color=#828282]double LineBuffer[];[color=#828282]double MajorCycleBuy[];[color=#828282]double MajorCycleSell[];[color=#828282]double MinorCycleBuy[];[color=#828282]double MinorCycleSell[];[color=#828282]double ZL1[];[color=#828282]//----[color=#828282]double CyclePrice=0.0, Strength =0.0, SweepA=0.0, SweepB=0.0;[color=#828282]int Switch=0, Switch2=0,   SwitchA=0, SwitchB=0, SwitchC=0, SwitchD=0, SwitchE=0, SwitchAA=0, SwitchBB=0;[color=#828282]double Price1BuyA=0.0, Price2BuyA=0.0;[color=#828282]int Price1BuyB=1.0, Price2BuyB=1.0;[color=#828282]double Price1SellA=0.0, Price2SellA=0.0;[color=#828282]int Price1SellB=0.0, Price2SellB=0.0;[color=#828282]bool ActiveSwitch=True, BuySwitchA=FALSE, BuySwitchB=FALSE, SellSwitchA=FALSE, SellSwitchB=FALSE;[color=#828282]int BuySellFac=01;[color=#828282]bool Condition1, Condition2, Condition3, Condition6;[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]int init()    [color=#828282]{   [color=#828282]SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);   [color=#828282]SetIndexBuffer(0,LineBuffer);   [color=#828282]SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(1,MajorCycleBuy);   [color=#828282]SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,3);   [color=#828282]SetIndexBuffer(2,MajorCycleSell);   [color=#828282]SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(3,MinorCycleBuy);   [color=#828282]SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,1);   [color=#828282]SetIndexBuffer(4,MinorCycleSell);   [color=#828282]SetIndexStyle(5,DRAW_NONE);   [color=#828282]SetIndexBuffer(5,ZL1);   [color=#828282]SetIndexEmptyValue(1,0.0);   [color=#828282]SetIndexEmptyValue(2,0.0);   [color=#828282]SetIndexEmptyValue(3,0.0);   [color=#828282]SetIndexEmptyValue(4,0.0);   [color=#828282]SetIndexEmptyValue(5,0.0);   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]int deinit() {return(0);}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+  [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+  [color=#828282]extern string Alerts="Алерты и стрелки от www.expforex.com";  [color=#828282]extern bool AlerT=true;  // Выдавать алерт на экран            [color=#828282]extern bool Mail=true;   // Посылать сообщение           [color=#828282]extern bool Push=true;   // Посылать ПУШ на телефон  [color=#828282]extern bool Arrow=true;  // Ставить стрелки на сигналах  [color=#828282]extern int shift=1;      // На каком баре считать сигнал 0 - на текущем 1 - на закрытом  [color=#828282]int timeee;              // Внутренняя переменная  [color=#828282]string nameInd; [color=#828282]void SetArrow(int cd, color cl,              [color=#828282]string nm="", datetime t1=0, double p1=0, int sz=3) {  [color=#828282]if (nm=="") nm=DoubleToStr(Time[0], 0);  [color=#828282]if (t1<=0) t1=Time[0];  [color=#828282]if (p1<=0) p1=Bid;  [color=#828282]nameInd=WindowExpertName( );[color=#828282]int wind=WindowFind(nameInd);[color=#828282]wind=0;  [color=#828282]if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_ARROW, wind, 0,0);  [color=#828282]ObjectSet(nm, OBJPROP_TIME1    , t1);  [color=#828282]ObjectSet(nm, OBJPROP_PRICE1   , p1);  [color=#828282]ObjectSet(nm, OBJPROP_ARROWCODE, cd);  [color=#828282]ObjectSet(nm, OBJPROP_COLOR    , cl);  [color=#828282]ObjectSet(nm, OBJPROP_WIDTH    , sz);[color=#828282]} [color=#828282]void Expforex_AlertArrow(string text="",int arrowdir=0,bool history=false,int i=0)  [color=#828282]{   [color=#828282]nameInd=WindowExpertName();   [color=#828282]int wind=WindowFind(nameInd);   [color=#828282]if(wind==-1)wind=0;   [color=#828282]ObjectCreate("Originalalert",OBJ_LABEL,wind,0,0);   [color=#828282]ObjectSetText("Originalalert","Модификация AlertArrow www.expforex.com",10,"Arial Bold",Red);   [color=#828282]ObjectSet("Originalalert",OBJPROP_CORNER,2);   [color=#828282]ObjectSet("Originalalert",OBJPROP_XDISTANCE,200);   [color=#828282]ObjectSet("Originalalert",OBJPROP_YDISTANCE,10);   [color=#828282]if(!history)     [color=#828282]{      [color=#828282]if(AlerT) Alert(text);      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift],0),Time[shift],Low[shift]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift],0),Time[shift],High[shift]);      [color=#828282]if(!IsTesting())if(Mail) SendMail(text,text);      [color=#828282]if(!IsTesting())if(Push) SendNotification(text);     [color=#828282]}   [color=#828282]if(history)     [color=#828282]{      [color=#828282]if(Arrow) if(arrowdir==1) SetArrow(241,Blue,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],Low[shift+i]);      [color=#828282]if(Arrow) if(arrowdir==2) SetArrow(242,Red,nameInd+DoubleToStr(Time[shift+i],0),Time[shift+i],High[shift+i]);
[color=#828282]}
[color=#828282]}
[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]int start()   [color=#828282]{   [color=#828282]int counted_bars=IndicatorCounted();   [color=#828282]if(counted_bars<0) return(-1);   [color=#828282]// if(counted_bars>0) counted_bars--;   [color=#828282]// int position=Bars-1;   [color=#828282]int position=Bars-counted_bars;   [color=#828282]if (position<0) position=0;[color=#828282]//----   [color=#828282]int rnglength=250;   [color=#828282]double range=0.0, srange=0.0;   [color=#828282]for(int pos=position; pos >=0; pos--)     [color=#828282]{      [color=#828282]srange=0.0;      [color=#828282]int j=0;      [color=#828282]for(int i=0;i<rnglength;i++)        [color=#828282]{         [color=#828282]j++;         [color=#828282]int posr=pos + i;         [color=#828282]if (posr>=Bars)            [color=#828282]break;         [color=#828282]srange=srange + (High [posr]- Low[posr]);        [color=#828282]}      [color=#828282]range=srange/j * Length;      [color=#828282]int BarNumber=Bars-pos; //??????????      [color=#828282]if (BarNumber < 0)         [color=#828282]BarNumber=0;      [color=#828282]CyclePrice=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos);      [color=#828282]if (UseFilterSMAorRSI==1)         [color=#828282]ZL1[pos]=ZeroLag(CyclePrice,FilterStrengthSMA, pos);      [color=#828282]if (UseFilterSMAorRSI==2)         [color=#828282]ZL1[pos]=ZeroLag( iRSI(NULL, 0, 14, CyclePrice, FilterStrengthRSI ), FilterStrengthRSI, pos);      [color=#828282]if (ZL1 [pos]> ZL1[pos+1])         [color=#828282]SwitchC=1;      [color=#828282]if (ZL1 [pos]< ZL1[pos+1])         [color=#828282]SwitchC=2;      [color=#828282]if (BarNumber<=1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepA =range;         [color=#828282]else            [color=#828282]SweepA=Strength;         [color=#828282]Price1BuyA =CyclePrice;         [color=#828282]Price1SellA =CyclePrice;        [color=#828282]}      [color=#828282]/* ***************************************************************** */      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch > -1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price1BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && (SwitchC==2) && BuySwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos + BarNumber - Price1BuyB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos + BarNumber - Price1BuyB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchA)                 [color=#828282]{                  [color=#828282]MinorCycleBuy[pos +BarNumber - Price1BuyB]=0;                  [color=#828282]LineBuffer[pos +BarNumber - Price1BuyB]=0;                 [color=#828282]}               [color=#828282]Price1BuyA=CyclePrice;               [color=#828282]Price1BuyB=BarNumber;               [color=#828282]BuySwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price1BuyA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;//MinorBuySell - DarkGreen                     [color=#828282]LineBuffer[pos +SwitchA]=-1;//line                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MinorCycleBuy[pos +SwitchA]=-1;  //MinorBuySell                     [color=#828282]LineBuffer[pos +SwitchA]=-1; //line                     [color=#828282]SwitchD=1;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]SwitchD=0;                    [color=#828282]}                  [color=#828282]BuySwitchA=TRUE;                  [color=#828282]double cyclePrice1=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice - cyclePrice1>=SweepA;                    [color=#828282]}                  [color=#828282]else                    [color=#828282]{                     [color=#828282]Condition1=CyclePrice>=cyclePrice1 * (1 + SweepA/1000);                    [color=#828282]}                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch= - 1;                     [color=#828282]Price1SellA=CyclePrice;                     [color=#828282]Price1SellB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}           [color=#828282]}         [color=#828282]if(Switch < 1)           [color=#828282]{            [color=#828282]if (CyclePrice > Price1SellA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==1 && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0; //MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB ]=0; //line                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchA )                 [color=#828282]{                  [color=#828282]MinorCycleSell[pos +BarNumber - Price1SellB]=0;//MinorBuySell                  [color=#828282]LineBuffer[pos +BarNumber - Price1SellB]=0;//line                 [color=#828282]}               [color=#828282]Price1SellA=CyclePrice;               [color=#828282]Price1SellB=BarNumber;               [color=#828282]SellSwitchA=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price1SellA)                 [color=#828282]{                  [color=#828282]SwitchA=BarNumber - Price1SellB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1; // MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1; //"CycleLine"                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && (SwitchC==2))                    [color=#828282]{                     [color=#828282]MinorCycleSell[pos +SwitchA]=1;//MinorBuySell darkRed                     [color=#828282]LineBuffer[pos +SwitchA]=1;//CycleLine                     [color=#828282]SwitchD =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchD =0;                  [color=#828282]SellSwitchA=TRUE;                  [color=#828282]double cyclePrice2=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchA);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition1=(cyclePrice2 - CyclePrice)>=SweepA;                  [color=#828282]else                     [color=#828282]Condition1=CyclePrice<=(cyclePrice2 * (1 - SweepA/1000));                  [color=#828282]if (Condition1 && SwitchA>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch=1;                     [color=#828282]Price1BuyA=CyclePrice;                     [color=#828282]Price1BuyB=BarNumber;                     [color=#828282]SellSwitchA=FALSE;                     [color=#828282]BuySwitchA=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MinorCycleBuy[pos]=0;      [color=#828282]MinorCycleSell[pos]=0;[color=#828282]//----      [color=#828282]if (BarNumber==1)        [color=#828282]{         [color=#828282]if (Strength==0)            [color=#828282]SweepB =range *  MajorCycleStrength;         [color=#828282]else            [color=#828282]SweepB=Strength * MajorCycleStrength;         [color=#828282]Price2BuyA=CyclePrice;         [color=#828282]Price2SellA=CyclePrice;        [color=#828282]}      [color=#828282]if (BarNumber > 1)        [color=#828282]{         [color=#828282]if (Switch2  >  - 1)           [color=#828282]{            [color=#828282]if (CyclePrice < Price2BuyA)              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC==2 && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0; //MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && BuySwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleBuy [pos +BarNumber - Price2BuyB]=0;//MajorBuySell,green                  [color=#828282]//      LineBuffer[pos + BarNumber - Price2BuyB ] = 0; //line-----------                 [color=#828282]}               [color=#828282]Price2BuyA=CyclePrice;               [color=#828282]Price2BuyB=BarNumber;               [color=#828282]BuySwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice > Price2BuyA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2BuyB;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//               LineBuffer[pos + SwitchB] = -1; //line--------------                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==1)                    [color=#828282]{                     [color=#828282]MajorCycleBuy [pos +SwitchB]=-1; //MajorBuySell green                     [color=#828282]//             LineBuffer[pos + SwitchB] = -1; //line-----------------                     [color=#828282]SwitchE =1;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]BuySwitchB=TRUE;                  [color=#828282]double cyclePrice3=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=CyclePrice - cyclePrice3>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice>=cyclePrice3 * (1 + SweepB/1000);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2= - 1;                     [color=#828282]Price2SellA=CyclePrice;                     [color=#828282]Price2SellB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]if (Switch2  < 1)           [color=#828282]{            [color=#828282]if (CyclePrice  > Price2SellA )              [color=#828282]{               [color=#828282]if (UseCycleFilter && SwitchC ==1 && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0; //"MajorBuySell",red                   [color=#828282]//      LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]if (!UseCycleFilter && SellSwitchB )                 [color=#828282]{                  [color=#828282]MajorCycleSell [pos +BarNumber - Price2SellB]=0;//"MajorBuySell",red                   [color=#828282]//              LineBuffer[pos + BarNumber - Price2SellB ] = 0; //line -----                 [color=#828282]}               [color=#828282]Price2SellA=CyclePrice;               [color=#828282]Price2SellB=BarNumber;               [color=#828282]SellSwitchB=TRUE;              [color=#828282]}            [color=#828282]else if (CyclePrice < Price2SellA)                 [color=#828282]{                  [color=#828282]SwitchB=BarNumber - Price2SellB ;                  [color=#828282]if (!UseCycleFilter)                    [color=#828282]{                     [color=#828282]MajorCycleSell[pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                    [color=#828282]}                  [color=#828282]if (UseCycleFilter && SwitchC ==2)                    [color=#828282]{                     [color=#828282]MajorCycleSell [pos + SwitchB]=1; //"MajorBuySell",red                      [color=#828282]//      LineBuffer[pos + SwitchB ] = 1; //line -----                     [color=#828282]SwitchE =2;                    [color=#828282]}                  [color=#828282]else                     [color=#828282]SwitchE =0;                  [color=#828282]SellSwitchB=TRUE;                  [color=#828282]double cyclePrice4=iMA(NULL, 0, PriceActionFilter, 0, MODE_SMMA, PRICE_CLOSE, pos + SwitchB);                  [color=#828282]if (ActiveSwitch)                     [color=#828282]Condition6=cyclePrice4 - CyclePrice>=SweepB;                  [color=#828282]else                     [color=#828282]Condition6=CyclePrice<=cyclePrice4 * (1.0 - SweepB/1000.0);                  [color=#828282]if (Condition6 && SwitchB>=BuySellFac)                    [color=#828282]{                     [color=#828282]Switch2=1;                     [color=#828282]Price2BuyA=CyclePrice;                     [color=#828282]Price2BuyB=BarNumber;                     [color=#828282]SellSwitchB=FALSE;                     [color=#828282]BuySwitchB=FALSE;                    [color=#828282]}                 [color=#828282]}             [color=#828282]}         [color=#828282]}      [color=#828282]LineBuffer[pos]=0;      [color=#828282]MajorCycleSell[pos]=0;      [color=#828282]MajorCycleBuy[pos]=0;     [color=#828282]}   [color=#828282]return(0);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+[color=#828282]//|                    |[color=#828282]//+------------------------------------------------------------------+[color=#828282]double ZeroLag(double price, int length, int pos)  [color=#828282]{   [color=#828282]if (length < 3)     [color=#828282]{      [color=#828282]return(price);     [color=#828282]}   [color=#828282]double aa=MathExp(-1.414*3.14159/length);   [color=#828282]double bb=2*aa*MathCos(1.414*180/length);   [color=#828282]double CB=bb;   [color=#828282]double CC=-aa*aa;   [color=#828282]double CA=1 - CB - CC;   [color=#828282]double CD=CA*price + CB*ZL1[pos+1] + CC*ZL1[pos+2];   [color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+ [color=#828282]nameInd=WindowExpertName( );          [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]<=75 && SarBuffer[shift]>75)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" UP",1);                    [color=#828282]timeee=Time[0];                          [color=#828282]}            [color=#828282]if(timeee!=Time[0] && SarBuffer[shift+1]>=25 && SarBuffer[shift]<25)               [color=#828282]{                 [color=#828282]Expforex_AlertArrow(Symbol()+" "+Period()+nameInd+" DN",2);                    [color=#828282]timeee=Time[0];                          [color=#828282]}[color=#828282]//+======================================================================================+[color=#828282]//+================================ www.expforex.com edit AlertArrow ====================+[color=#828282]//+======================================================================================+   [color=#828282]return(CD);  [color=#828282]}[color=#828282]//+------------------------------------------------------------------+

Автор - zmei
Дата добавления - 25.11.2015 в 21:01

expforexДата: Среда, 25.11.2015, 21:32 | Сообщение # 1027
Главный Администартор
Группа: Администраторы
Сообщений: 9037
Награды: 29
Статус: Offline


[Бонусы за сообщения ]

прикрепите файл индикатора. я имел ввиду это. не сам код на форум, а индикатор



Программирование на заказ || Наши Разработки

 
Сообщениеприкрепите файл индикатора. я имел ввиду это. не сам код на форум, а индикатор

Автор - expforex
Дата добавления - 25.11.2015 в 21:32

zmeiДата: Четверг, 26.11.2015, 20:13 | Сообщение # 1028
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

файл индикатора

Прикрепления: christmasCIgift.mq4(13Kb)
 
Сообщениефайл индикатора

Автор - zmei
Дата добавления - 26.11.2015 в 20:13

zmeiДата: Четверг, 26.11.2015, 20:16 | Сообщение # 1029
Трейдер - Рядовой
Группа: Пользователи
Сообщений: 5
Награды: 0
Статус: Offline


[Бонусы за сообщения ]

найдено на просторах  интернета..

Прикрепления: readme1st.txt(1Kb)
 
Сообщениенайдено на просторах  интернета..

Автор - zmei
Дата добавления - 26.11.2015 в 20:16

expforexДата: Вторник, 01.12.2015, 11:41 | Сообщение # 1030
Главный Администартор
Группа: Администраторы
Сообщений: 9037
Награды: 29
Статус: Offline


[Бонусы за сообщения ]

zmei, индикатор готов с алертами, но он страшно рисует, на картинке видно, там где стрелки индикатор подавал сигналы 

поиграйте с shift по умолчанию стоит 1, но для данного индикатора наверно мало, попробуйте 2-3, соответственно из-за того что он рисует будут запаздывания. 


Да и друзья. Перед тем как вставлять индикатор в данную ветку, плиз тестируйте его и проверяйте на перерисовку.

Прикрепления: 5454516.jpg(40Kb) · 1639478.mq4(17Kb)


Программирование на заказ || Наши Разработки

 
Сообщениеzmei, индикатор готов с алертами, но он страшно рисует, на картинке видно, там где стрелки индикатор подавал сигналы 

поиграйте с shift по умолчанию стоит 1, но для данного индикатора наверно мало, попробуйте 2-3, соответственно из-за того что он рисует будут запаздывания. 


Да и друзья. Перед тем как вставлять индикатор в данную ветку, плиз тестируйте его и проверяйте на перерисовку.

Автор - expforex
Дата добавления - 01.12.2015 в 11:41
Форум трейдеров » Скрипты Советники Индикаторы для Metatrader4/Metatrader5 » MT 4 MQL программирование, помощь. » Аллерт в Индикатор Alert() Alert Arrow (Алерт на экране после сигнала индикатора + уведомления почта)
Страница 103 из 133«12101102103104105132133»
Поиск:


WebMoney Яндекс цитирования.