UniversalEA - полное описание

28 января 2022, 08:20
Sergey Deev
1
539

English is bellow

UniversalEA - универсальный советник для построения торговой системы на базе стрелочного индикатора. Советник получает данные из буферов индикатора или/и создаваемых им графических объектов, открывает/ закрывает и сопровождает сделки. Ниже приводится полное описание параметров индикатора:

Параметры настройки торговли

  • startLot - фиксированное значение объема сделки или стартовое значение для алгоритмов с наращиванием объема;
  • maxLot - ограничение максимального объема сделки;
  • MaxRisk - максимальный риск на сделку, используется для вычисления объема из расчета максимального убытка в процентах от депозита, отменяет заданное значение startLot (0-не используется);
  • Martin_factor - множитель "мартингейла", изменяет объем последующей сделки после получения убытка до первой прибыльной (0-не используется);
  • stepProfit - шаг в пунктах для частичного закрытия прибыли (0-не используется);
  • stepProfit_factor - объем частичного закрытия на каждом шаге, задается в формате 0,0 .. 1,0;
  • stopLoss - фиксированное значение SL в пунктах (0-не используется);
  • stopLoss_Bars - количество баров для вычисления SL по наименьшему/ наибольшему значению (0-не используется);
  • stopLossShift_Bars - интервал в барах, через который начинается "подтягивание" уровня sl при положительном профите ордера (0-не используется);
  • stopLossShift_Factor - множитель для "подтягивания" уровня sl на каждом баре;
  • takeProfit - фиксированное значение TP в пунктах (0-не используется);
  • takeProfit_factor (TP level from SL) - размер TP от уровня SL (0-не используется);
  • noLoss - фиксированное значение в пунктах для перевода в безубыток, при достижении заданного значения, SL переводится на уровень открытия сделки+спред (0-не используется);
  • noLoss_factor (noLoss level from SL) - уровень прибыли от SL для перевода сделки в безубыток (0-не используется);
  • trailStart - уровень начала трейлинга (0-не используется);
  • trailStop - уровень трейлинга в пунктах, работает после перевода сделки в безубыток (0-не используется);
  • trailStop_factor (trailStop level from TP) - уровень трейлинга от TP (0-не используется);
  • trailStep - шаг трейлинга в пунктах;
  • DualOrders - разрешение торговли BUY при наличии открытых SELL и наоборот;
  • UseAllSignals - разрешение повторных однонаправленных сигналов;
  • NumOrders - максимально допустимое количество сделок в одном направлении;
  • ProfitNum - количество открытых сделок для закрытия по сумме профита (0-не используется);
  • ProfitPercent - процент профита от баланса счета для закрытия по сумме (0-не используется);
  • ProfitSumm - сумма профита в валюте для закрытия по сумме (0-не используется);
  • minProfit_level - уровень от TP для закрытия минимального профита (0-не используется);
  • minProfit_factor - часть объема для закрытия минимального профита (0-не используется);
  • minProfit_noLoss - разрешение перевода в безубыток при закрытии минимального профита;
  • loss_compensation - задание для компенсации убытка (0,01 .. 1,0), к сделке будет добавляться объем из расчета, при закрытии по TP, получения дополнительной прибыли, равной части от суммы убытков (0-не используется);
  • sl_min - минимальное значение SL в пунктах;
  • tp1_factor, tp2_factor, tp3_factor - часть объема, закрываемых по TP1, TP2, TP3 (если заданы), задается, например 0.4, 0.4, 0.2 (0-не используется);
  • reversal_close - признак закрытии рыночных ордеров при получении обратного сигнала;
  • reversal_delete - признак удаления отложенных ордеров при получении обратного сигнала.

