SureForexHedging 1.09a
Похожие материалы по тегам
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «sureforexhedging 1.09 a (2).mq4» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Для управления рисками реализована система виртуального трейлинга по эквити: после достижения заданного уровня прибыли в долларах активируется режим фиксации, при котором откат от пиковой прибыли приводит к полному закрытию сетки. Дополнительно советник использует индикаторы волатильности и импульса для фильтрации открытий в фазах резкого ускорения движения или исчерпания тренда. Все ордера идентифицируются магическим номером и комментарием, что позволяет советнику работать на одном инструменте без конфликтов с другими экспертами.
Настройки программы
| Настройка | Описание |
|---|---|
| Fast Moving Average period (ema_fast_period) | Период быстрой EMA — Период быстрой экспоненциальной скользящей средней для определения направления тренда |
| Slow Moving Average period (ema_slow_period) | Период медленной EMA — Период медленной экспоненциальной скользящей средней для определения направления тренда |
| Initial trading lot of the first order (fixed_lot) | Фиксированный лот — Начальный объём торговой позиции первого ордера |
| Lot multiplier for subsequent grid layers (lot_multiplier) | Множитель лота — Множитель для увеличения объёма лота в последующих слоях сетки |
| Maximum number of open orders per side (max_layers) | Максимум слоёв — Максимальное количество открытых ордеров на одну сторону |
| Take Profit in pips from the weighted average price (TakeProfit_Pips) | Тейк-профит в пипсах — Зафиксированная прибыль в пипсах от взвешенной средней цены позиции |
| Stop Loss in pips from the very first opened order (StopLoss_Pips) | Стоп-лосс в пипсах — Стоп-лосс в пипсах от цены первого открытого ордера |
| Max drawdown in % of balance to close all (Max_Drawdown_Percent) | Максимальная просадка — Максимальная просадка в процентах от баланса для экстренного закрытия всех позиций |
| Profit in USD to activate equity trailing (trail_start_amount) | Начало трейлинга — Размер прибыли в USD для активации трейлинга по эквити |
| Pullback in USD from the peak profit to close grid (trail_dist_amount) | Откат трейлинга — Величина отката в USD от пиковой прибыли для закрытия сетки |
| Unique identification number for EA's orders (Magic) (initial_magic) | Магический номер — Уникальный идентификационный номер ордеров советника |
| Position comment in the terminal (trade_comment) | Комментарий сделки — Текст комментария, добавляемый к открываемым позициям |
Поиск по коду файла
#property strict
#property description " "
#property description "Original Code: Anton Trefolev (a************v*@gmail.com)"
#property description " "
#property description "Modified and improved using and ChatGPT"
#property description " "
#property description "This EA is licensed for FREE Unlimited Private Use, and has been distributed at Telegram group FREE FOREX ROBOTS for members-only."
#property description " "
#property description "Instructions: any asset, any timeframe."
#property description " "
#property description "Risk Warning! Test this EA on Demo account first. Understand how this EA operates. Trading is risky and not suitable for every investor."
input group "=== EMA TREND SETTINGS ===" // EMA Trend Settings
input int ema_fast_period = 5; // Fast Moving Average period
input int ema_slow_period = 50; // Slow Moving Average period
input group "=== GRID LAYERING ===" // Grid Construction Settings
input double fixed_lot = 0.01; // Initial trading lot of the first order
input double lot_multiplier = 1.5; // Lot multiplier for subsequent grid layers
input int max_layers = 6; // Maximum number of open orders per side
input group "=== FIXED PROTECTION (PIPS) ===" // Fixed Protection in Pips
input int TakeProfit_Pips = 100; // Take Profit in pips from the weighted average price
input int StopLoss_Pips = 30; // Stop Loss in pips from the very first opened order
input group "=== RISK PROTECTION ===" // Capital Drawdown Protection
input double Max_Drawdown_Percent = 15.0; // Max drawdown in % of balance to close all
input group "=== SYNTHETIC EXIT (EQUITY TRAIL) ===" // Virtual Equity Profit Trailing
input double trail_start_amount = 8.0; // Profit in USD to activate equity trailing
input double trail_dist_amount = 3.0; // Pullback in USD from the peak profit to close grid
input group "=== GENERAL ===" // General System Settings
input int initial_magic = 202605212; // Unique identification number for EA's orders (Magic)
input string trade_comment = "Adv-Grid Monolith"; // Position comment in the terminal
int g_buy_layers = 0; // Текущее количество открытых BUY ордеров / Current number of open BUY orders
int g_sell_layers = 0; // Текущее количество открытых SELL ордеров / Current number of open SELL orders
double g_peak_profit = 0.0; // Максимально зафиксированная прибыль сетки / Maximum recorded floating profit of the grid
bool g_trailing_active = false; // Флаг активности трейлинг-стопа по эквити / Flag indicating if equity trailing is currently active
int OnInit() {
// код доступен только после оплаты
}
void OnTick() {
// код доступен только после оплаты
}
void ModifyGridOrders(int type) {
double target_tp = 0, target_sl = 0;
double avg_price = GetWeightedPrice(type);
double first_price = GetFirstOrderPrice(type);
if(avg_price == 0 || first_price == 0) return;
if (type == OP_BUY) {
if (TakeProfit_Pips > 0) target_tp = NormalizeDouble(avg_price + TakeProfit_Pips * Point, Digits);
if (StopLoss_Pips > 0) target_sl = NormalizeDouble(first_price - StopLoss_Pips * Point, Digits);
} else if (type == OP_SELL) {
if (TakeProfit_Pips > 0) target_tp = NormalizeDouble(avg_price - TakeProfit_Pips * Point, Digits);
if (StopLoss_Pips > 0) target_sl = NormalizeDouble(first_price + StopLoss_Pips * Point, Digits);
}
for (int i = OrdersTotal() - 1; i >= 0; i--) {
if (OrderSelect(i, SELECT_BY_POS) && OrderSymbol() == Symbol() && OrderMagicNumber() == initial_magic && OrderType() == type) {
if (NormalizeDouble(OrderTakeProfit(), Digits) != target_tp || NormalizeDouble(OrderStopLoss(), Digits) != target_sl) {
if(!OrderModify(OrderTicket(), OrderOpenPrice(), target_sl, target_tp, 0, clrOrange)) {}
}
}
}
}
double GetFirstOrderPrice(int type) {
Показано первые 50% кода (символов: 8410)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.