Дорогой,
I have downloaded this software and enabled the ring tone as below whenever get a sell or buy signal,but i faced a problem when i get any signal,which is i am receiving an alert notification for any signal each second and more than 80 times for each second and consequently my computer is freezing.
Thanks in advance for your support to solve this problem.
С наилучшими пожеланиями,
Jamal Barakat
======================
//+------------------------------------------------------------------+
//| Filename changed to ForexOFFTrend. mq4 by CrazyChart |
//| SilverTrend .mq4 |
//| SilverTrend rewritten by CrazyChart |
//| http://viac.ru/ |
//+------------------------------------------------------------------+
#авторское право собственности "SilverTrend rewritten by CrazyChart"
#ссылка на свойство "http://viac.ru/ "
//----
#свойство Indicator_chart_window
#свойство Indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- входные параметры
extern int CountBars = 400;
extern int SSP = 7;
extern double Kmin = 1.6;
extern double Kmax = 50.6;
extern bool gAlert = True; // Switch to allow alerts
//---- буферы
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//----
bool gSellAlertGiven = true; // Used to stop constant alerts
bool gBuyAlertGiven = true; // Used to stop constant alerts
//+------------------------------------------------------------------+
//| Функция инициализации пользовательского индикатора |
//+------------------------------------------------------------------+
int инициализация()
{
//---- индикаторы
Сетиндексстиле(0, DRAW_LINE, 0, 2);
Сетиндексбуффер(0, ExtMapBuffer1);
Сетиндексстиле(1, DRAW_LINE, 0, 2);
Сетиндексбуффер(1, ExtMapBuffer2);
//----
если(CountBars >= Бары)
CountBars = Bars;
Сетиндексдраубагин(0, Бары - CountBars + SSP);
Сетиндексдраубагин(1, Бары - CountBars + SSP);
//----
возвращаться(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
инт deinit()
{
возвращаться(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
начало()
{
в я,
i2,
loopbegin,
counted_bars = IndicatorCounted();
double SsMax,
SsMin,
К,
выбор1,
значение2,
смин,
смакс,
цена;
если(Бары <= SSP + 1)
возвращаться(0);
//---- начальный ноль
если(counted_bars < SSP + 1)
{
для(я = 1; я <= SSP; я++)
ExtMapBuffer1[CountBars-я] "=" 0. 0;
для(я = 1; я <= SSP; я++)
ExtMapBuffer2[CountBars-я] "=" 0. 0;
}
для(i = CountBars - SSP; я >"=" 0; я--)
{
SsMax = High[Наибольший(НУЛЕВОЙ, 0, MODE_HIGH, SSP, я - SSP + 1)];
SsMin = Low[Самый низкий(НУЛЕВОЙ, 0, MODE_LOW, SSP, я - SSP + 1)];
smin = NormalizeDouble((SsMin - (SsMax - SsMin)*Kmin / 100), Цифры);
smax = NormalizeDouble((SsMax - (SsMax - SsMin)*Kmax / 100), Цифры);
ExtMapBuffer1[i-SSP+6] = smax;
ExtMapBuffer2[i-SSP-1] = smax;
val1 = ExtMapBuffer1[0];
val2 = ExtMapBuffer2[0];
если(выбор1 > значение2)
{
Комментарий("ïîêَïêà buy ", выбор1);
если(gAlert == true && gBuyAlertGiven == true)
{
PlaySound("тревога. wav");
Тревога("Buy signal at " + Даблтостр(выбор1, Цифры) + " на " + Период() +
" минутный график");
gBuyAlertGiven = true;
gSellAlertGiven = false;
}
}
если(выбор1 < значение2)
{
Комментарий("ïًîنàوà sell ", значение2);
если(gAlert == true && gSellAlertGiven == true)
{
PlaySound("тревога. wav");
Тревога("Sell signal at " + Даблтостр(значение2, Цифры) + " на " + Период()+
" минутный график");
gBuyAlertGiven = false;
gSellAlertGiven=true;
}
}
}
//----
возвращаться(0);
}
//+------------------------------------------------------------------+