Программисты, нужен индикатор МТ-5 терминальный с алертом.

  • Автор темы Автор темы ЮНГ
  • Дата начала Дата начала

ЮНГ

Гуру форума
Надо приделать к терминальному индикатору МТ-5 WPR алерт.
 
код индиуатора в тексте скинь сюда я передам кому следует, и тз, в каком случае надо что бы?
мт5 нету по этому такие условия
 
код индиуатора в тексте скинь сюда я передам кому следует, и тз, в каком случае надо что бы?
мт5 нету по этому такие условия

//| WPR.mq5 |
//| Copyright 2000-2026, MetaQuotes Ltd. |
//| .www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2000-2026, MetaQuotes Ltd."
#property link "Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5"
#property description "Larry Williams' Percent Range"
//--- indicator settings
#property indicator_separate_window
#property indicator_level1 -20.0
#property indicator_level2 -80.0
#property indicator_levelstyle STYLE_DOT
#property indicator_levelcolor clrSilver
#property indicator_levelwidth 1
#property indicator_maximum 0.0
#property indicator_minimum -100.0
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrDodgerBlue
//--- input parameters
input int InpWPRPeriod=14; // Period
//--- indicator buffers
double ExtWPRBuffer[];
//--- global variables
int ExtPeriodWPR;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void OnInit()
{
//--- check for input value
if(InpWPRPeriod<3)
{
ExtPeriodWPR=14;
Print("Incorrect InpWPRPeriod value. Indicator will use value=",ExtPeriodWPR);
}
else
ExtPeriodWPR=InpWPRPeriod;
//--- indicator's buffer
SetIndexBuffer(0,ExtWPRBuffer);
PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,ExtPeriodWPR-1);
//--- name for DataWindow and indicator subwindow label
IndicatorSetString(INDICATOR_SHORTNAME,"%R"+"("+string(ExtPeriodWPR)+")");
//--- digits
IndicatorSetInteger(INDICATOR_DIGITS,2);
}
//+------------------------------------------------------------------+
//| Williams’ Percent Range |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
if(rates_total<ExtPeriodWPR)
return(0);
//--- start working
int i,pos=prev_calculated-1;
if(pos<ExtPeriodWPR-1)
{
pos=ExtPeriodWPR-1;
for(i=0; i<pos; i++)
ExtWPRBuffer=0.0;
}
//--- main cycle
for(i=pos; i<rates_total && !IsStopped(); i++)
{
double max_high=Highest(high,ExtPeriodWPR,i);
double min_low =Lowest(low,ExtPeriodWPR,i);
//--- calculate WPR
if(max_high!=min_low)
ExtWPRBuffer=-(max_high-close)*100/(max_high-min_low);
else
ExtWPRBuffer=ExtWPRBuffer[i-1];
}
//--- return new prev_calculated value
return(rates_total);
}
//+------------------------------------------------------------------+
//| Maximum High |
//+------------------------------------------------------------------+
double Highest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res<array)
res=array;
return(res);
}
//+------------------------------------------------------------------+
//| Minimum Low |
//+------------------------------------------------------------------+
double Lowest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res>array)
res=array;
return(res);
}
//+------------------------------------------------------------------+
 

Вложения

  • WPR.mq5
    WPR.mq5
    8,3 КБ · Просмотры: 8
  • WPR.ex5
    WPR.ex5
    9,8 КБ · Просмотры: 3
Последнее редактирование модератором:
код индиуатора в тексте скинь сюда я передам кому следует, и тз, в каком случае надо что бы?
мт5 нету по этому такие условия
Просто надо чтобы он выдавал алерт при пересечении индикатором линии перекупленности и перепроданности.
 
Пробуй, должно работать

//+------------------------------------------------------------------+
#property copyright "Copyright 2000-2026, MetaQuotes Ltd."
#property link "Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5"
#property description "Larry Williams' Percent Range with Alerts"
//--- indicator settings
#property indicator_separate_window
#property indicator_level1 -20.0
#property indicator_level2 -80.0
#property indicator_levelstyle STYLE_DOT
#property indicator_levelcolor clrSilver
#property indicator_levelwidth 1
#property indicator_maximum 0.0
#property indicator_minimum -100.0
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrDodgerBlue

//--- input parameters
input int InpWPRPeriod=14; // Period
input bool InpAlertEnabled=true; // Enable Alerts
input bool InpAlertPopup=true; // Show Popup Alert
input bool InpAlertSound=true; // Play Sound Alert
input string InpAlertSoundFile="alert.wav"; // Sound File Name
input bool InpAlertEmail=false; // Send Email Alert
input bool InpAlertPush=false; // Send Push Notification

//--- indicator buffers
double ExtWPRBuffer[];

//--- global variables
int ExtPeriodWPR;
double prevWPRValue; // Для отслеживания предыдущего значения

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void OnInit()
{
//--- check for input value
if(InpWPRPeriod<3)
{
ExtPeriodWPR=14;
Print("Incorrect InpWPRPeriod value. Indicator will use value=",ExtPeriodWPR);
}
else
ExtPeriodWPR=InpWPRPeriod;

//--- indicator's buffer
SetIndexBuffer(0,ExtWPRBuffer,INDICATOR_DATA);
PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,ExtPeriodWPR-1);

//--- name for DataWindow and indicator subwindow label
IndicatorSetString(INDICATOR_SHORTNAME,"%R"+"("+string(ExtPeriodWPR)+")");

//--- digits
IndicatorSetInteger(INDICATOR_DIGITS,2);

//--- initialize previous value
prevWPRValue=EMPTY_VALUE;
}

//+------------------------------------------------------------------+
//| Williams' Percent Range |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
if(rates_total<ExtPeriodWPR)
return(0);

//--- start working
int i,pos=prev_calculated-1;
if(pos<ExtPeriodWPR-1)
{
pos=ExtPeriodWPR-1;
for(i=0; i<pos; i++)
ExtWPRBuffer=0.0;
}

//--- main cycle
for(i=pos; i<rates_total && !IsStopped(); i++)
{
double max_high=Highest(high,ExtPeriodWPR,i);
double min_low =Lowest(low,ExtPeriodWPR,i);

//--- calculate WPR
if(max_high!=min_low)
ExtWPRBuffer=-(max_high-close)*100/(max_high-min_low);
else
ExtWPRBuffer=(i>0) ? ExtWPRBuffer[i-1] : -50.0;
}

//--- Check for alerts (only on the last completed bar)
if(InpAlertEnabled && rates_total>1)
{
int lastBar=rates_total-2; // Предпоследний бар - последний завершённый
if(prev_calculated<=rates_total-1 && lastBar>=ExtPeriodWPR-1)
{
double currentWPR=ExtWPRBuffer[lastBar];
double previousWPR=(lastBar>0) ? ExtWPRBuffer[lastBar-1] : currentWPR;

// Проверка пересечений
CheckCrossings(previousWPR, currentWPR, time[lastBar]);
}
}

//--- return new prev_calculated value
return(rates_total);
}

//+------------------------------------------------------------------+
//| Проверка пересечений уровней и генерация алертов |
//+------------------------------------------------------------------+
void CheckCrossings(double prevValue, double currentValue, datetime barTime)
{
const double OVERBOUGHT=-20.0;
const double OVERSOLD=-80.0;

// --- Пересечение уровня перекупленности (-20) ---

// Пересечение СНИЗУ ВВЕРХ (выход из перекупленности)
if(prevValue<=OVERBOUGHT && currentValue>OVERBOUGHT)
{
SendAlert("%R crossed ABOVE -20 (exit overbought) at "+TimeToString(barTime));
}

// Пересечение СВЕРХУ ВНИЗ (вход в перекупленность)
if(prevValue>OVERBOUGHT && currentValue<=OVERBOUGHT)
{
SendAlert("%R crossed BELOW -20 (enter overbought) at "+TimeToString(barTime));
}

// --- Пересечение уровня перепроданности (-80) ---

// Пересечение СНИЗУ ВВЕРХ (выход из перепроданности) - бычий сигнал
if(prevValue<=OVERSOLD && currentValue>OVERSOLD)
{
SendAlert("%R crossed ABOVE -80 (exit oversold) at "+TimeToString(barTime));
}

// Пересечение СВЕРХУ ВНИЗ (вход в перепроданность)
if(prevValue>OVERSOLD && currentValue<=OVERSOLD)
{
SendAlert("%R crossed BELOW -80 (enter oversold) at "+TimeToString(barTime));
}
}