Параметры настройки индикатора

  • IndicatorName - имя индикатора (если индикатор находится в стандартной папке, то она не указывается, для индикаторов из маркета, нужно ввести "Market\IndicatorName"), расширение файла ".ex4" можно не вводить;
  • IndicatorTimeFrame - выпадающий список выбора тайм-фрейма индикатора;
  • Индексы буферов индикатора для получения сигналов (значение -1 - не используется):
    • openBuyBufferIndex - сигнал открытия рыночного ордера BUY;
    • openBuyStopBufferIndex - сигнал открытия отложенного ордера BUYSTOP;
    • openBuyLimitBufferIndex - сигнал открытия отложенного ордера BUYLIMIT;
    • takeProfitBuyBufferIndex, stopLossBuyBufferIndex - сигналы получения уровней TP и SL для ордеров на покупку;
    • closeBuyBufferIndex - сигнал на полное закрытие ордеров BUY;
    • minProfitBuyBufferIndex - сигнал на частичное  закрытие ордеров BUY;
    • deletePendingBuyBufferIndex - сигнал на удаление ордеров BUYSTOP и  BUYLIMIT;
    • trailBuyBufferIndex - сигнал для получения уровня трейлинга для сделок BUY;

    • openSellBufferIndex - сигнал открытия рыночного ордера SELL;
    • openSellStopBufferIndex - сигнал открытия отложенного ордера SELLSTOP;
    • openSellLimitBufferIndex - сигнал открытия отложенного ордера SELLLIMIT;
    • takeProfitSellBufferIndex, stopLossSellBufferIndex - сигналы получения уровней TP и SL для ордеров на продажу;
    • closeSellBufferIndex - сигнал на полное закрытие ордеров SELL;
    • minProfitSellBufferIndex - сигнал на частичное  закрытие ордеров SELL;
    • deletePendingSellBufferIndex - сигнал на удаление ордеров SELLSTOP и  SELLLIMIT;
    • trailSellBufferIndex - сигнал для получения уровня трейлинга для сделок SELL;
    • TP1_BufferIndex, TP2_BufferIndex, TP3_BufferIndex - индексы индикаторных буферов для уровней TP1, TP2, TP3;

  • BarIndex - номер бара в индикаторных буферах;
  • deletePendingBarIndex - отдельная настройка номера бара для сигнала удаления отложенных ордеров;
  • indexAction - тип проверки значения в индикаторном буфере:
    • Above | NotEmpty - больше нуля или не равно EMPTY_VALUE;
    • Above - больше нуля;
    • NotEmpty -  не равно EMPTY_VALUE;
  • OrderTypes - тип открываемых ордеров (market, stop, limit);
  • useCandlesForPending - использовать high/low свечи для SL отложенных ордеров;
  • orderShift - дополнительное смещение для SL;
  • paramCount - количество параметров индикатора (не более 10);
  • param1-param10 - параметры индикатора (задаются в формате double);
    • ObjectStopLoss, ObjectMinProfit, ObjectTakeProfit, ObjectStopBuy, ObjectStopSell, ObjectStopAll, ObjectTP1, ObjectTP2, ObjectTP3 - начало имени графических объектов для одноименных сигналов, размещенных на баре не далее, чем задано в следующем параметре (пустая строка - не используется);
    • ObjectStopBar - номер бара для сигнала "стоп" графических объектов;
    • arrowBuyCode, arrowSellCode, arrowCloseBuyCode, arrowCloseSellCode- коды стрелок объектов, типа OBJ_ARROW для формирования одноименных сигналов (0-не используется);
    • arrowBuyColor, arrowSellColor, arrowCloseBuyColor, arrowCloseSellColor- цвет стрелок объектов, типа OBJ_ARROW для формирования одноименных сигналов (clrNONE-не используется).

    Параметры фильтрации

    • useFilterButtons - на график выводятся кнопки BUY / SELL, операции разрешаются, когда соответствующая кнопка нажата;
    • useMaFilter - фильтр по скользящей средней (сделки BUY разрешены, когда цена выше, SELL - ниже скользящей);
    • useRsiFilter - фильтр по RSI (сделки BUY разрешены когда индикатор ниже нижнего уровня, SELL - выше верхнего уровней);
    • useStochFilter - фильтр по Stoch (сделки BUY разрешены когда индикатор ниже нижнего уровня, SELL - выше верхнего уровней);
    • useParabolicFilter - фильтр по SAR (сделки BUY разрешены когда индикатор ниже, SELL - выше цены);
    • useStdFilter - фильтр по StdDev (сделки разрешены когда индикатор идет вверх и выше заданного уровня);
    • useMacdFilter фильтр по MACD ( сделки BUY разрешены когда гистограмма ниже сигнальной линии, SELL - выше).

    Прочие настройки

    • CustomEventBuy, CustomEventSell, CustomEventStopLoss - номера пользовательского события ( CHARTEVENT_CUSTOM+N), генерируемого индикатором (0-не используется);
    • useSymbolList, symbols (symbol list with space delimiter) - список инструментов с разделителем пробел и разрешение работы со списком; 
    • maxSpread - ограничение на торговлю при большом спреде;
    • timeFormat - тип задания времени торговли (час или строка hh:mm:ss);
    • startHour, endHour - час начала и окончания торговли;
    • startTime, endTime - время начала и окончания торговли;
    • slippage - проскальзывание;
    • MAGIC - волшебный номер;
    • useMail, useNotification, messageText - разрешение сообщений на EMail, мобильное устройство и текст сообщения;
    • TesterAutoTradeWeek - признак автосделок в тестере для валидации (отключить для реальной торговли);
    • useButtons - разрешение использовать кнопки BUY / SELL в качестве сигналов.

    Примеры построения торговых систем на популярных индикаторов из маркета: TrendLine PRO, Scalper Inside PRO. Каждый из примеров содержит краткое описание эксперимента, сет-файл и видео с демонстрацией загрузки индикатора, советника и хода тестирования. Тестовые прогоны можно выполнять без покупки советника и индикатора.

    Если вы хотите протестировать свой стрелочный индикатор или индикатор из маркета - обратитесь ко мне через приватное сообщение.

    by English


    UniversalEA is a universal Expert Advisor for building a trading system based on an arrow indicator. The Expert Advisor receives data from indicator buffers and/or graphical objects created by it, opens/closes and accompanies trades. Below is a full description of the indicator parameters:

    Trade setup options

    • startLot - fixed value of the deal volume or starting value for algorithms with increasing volume;
    • maxLot - limitation of the maximum deal volume;
    • MaxRisk - maximum risk per trade, used to calculate the volume based on the maximum loss as a percentage of the deposit, cancels the set startLot value (0-not used);
    • Martin_factor - "martingale" multiplier, changes the volume of the next deal after receiving a loss to the first profitable one (0-not used);
    • stepProfit - step in points for partial profit closing (0-not used);
    • stepProfit_factor - volume of partial closing at each step, set in the format 0.0 .. 1.0;
    • stopLoss - fixed value of SL in points (0-not used);
    • stopLoss_Bars - number of bars for calculating SL by the smallest/largest value (0-not used);
    • stopLossShift_Bars - interval in bars, after which "pulling up" the sl level begins with a positive order profit (0-not used);
    • stopLossShift_Factor - multiplier for "pulling up" the sl level on each bar;
    • takeProfit - fixed TP value in points (0-not used);
    • takeProfit_factor (TP level from SL) - TP size from SL level (0-not used);
    • noLoss - a fixed value in points for transferring to breakeven, when the specified value is reached, SL is transferred to the level of opening a deal + spread (0-not used);
    • noLoss_factor (noLoss level from SL) - profit level from SL to move a trade to breakeven (0-not used);
    • trailStart - trailing start level (0-not used);
    • trailStop - trailing level in points, it works after the trade is moved to breakeven (0-not used);
    • trailStop_factor (trailStop level from TP) - trailing level from TP (0-not used);
    • trailStep - trailing step in points;
    • DualOrders - permission to trade BUY with open SELLs and vice versa;
    • UseAllSignals - allow repeated unidirectional signals;
    • NumOrders - maximum allowable number of trades in one direction;
    • ProfitNum - the number of open trades to close by the amount of profit (0-not used);
    • ProfitPercent - percentage of profit from the account balance to close by amount (0-not used);
    • ProfitSumm - profit amount in currency to close by amount (0-not used);
    • minProfit_level - level from TP to close the minimum profit (0-not used);
    • minProfit_factor - part of the volume for closing the minimum profit (0-not used);
    • minProfit_noLoss - permission to transfer to breakeven when closing the minimum profit;
    • loss_compensation - task for loss compensation (0.01 .. 1.0), volume will be added to the deal based on the calculation, when closing by TP, to receive additional profit equal to a part of the amount of losses (0-not used);
    • sl_min - minimum SL value in points;
    • tp1_factor, tp2_factor, tp3_factor - part of the volume closed by TP1, TP2, TP3 (if set), for example 0.4, 0.4, 0.2 (0-not used);
    • reversal_close - flag for closing market orders upon receipt of a reverse signal;
    • reversal_delete - flag for deleting pending orders when a reverse signal is received.

    Indicator settings

    • IndicatorName - indicator name (if the indicator is in a standard folder, then it is not specified; for indicators from the market, you need to enter "Market\IndicatorName"), the ".ex4" file extension can be omitted;
    • IndicatorTimeFrame - drop-down list for selecting the indicator's time frame;
    • Indices of indicator buffers for receiving signals (value -1 - not used):
      • openBuyBufferIndex - a signal for opening a BUY market order;
      • openBuyStopBufferIndex - signal for opening a pending order BUYSTOP;
      • openBuyLimitBufferIndex - signal for opening a BUYLIMIT pending order;
      • takeProfitBuyBufferIndex, stopLossBuyBufferIndex - signals for receiving TP and SL levels for buy orders;
      • closeBuyBufferIndex - signal for complete closing of BUY orders;
      • minProfitBuyBufferIndex - signal for partial closing of BUY orders;
      • deletePendingBuyBufferIndex - signal to delete BUYSTOP and BUYLIMIT orders;
      • trailBuyBufferIndex - signal for getting the trailing level for BUY trades;

      • openSellBufferIndex - signal for opening a SELL market order;
      • open Sell StopBufferIndex - signal for opening a pending SELL STOP order;
      • open Sell LimitBufferIndex - signal for opening a pending SELL LIMIT order;
      • takeProfit Sell BufferIndex, stopLossSellBufferIndex - signals for receiving TP and SL levels for sell orders;
      • close Sell BufferIndex - signal for complete closing of SELL orders;
      • minProfit Sell BufferIndex - a signal for a partial   closing SELL orders;
      • deletePending Sell BufferIndex - signal to delete SELLSTOP orders and   SELLLIMIT;
      • trail Sell BufferIndex - signal for getting the trailing level for SELL trades;
      • TP1_BufferIndex, TP2_BufferIndex, TP3_BufferIndex - indexes of indicator buffers for TP1, TP2, TP3 levels;

    • BarIndex - bar number in indicator buffers;
    • deletePendingBarIndex - separate setting of the bar number for the signal for deleting pending orders;
    • indexAction - type of checking the value in the indicator buffer:
      • Above | NotEmpty - greater than zero or not equal to EMPTY_VALUE;
      • Above - greater than zero;
      • NotEmpty - not equal to EMPTY_VALUE;
    • OrderTypes - type of orders to be opened (market, stop, limit);
    • useCandlesForPending - use high/low candles for SL pending orders;
    • orderShift - additional shift for SL;
    • paramCount - number of indicator parameters (no more than 10);
    • param1-param10 - indicator parameters (specified in double format);
      • ObjectStopLoss, ObjectMinProfit, ObjectTakeProfit, ObjectStopBuy, ObjectStopSell, ObjectStopAll, ObjectTP1, ObjectTP2, ObjectTP3 - the beginning of the name of graphical objects for signals of the same name placed on the bar no further than specified in the next parameter (empty string - not used);
      • ObjectStopBar - bar number for the "stop" signal of graphical objects;
      • arrowBuyCode, arrowSell Code , arrowCloseBuy Code , arrowCloseSell Code - object arrow codes of the OBJ_ARROW type for generating signals of the same name (0-not used);
      • arrowBuyColor, arrowSellColor, arrowCloseBuyColor, arrowCloseSellColor - color of object arrows, type OBJ_ARROW for generating signals of the same name (clrNONE - not used).

      Filtering options

      • useFilterButtons - BUY / SELL buttons are displayed on the chart, operations are allowed when the corresponding button is pressed;
      • useMaFilter - filter by moving average (BUY trades are allowed when the price is higher, SELL trades are lower than the moving average);
      • useRsiFilter - filter by RSI (BUY trades are allowed when the indicator is below the low level, SELL - above the upper levels);
      • useStochFilter - filter by Stoch (BUY trades are allowed when the indicator is below the lower level, SELL - above the upper levels);
      • useParabolicFilter - filter by SAR ( BUY trades are allowed when the indicator is lower, SELL trades are higher than the price);
      • useStdFilter - filter by StdDev (trades are allowed when the indicator goes up and above the specified level);
      • useMacdFilter MACD filter ( BUY deals are allowed when the histogram is below the signal line, SELL is above).

      Other settings

      • CustomEventBuy, CustomEventSell, CustomEventStopLoss - numbers of the custom event (CHARTEVENT_CUSTOM+N) generated by the indicator (0-not used);
      • useSymbolList, symbols (symbol list with space delimiter) - a list of symbols with space delimiter and permission to work with the list;
      • maxSpread - limit on trading with a large spread;
      • timeFormat - type of trading time setting (hour or string hh:mm:ss);
      • startHour, endHour - start and end hours of trading;
      • startTime, endTime - start and end time of trading;
      • slippage - slippage;
      • MAGIC - magic number;
      • useMail, useNotification, messageText - message permission on EMail, mobile device and message text;
      • TesterAutoTradeWeek - sign of auto trades in the tester for validation (disable for real trading);
      • useButtons - permission to use BUY / SELL buttons as signals.

      Examples of building trading systems on popular indicators from the market: TrendLine PRO , Scalper Inside PRO . Each of the examples contains a brief description of the experiment, a set file and a video demonstrating the loading of the indicator, EA, and testing progress. Test runs can be done without buying an EA and an indicator.

      If you want to test your arrow indicator or indicator from the market - contact me via private message.



      Поделитесь с друзьями: