Ichimoku_Signals_and_Alerts
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «ichimoku_signals_and_alert.mq5» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Индикатор Ichimoku_Signals_and_Alerts предназначен для расчёта и отображения компонентов индикатора Ишимоку на графике цены в MetaTrader 4. Он отображает сигнальные стрелки при пересечении цены различными компонентами: Киджун-сен, Сенкоу Спан A, Сенкоу Спан B, а также при пересечении Тенкан-сен с Киджун-сен и Сенкоу Спан A с Сенкоу Спан B.
Индикатор поддерживает систему уведомлений о событиях: всплывающие сообщения, push-уведомления, отправку по электронной почте и звуковые сигналы. Доступна также расширенная отправка уведомлений через внешнюю библиотеку AdvancedNotificationsLib.dll.
Настройки индикатора позволяют управлять периодами расчёта компонентов, включать и выключать отображение отдельных линий и сигналов, а также настраивать типы и параметры уведомлений.
Настройки программы
| Настройка | Описание |
|---|---|
| Tenkan_Sen_Period | Период Тенкан-сен — Период расчёта линии Тенкан-сен |
| Kijun_Sen_Period | Период Киджун-сен — Период расчёта линии Киджун-сен |
| Senkou_Span_B_Period | Период Сенкоу Спан B — Период расчёта линии Сенкоу Спан B |
| Show_Kijun_Sen | Отображать Киджун-сен — Включает отображение линии Киджун-сен и сигнальных стрелок её пересечения с ценой |
| Show_Senkou_Span_A | Отображать Сенкоу Спан A — Включает отображение линии Сенкоу Спан A и сигнальных стрелок её пересечения с ценой |
| Show_Senkou_Span_B | Отображать Сенкоу Спан B — Включает отображение линии Сенкоу Спан B и сигнальных стрелок её пересечения с ценой |
| Show_Tenkan_Sen_Kijun_Sen | Отображать Тенкан-сен / Киджун-сен — Включает отображение сигнальных стрелок пересечения Тенкан-сен и Киджун-сен |
| Show_Senkou_Span_A_Senkou_Span_B | Отображать Сенкоу Спан A / Сенкоу Спан B — Включает отображение сигнальных стрелок пересечения Сенкоу Спан A и Сенкоу Спан B |
| == Alerts == (AlertsSection) | Раздел уведомлений — Заголовок раздела настроек уведомлений |
| Popup message (Popup_Alert) | Всплывающее уведомление — Включает всплывающие сообщения при срабатывании сигнала |
| Push notification (Notification_Alert) | Push-уведомление — Включает отправку push-уведомлений при срабатывании сигнала |
| Email (Email_Alert) | Электронная почта — Включает отправку уведомлений по электронной почте при срабатывании сигнала |
| Play sound on alert (Play_Sound) | Звуковой сигнал — Включает воспроизведение звукового файла при срабатывании сигнала |
| Sound file (Sound_File) | Звуковой файл — Путь к звуковому файлу для воспроизведения при срабатывании сигнала |
| Advanced alert (Advanced_Alert) | Расширенное уведомление — Включает отправку расширенных уведомлений через библиотеку AdvancedNotificationsLib.dll |
| Comment2 | Комментарий 2 — Информационный комментарий о получении ключа расширенного уведомления через Telegram-бота |
| Comment3 | Комментарий 3 — Информационный комментарий о необходимости разрешения использования DLL в параметрах индикатора |
| Comment4 | Комментарий 4 — Информационный комментарий об установке библиотеки AdvancedNotificationsLib.dll |
Поиск по коду файла
#property version "1.1"
#property description "Signals and Alerts given by crossing of Price with components of the Ichimoku:"
#property description "- Kijun-sen with Price"
#property description "- Senkou span A with Price"
#property description "- Senkou span B with Price"
#property description "- Tenkan-sen with Kijun-sen"
#property description "- Senkou span A with Senkou span B"
#property indicator_chart_window
#property indicator_buffers 12
#property indicator_color1 clrLime
#property indicator_color2 clrRed
#property indicator_color3 clrLime
#property indicator_color4 clrRed
#property indicator_color5 clrLime
#property indicator_color6 clrRed
#property indicator_color7 clrLime
#property indicator_color8 clrRed
#property indicator_color9 clrLime
#property indicator_color10 clrRed
#property indicator_color11 clrLime
#property indicator_color12 clrRed
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2
#property indicator_width5 2
#property indicator_width6 2
#property indicator_width7 2
#property indicator_width8 2
#property indicator_width9 2
#property indicator_width10 2
#property indicator_width11 2
#property indicator_width12 2
extern int Tenkan_Sen_Period = 9;
extern int Kijun_Sen_Period = 26;
extern int Senkou_Span_B_Period = 52;
extern bool Show_Kijun_Sen = true;
extern bool Show_Senkou_Span_A = true;
extern bool Show_Senkou_Span_B = true;
extern bool Show_Tenkan_Sen_Kijun_Sen = true;
extern bool Show_Senkou_Span_A_Senkou_Span_B = true;
extern string AlertsSection = ""; // == Alerts ==
extern bool Popup_Alert = true; // Popup message
extern bool Notification_Alert = false; // Push notification
extern bool Email_Alert = false; // Email
extern bool Play_Sound = false; // Play sound on alert
extern string Sound_File = ""; // Sound file
extern bool Advanced_Alert = false; // Advanced alert
extern string Advanced_Key = ""; // Advanced alert key
extern string Comment2 = "- You can get a advanced alert key by starting a dialog with @profit_robots_bot Telegram bot -";
extern string Comment3 = "- Allow use of dll in the indicator parameters window -";
extern string Comment4 = "- Install AdvancedNotificationsLib.dll -";
#import "AdvancedNotificationsLib.dll"
void AdvancedAlert(string key, string text, string instrument, string timeframe);
#import
#define ENTER_BUY_SIGNAL 1
#define ENTER_SELL_SIGNAL -1
#define EXIT_BUY_SIGNAL 2
#define EXIT_SELL_SIGNAL -2
class Signaler
{
string _symbol;
ENUM_TIMEFRAMES _timeframe;
datetime _lastDatetime;
public:
Signaler(const string symbol, ENUM_TIMEFRAMES timeframe)
{
_symbol = symbol;
_timeframe = timeframe;
}
void SendNotifications(const int direction)
{
if (direction == 0)
return;
datetime currentTime = iTime(_symbol, _timeframe, 0);
if (_lastDatetime == currentTime)
return;
_lastDatetime = currentTime;
string tf = GetTimeframe();
string alert_Subject;
string alert_Body;
switch (direction)
{
case ENTER_BUY_SIGNAL:
alert_Subject = "Buy signal on " + _symbol + "/" + tf;
alert_Body = "Buy signal on " + _symbol + "/" + tf;
break;
case ENTER_SELL_SIGNAL:
alert_Subject = "Sell signal on " + _symbol + "/" + tf;
alert_Body = "Sell signal on " + _symbol + "/" + tf;
break;
case EXIT_BUY_SIGNAL:
alert_Subject = "Exit buy signal on " + _symbol + "/" + tf;
alert_Body = "Exit buy signal on " + _symbol + "/" + tf;
break;
case EXIT_SELL_SIGNAL:
alert_Subject = "Exit sell signal on " + _symbol + "/" + tf;
alert_Body = "Exit sell signal on " + _symbol + "/" + tf;
break;
}
SendNotifications(alert_Subject, alert_Body, _symbol, tf);
}
void SendNotifications(const string subject, string message = NULL, string symbol = NULL, string timeframe = NULL)
{
if (message == NULL)
message = subject;
if (symbol == NULL)
symbol = _symbol;
if (timeframe == NULL)
timeframe = GetTimeframe();
if (Popup_Alert)
Alert(message);
if (Email_Alert)
SendMail(subject, message);
if (Play_Sound)
PlaySound(Sound_File);
if (Notification_Alert)
SendNotification(message);
if (Advanced_Alert && Advanced_Key != "" && !IsTesting())
AdvancedAlert(Advanced_Key, message, symbol, timeframe);
}
private:
string GetTimeframe()
{
switch (_timeframe)
{
case PERIOD_M1: return "M1";
case PERIOD_M5: return "M5";
case PERIOD_D1: return "D1";
case PERIOD_H1: return "H1";
case PERIOD_H4: return "H4";
case PERIOD_M15: return "M15";
case PERIOD_M30: return "M30";
case PERIOD_MN1: return "MN1";
case PERIOD_W1: return "W1";
}
return "M1";
}
};
datetime LastAlert;
double KПоказано первые 50% кода (символов: 8054)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.