//+------------------------------------------------------------------+
//| Отправка алерта |
//+------------------------------------------------------------------+
void SendAlert(string message)
{
string symbol=Symbol();
string timeframe=PeriodToString();
string fullMessage=symbol+" "+timeframe+": "+message;

if(InpAlertPopup)
Alert(fullMessage);

if(InpAlertSound)
PlaySound(InpAlertSoundFile);

if(InpAlertEmail)
SendMail(symbol+" %R Alert", message);

if(InpAlertPush)
SendNotification(fullMessage);
}

//+------------------------------------------------------------------+
//| Преобразование периода в строку |
//+------------------------------------------------------------------+
string PeriodToString()
{
switch(Period())
{
case PERIOD_M1: return("M1");
case PERIOD_M5: return("M5");
case PERIOD_M15: return("M15");
case PERIOD_M30: return("M30");
case PERIOD_H1: return("H1");
case PERIOD_H4: return("H4");
case PERIOD_D1: return("D1");
case PERIOD_W1: return("W1");
case PERIOD_MN1: return("MN1");
default: return("");
}
}

//+------------------------------------------------------------------+
//| Maximum High |
//+------------------------------------------------------------------+
double Highest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res<array)
res=array;
return(res);
}

//+------------------------------------------------------------------+
//| Minimum Low |
//+------------------------------------------------------------------+
double Lowest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res>array)
res=array;
return(res);
}
//+------------------------------------------------------------------+
 
Последнее редактирование модератором:
Вторая версия с отладкой:

//+------------------------------------------------------------------+
#property copyright "Copyright 2000-2026, MetaQuotes Ltd."
#property link "Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5"
#property description "Larry Williams' Percent Range with Alerts (FIXED)"
//--- indicator settings
#property indicator_separate_window
#property indicator_level1 -20.0
#property indicator_level2 -80.0
#property indicator_levelstyle STYLE_DOT
#property indicator_levelcolor clrSilver
#property indicator_levelwidth 1
#property indicator_maximum 0.0
#property indicator_minimum -100.0
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrDodgerBlue

//--- input parameters
input int InpWPRPeriod = 14; // Period
input bool InpAlertEnabled = true; // Enable Alerts
input bool InpAlertOnClose = true; // Alert only on bar close
input bool InpAlertPopup = true; // Show Popup
input bool InpAlertSound = true; // Play Sound
input string InpAlertSoundFile = "alert.wav"; // Sound file
input bool InpAlertEmail = false; // Send Email
input bool InpAlertPush = false; // Send Push
input bool InpDebugMode = false; // Debug output to Experts tab

//--- indicator buffers
double ExtWPRBuffer[];

//--- global variables
int ExtPeriodWPR;
datetime lastAlertTime = 0; // Защита от повторных алертов на одном баре

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void OnInit()
{
if(InpWPRPeriod < 3)
{
ExtPeriodWPR = 14;
Print("WPR: Incorrect period, using default = ", ExtPeriodWPR);
}
else
ExtPeriodWPR = InpWPRPeriod;

SetIndexBuffer(0, ExtWPRBuffer, INDICATOR_DATA);
PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, ExtPeriodWPR - 1);
IndicatorSetString(INDICATOR_SHORTNAME, "%R(" + string(ExtPeriodWPR) + ")");
IndicatorSetInteger(INDICATOR_DIGITS, 2);

lastAlertTime = 0;
if(InpDebugMode) Print("WPR: OnInit completed");
}

//+------------------------------------------------------------------+
//| Williams' Percent Range |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
if(rates_total < ExtPeriodWPR) return(0);

