Trend Rider
Похожие материалы по тегам
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «trend rider (alerts) bt.mq5» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Trend Rider — это пользовательский индикатор для платформы MetaTrader 5, сочетающий метод SuperTrend с фильтрацией по RSI и MACD. Индикатор отображает цветные свечи на графике и линию тренда, визуализируя текущее направление цены. Линия тренда строится на основе ATR с настраиваемым периодом и множителем, а цвет свечей определяется совокупным состоянием RSI и MACD.
Индикатор предоставляет интерактивную кнопку на графике, позволяющую включать и выключать отображение данных. Настройки кнопки включают текст, цвет, размер, шрифт и позиционирование на графике. При нажатии кнопки можно задать звуковой файл для проигрывания.
Система уведомлений поддерживает несколько каналов: звуковые алерты, email-рассылку и push-уведомления. Триггером для отправки служит изменение состояния тренда на новом баре. Также доступна настройка периодов и параметров всех используемых технических индикаторов.
Настройки программы
| Настройка | Описание |
|---|---|
| ATR calculation period (AtrLength) | Период расчёта индикатора ATR (Average True Range), определяющий количество баров для усреднения. |
| ATR multiplier (AtrMultiplier) | Множитель ATR, задающий ширину полосы SuperTrend вокруг средней цены. |
| ATR Applied Price to use (AtrAppliedPrice) | Тип цены, используемый для расчёта индикатора ATR (например, закрытие, открытие, высокая, низкая и т.д.). |
| Rsi Period (RsiPeriod) | Период расчёта индикатора RSI (Relative Strength Index), определяющий количество баров для усреднения. |
| Rsi Applied Price (RsiAppliedPrice) | Тип цены, используемый для расчёта индикатора RSI (Relative Strength Index). |
| Macd fast period (InpFastEMA) | Быстрая период экспоненциальной скользящей средней (EMA), используемая в расчёте MACD. |
| Macd slow period (InpSlowEMA) | Медленная период экспоненциальной скользящей средней (EMA), используемая в расчёте MACD. |
| Macd Signal period (InpSignalEMA) | Период сигнальной линии экспоненциальной скользящей средней (EMA) в индикаторе MACD. |
| MACD Applied Price (MacdAppliedPrice) | Тип цены, используемый для расчёта индикатора MACD. |
| Alerts On (AlertOn) | Включает или отключает систему автоматических уведомлений при изменении состояния тренда. |
| Show Alert Message (SoundON) | Включает или отключает звуковые уведомления (алерты) при смене тренда. |
| Send Email Alerts (EmailON) | Включает или отключает отправку email-уведомлений при смене тренда. |
| Send Push Notifications (PushNotificationON) | Включает или отключает отправку push-уведомлений при смене тренда. |
| button_note1 | Текстовый параметр, используемый как разделитель или примечание в группе настроек кнопки. |
| What window to put the button on (btn_Subwindow) | Номер подокна графика, в котором будет размещена кнопка (0 — основное окно). |
| button corner on chart for anchoring (btn_corner) | Угол графика, к которому привязывается кнопка (верхний левый, верхний правый, нижний левый, нижний правый). |
| a button name (btn_text) | Текст, отображаемый на кнопке. |
| button font name (btn_Font) | Название шрифта, используемого для отображения текста на кнопке. |
| button font size (btn_FontSize) | Размер шрифта текста на кнопке в пунктах. |
| ON color when the button is turned on (btn_text_ON_color) | Цвет текста кнопки, когда отображение данных включено. |
| OFF color when the button is turned off (btn_text_OFF_color) | Цвет текста кнопки, когда отображение данных выключено. |
| background color of the button (btn_background_color) | Цвет фона кнопки на графике. |
| border color the button (btn_border_color) | Цвет рамки (границы) кнопки на графике. |
| x coordinate of the button (button_x) | Горизонтальная координата (X) расположения кнопки на графике. |
| y coordinate of the button (button_y) | Вертикальная координата (Y) расположения кнопки на графике. |
| button width (btn_Width) | Ширина кнопки в пикселях. |
| button height (btn_Height) | Высота кнопки в пикселях. |
| sound file when the button is pressed (soundBT) | Путь к звуковому файлу, который воспроизводится при нажатии кнопки. |
| Unique ID for each button (UniqueButtonID) | Уникальный идентификатор кнопки на графике, позволяющий различать несколько кнопок. |
| button_note2 | Текстовый параметр, используемый как разделитель или примечание в группе настроек кнопки. |
Поиск по коду файла
#property version "1.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 10
#property indicator_plots 2
#property indicator_label1 "Bars"
#property indicator_type1 DRAW_COLOR_CANDLES
#property indicator_color1 clrDimGray, clrGreen, clrRed
#property indicator_style1 STYLE_SOLID
#property indicator_width1 1
#property indicator_label2 "TrendLine"
#property indicator_type2 DRAW_COLOR_LINE
#property indicator_color2 clrDeepSkyBlue, clrPaleVioletRed
#property indicator_style2 STYLE_DOT
#property indicator_width2 1
#define RESET 0
#define Buy 1.0
#define Sell -1.0
input int AtrLength = 10; // ATR calculation period
input double AtrMultiplier = 3.0; // ATR multiplier
input ENUM_APPLIED_PRICE AtrAppliedPrice = PRICE_CLOSE; // ATR Applied Price to use
input int RsiPeriod = 14; // Rsi Period
input ENUM_APPLIED_PRICE RsiAppliedPrice = PRICE_CLOSE; // Rsi Applied Price
input int InpFastEMA = 12; // Macd fast period
input int InpSlowEMA = 26; // Macd slow period
input int InpSignalEMA = 9; // Macd Signal period
input ENUM_APPLIED_PRICE MacdAppliedPrice = PRICE_CLOSE; // MACD Applied Price
input bool AlertOn = false; // Alerts On
input bool SoundON = true; // Show Alert Message
input bool EmailON = false; // Send Email Alerts
input bool PushNotificationON = false; // Send Push Notifications
input string button_note1 = "------------------------------";
input int btn_Subwindow = 0; // What window to put the button on
input ENUM_BASE_CORNER btn_corner = CORNER_LEFT_UPPER; // button corner on chart for anchoring
input string btn_text = "TREND"; // a button name
input string btn_Font = "Arial"; // button font name
input int btn_FontSize = 9; // button font size
input color btn_text_ON_color = clrLime; // ON color when the button is turned on
input color btn_text_OFF_color = clrRed; // OFF color when the button is turned off
input color btn_background_color = clrDimGray; // background color of the button
input color btn_border_color = clrBlack; // border color the button
input int button_x = 260; // x coordinate of the button
input int button_y = 25; // y coordinate of the button
input int btn_Width = 80; // button width
input int btn_Height = 20; // button height
input string soundBT = "tick.wav"; // sound file when the button is pressed
input string UniqueButtonID = "TrendRider"; // Unique ID for each button
input string button_note2 = "------------------------------";
bool show_data = true, recalc = true;
string indicatorFileName, IndicatorName, IndicatorObjPrefix, buttonId;
string prog_name = "Trend Rider";
int iATR_Handle, iRSI_Handle, iMACD_Handle;
double Up[], Dn[], Di[], SuperTrend[], STColors[], candleH[], candleL[], candleO[], candleC[], Ccolors[];
string GenerateIndicatorName(const string target) //don't change anything here
{
string name = target;
int try = 2;
while(ChartWindowFind(ChartID(), name) != -1)
name = target + " #" + IntegerToString(try++);
return name;
}
int OnInit(void)
{
// код доступен только после оплаты
}
void OnDeinit(const int reason) {
ObjectsDeleteAll(ChartID(), IndicatorObjPrefix, -1, -1);
}
void createButton(string buttonID, string buttonText, int width, int height, string font, int fontSize, color bgColor, color borderColor, color txtColor)
{
ObjectDelete (ChartID(), buttonID);
ObjectCreate (ChartID(), buttonID, OBJ_BUTTON, btn_Subwindow, 0, 0);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_COLOR, txtColor);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_BGCOLOR, bgColor);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_BORDER_COLOR, borderColor);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_BORDER_TYPE, BORDER_RAISED);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_XSIZE, width);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_YSIZE, height);
ObjectSetString (ChartID(), buttonID, OBJPROP_FONT, font);
ObjectSetString (ChartID(), buttonID, OBJPROP_TEXT, buttonText);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_FONTSIZE, fontSize);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_SELECTABLE, 0);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_CORNER, btn_corner);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_HIDDEN, 1);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_XDISTANCE, 9999);
ObjectSetInteger(ChartID(), buttonID, OBJPROP_YDISTANCE, 9999);
}
void handleButtonClicks()
{
if(ObjectGetInteger(ChartID(), buttonId, OBJPROP_STATE))
{
ObjectSetIntegeПоказано первые 50% кода (символов: 9037)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.