int start = (prev_calculated == 0) ? ExtPeriodWPR - 1 : prev_calculated - 1;
if(start < ExtPeriodWPR - 1) start = ExtPeriodWPR - 1;

for(int i = start; i < rates_total && !IsStopped(); i++)
{
double max_high = Highest(high, ExtPeriodWPR, i);
double min_low = Lowest(low, ExtPeriodWPR, i);

if(max_high != min_low)
ExtWPRBuffer = -(max_high - close) * 100.0 / (max_high - min_low);
else
ExtWPRBuffer = (i > 0) ? ExtWPRBuffer[i-1] : -50.0;
}

// === ПРОВЕРКА АЛЕРТОВ ===
if(InpAlertEnabled && rates_total >= ExtPeriodWPR + 1)
{
// Определяем бар для проверки
int checkBar = InpAlertOnClose ? rates_total - 2 : rates_total - 1;

if(checkBar >= ExtPeriodWPR && checkBar >= 1)
{
// Защита от повторного срабатывания на том же баре
if(time[checkBar] == lastAlertTime)
return(rates_total);

double current = ExtWPRBuffer[checkBar];
double previous = ExtWPRBuffer[checkBar - 1];

if(InpDebugMode)
PrintFormat("WPR Debug: Bar=%d Time=%s Prev=%.2f Curr=%.2f",
checkBar, TimeToString(time[checkBar]), previous, current);

CheckCrossings(previous, current, time[checkBar], Symbol(), Period());
}
}

return(rates_total);
}

//+------------------------------------------------------------------+
//| Проверка пересечений |
//+------------------------------------------------------------------+
void CheckCrossings(double prev, double curr, datetime barTime, string symbol, ENUM_TIMEFRAMES tf)
{
const double OB = -20.0; // OverBought
const double OS = -80.0; // OverSold
bool crossed = false;
string direction = "";

// Пересечение -20
if(prev <= OB && curr > OB)
{
direction = "↑ ABOVE -20 (exit overbought)";
crossed = true;
}
else if(prev > OB && curr <= OB)
{
direction = "↓ BELOW -20 (enter overbought)";
crossed = true;
}
// Пересечение -80
else if(prev <= OS && curr > OS)
{
direction = "↑ ABOVE -80 (exit oversold) - BULLISH";
crossed = true;
}
else if(prev > OS && curr <= OS)
{
direction = "↓ BELOW -80 (enter oversold)";
crossed = true;
}

if(crossed)
{
string msg = StringFormat("%s %s: %%R %s [%.2f→%.2f]",
symbol, EnumToString(tf), direction, prev, curr);
SendAlert(msg, barTime);
lastAlertTime = barTime; // Запоминаем время, чтобы не дублировать
}
}

//+------------------------------------------------------------------+
//| Отправка алерта |
//+------------------------------------------------------------------+
void SendAlert(string message, datetime barTime)
{
if(InpAlertPopup)
Alert(message);

if(InpAlertSound)
{
// Проверка существования файла (опционально)
if(FileIsExist(InpAlertSoundFile))
PlaySound(InpAlertSoundFile);
else if(InpDebugMode)
Print("WPR: Sound file not found: ", InpAlertSoundFile);
}

if(InpAlertEmail)
SendMail("WPR Alert", message);

if(InpAlertPush)
SendNotification(message);

if(InpDebugMode)
Print("WPR Alert sent: ", message);
}

//+------------------------------------------------------------------+
//| Highest |
//+------------------------------------------------------------------+
double Highest(const double &array[], int period, int pos)
{
double res = array[pos];
for(int i = pos - 1; i > pos - period && i >= 0; i--)
if(array > res) res = array;
return res;
}

//+------------------------------------------------------------------+
//| Lowest |
//+------------------------------------------------------------------+
double Lowest(const double &array[], int period, int pos)
{
double res = array[pos];
for(int i = pos - 1; i > pos - period && i >= 0; i--)
if(array < res) res = array;
return res;
}
//+------------------------------------------------------------------+
 
Последнее редактирование модератором:
Пробуй, должно работать

//+------------------------------------------------------------------+
#property copyright "Copyright 2000-2026, MetaQuotes Ltd."
#property link "Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5"
#property description "Larry Williams' Percent Range with Alerts"
//--- indicator settings
#property indicator_separate_window
#property indicator_level1 -20.0
#property indicator_level2 -80.0
#property indicator_levelstyle STYLE_DOT
#property indicator_levelcolor clrSilver
#property indicator_levelwidth 1
#property indicator_maximum 0.0
#property indicator_minimum -100.0
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrDodgerBlue

//--- input parameters
input int InpWPRPeriod=14; // Period
input bool InpAlertEnabled=true; // Enable Alerts
input bool InpAlertPopup=true; // Show Popup Alert
input bool InpAlertSound=true; // Play Sound Alert
input string InpAlertSoundFile="alert.wav"; // Sound File Name
input bool InpAlertEmail=false; // Send Email Alert
input bool InpAlertPush=false; // Send Push Notification

//--- indicator buffers
double ExtWPRBuffer[];

//--- global variables
int ExtPeriodWPR;
double prevWPRValue; // Для отслеживания предыдущего значения

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void OnInit()
{
//--- check for input value
if(InpWPRPeriod<3)
{
ExtPeriodWPR=14;
Print("Incorrect InpWPRPeriod value. Indicator will use value=",ExtPeriodWPR);
}
else
ExtPeriodWPR=InpWPRPeriod;

//--- indicator's buffer
SetIndexBuffer(0,ExtWPRBuffer,INDICATOR_DATA);
PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,ExtPeriodWPR-1);

//--- name for DataWindow and indicator subwindow label
IndicatorSetString(INDICATOR_SHORTNAME,"%R"+"("+string(ExtPeriodWPR)+")");

//--- digits
IndicatorSetInteger(INDICATOR_DIGITS,2);

//--- initialize previous value
prevWPRValue=EMPTY_VALUE;
}

//+------------------------------------------------------------------+
//| Williams' Percent Range |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
if(rates_total<ExtPeriodWPR)
return(0);

//--- start working
int i,pos=prev_calculated-1;
if(pos<ExtPeriodWPR-1)
{
pos=ExtPeriodWPR-1;
for(i=0; i<pos; i++)
ExtWPRBuffer=0.0;
}

//--- main cycle
for(i=pos; i<rates_total && !IsStopped(); i++)
{
double max_high=Highest(high,ExtPeriodWPR,i);
double min_low =Lowest(low,ExtPeriodWPR,i);

//--- calculate WPR
if(max_high!=min_low)
ExtWPRBuffer=-(max_high-close)*100/(max_high-min_low);
else
ExtWPRBuffer=(i>0) ? ExtWPRBuffer[i-1] : -50.0;
}

//--- Check for alerts (only on the last completed bar)
if(InpAlertEnabled && rates_total>1)
{
int lastBar=rates_total-2; // Предпоследний бар - последний завершённый
if(prev_calculated<=rates_total-1 && lastBar>=ExtPeriodWPR-1)
{
double currentWPR=ExtWPRBuffer[lastBar];
double previousWPR=(lastBar>0) ? ExtWPRBuffer[lastBar-1] : currentWPR;

// Проверка пересечений
CheckCrossings(previousWPR, currentWPR, time[lastBar]);
}
}

//--- return new prev_calculated value
return(rates_total);
}

//+------------------------------------------------------------------+
//| Проверка пересечений уровней и генерация алертов |
//+------------------------------------------------------------------+
void CheckCrossings(double prevValue, double currentValue, datetime barTime)
{
const double OVERBOUGHT=-20.0;
const double OVERSOLD=-80.0;

// --- Пересечение уровня перекупленности (-20) ---

// Пересечение СНИЗУ ВВЕРХ (выход из перекупленности)
if(prevValue<=OVERBOUGHT && currentValue>OVERBOUGHT)
{
SendAlert("%R crossed ABOVE -20 (exit overbought) at "+TimeToString(barTime));
}

// Пересечение СВЕРХУ ВНИЗ (вход в перекупленность)
if(prevValue>OVERBOUGHT && currentValue<=OVERBOUGHT)
{
SendAlert("%R crossed BELOW -20 (enter overbought) at "+TimeToString(barTime));
}

// --- Пересечение уровня перепроданности (-80) ---

// Пересечение СНИЗУ ВВЕРХ (выход из перепроданности) - бычий сигнал
if(prevValue<=OVERSOLD && currentValue>OVERSOLD)
{
SendAlert("%R crossed ABOVE -80 (exit oversold) at "+TimeToString(barTime));
}

// Пересечение СВЕРХУ ВНИЗ (вход в перепроданность)
if(prevValue>OVERSOLD && currentValue<=OVERSOLD)
{
SendAlert("%R crossed BELOW -80 (enter oversold) at "+TimeToString(barTime));
}
}

//+------------------------------------------------------------------+
//| Отправка алерта |
//+------------------------------------------------------------------+
void SendAlert(string message)
{
string symbol=Symbol();
string timeframe=PeriodToString();
string fullMessage=symbol+" "+timeframe+": "+message;

if(InpAlertPopup)
Alert(fullMessage);

if(InpAlertSound)
PlaySound(InpAlertSoundFile);

if(InpAlertEmail)
SendMail(symbol+" %R Alert", message);

if(InpAlertPush)
SendNotification(fullMessage);
}

//+------------------------------------------------------------------+
//| Преобразование периода в строку |
//+------------------------------------------------------------------+
string PeriodToString()
{
switch(Period())
{
case PERIOD_M1: return("M1");
case PERIOD_M5: return("M5");
case PERIOD_M15: return("M15");
case PERIOD_M30: return("M30");
case PERIOD_H1: return("H1");
case PERIOD_H4: return("H4");
case PERIOD_D1: return("D1");
case PERIOD_W1: return("W1");
case PERIOD_MN1: return("MN1");
default: return("");
}
}

//+------------------------------------------------------------------+
//| Maximum High |
//+------------------------------------------------------------------+
double Highest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res<array)
res=array;
return(res);
}

//+------------------------------------------------------------------+
//| Minimum Low |
//+------------------------------------------------------------------+
double Lowest(const double &array[],int period,int cur_position)
{
double res=array[cur_position];
for(int i=cur_position-1; i>cur_position-period && i>=0; i--)
if(res>array)
res=array;
return(res);
}
//+------------------------------------------------------------------+
А возможно его сделать как выше я выложил вместе с кодом? Я совершенный профан в Ваших программных делах и не знаю как этот Ваш индикатор втиснуть в терминал. 😭 😭 😭
 
А возможно его сделать как выше я выложил вместе с кодом? Я совершенный профан в Ваших программных делах и не знаю как этот Ваш индикатор втиснуть в терминал. 😭 😭 😭
 

Вложения

  • WPR.mq5
    WPR.mq5
    15,2 КБ · Просмотры: 8
  • WPR v2.mq5
    WPR v2.mq5
    14,3 КБ · Просмотры: 9
Вам нужно написать подробное ТЗ что вы хотите, алерт по первому пересечению или по каждому пересечению, по закрытой свече или в любом моменте по факту пересечения, пересечение может быть сверху вниз и снизу вверх все нужно указать. Тогда у алертов будет логика, а не просто так пиликать через каждые пять минут.
 
Вам нужно написать подробное ТЗ что вы хотите, алерт по первому пересечению или по каждому пересечению, по закрытой свече или в любом моменте по факту пересечения, пересечение может быть сверху вниз и снизу вверх все нужно указать. Тогда у алертов будет логика, а не просто так пиликать через каждые пять минут.
Завтра и в понедельник я его протестирую и тогда определюсь. А пока, по-моему, если он будет просто "пиликать" :ROFLMAO: при касании линий -20 и -80, то и это отлично. Посмотрите в личке, я отправил Вам письмо. Ответьте.
 

Отслеживают (2) Посмотреть

Назад
Верх