← К каталогу
Исходный код · ID 3731

Bago EA

bago ea_5391011682577321359.mq4

Похожие материалы по тегам

ea robofibo source v.11.2.mq4MQL4 / MetaTrader 4 · 2 общих тегов2 to 1 strategy with signals.pineTradingView · 2 общих теговfresh algo signals & overlays v25_6334471093901859175.pineTradingView · 2 общих теговfresh algo v24 tradingview indicator_5918156155804195406.pineTradingView · 2 общих теговea_rsi_stocho_ma.mq4MQL4 / MetaTrader 4 · 2 общих теговautotradewithbb.mq4MQL4 / MetaTrader 4 · 2 общих тегов
Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

Данный продукт представляет собой торговый советник (Expert Advisor) для платформы MetaTrader 4, реализующий трендовую торговую систему. Он анализирует пересечения скользящих средних и индикатора RSI, комбинируя их с оценкой позиции цены относительно динамических уровней для формирования торговых сигналов.

Советник фильтрует сигналы с учётом контекста рынка, включая ограничения по времени торговых сессий крупных финансовых центров (Лондон, Нью-Йорк, Токио). При совпадении условий генерации сигнала и фильтров советник открывает позиции на покупку или продажу с заданными параметрами лотирования.

Управление открытыми позициями включает многоуровневые стратегии выхода: частичное закрытие лотов на различных ценовых уровнях, перемещение стоп-лосса по тренду и корректировку защитных уровней. Параметры советника настраиваются под разные валютные пары через набор входных параметров, включая периоды индикаторов, размеры лотов и временные окна сессий.

Настройки программы

НастройкаОписание
FasterEMA Быстрая EMA — Период быстрой скользящей средней (EMA), используемой для определения пересечений с медленной EMA и формирования сырых торговых сигналов.
SlowerEMA Медленная EMA — Период медленной скользящей средней (EMA), пересекающейся с быстрой EMA для определения направления тренда.
RSIPeriod Период RSI — Период индикатора RSI, применяемого для подтверждения пересечения уровня 50 в направлении текущего сигнала.
TotalLots Общий объём лота — Общий объём лота, открываемого при совершении новой сделки.
TPLevel1 Уровень ТП 1 — Первый ценовой уровень для частичного закрытия позиции и перемещения стоп-лосса.
TPLevel1Lots Лоты уровня ТП 1 — Объём лота, закрываемого при достижении первого ценового уровня.
TPLevel2 Уровень ТП 2 — Второй ценовой уровень для частичного закрытия позиции и перемещения стоп-лосса.
TPLevel2Lots Лоты уровня ТП 2 — Объём лота, закрываемого при достижении второго ценового уровня.
TPLevel3 Уровень ТП 3 — Третий ценовой уровень для частичного закрытия позиции и перемещения стоп-лосса.
Получить полный код

Поиск по коду файла

/*
Bago system can be categorized as a trend following system based on 
the cross of ema 5 and ema 12. When used properly on hourly chart it 
can capture daily swings of 100+ pips.

The use of small number emas gives Bago system the sensitivity to 
generate early signals following 10-20 minutes scale waves, but also 
produces a great deal of false signals that can quickly drain a trader
's account. So filters are extremely important for Bago system.

While Bago system is largely a discretionary system, the integration of 
two excellent filters may make it possible to use a computer program
generate signals with great high successful rate. This program is 
writtern to investigate this possiblity.

The mechanism to generate a raw Bago signal is simple: ema 5 crosses 
ema 12 in the same direction as RSI 21 crosses 50 level. To abstract 
real signals, we need to pay attention to context: where the price are,
and when the crosses happens.

The greatest meaning of integrating Vegas tunnel into Bago system is, 
the tunnel as well as its fibo lines changes the original plain 2-d
space into a twisted 2-d space. The twisted price trends now have the
coordinates. With this coordinates system we may see the entry and exit
with higher accuracy.

So, this program will first construct the simple rules upon which the 
the raw signals are generated, then will add rules to filter those 
signals. Those new rules are quantified as parameters so they can be 
easily changed and optimized based on the output results.

Enough talking, now come to business.
*/

/*
extern int     TrailingStop        =  30;
extern int     CrossEffectiveTime  =  2; 
extern int     TunnelBandWidth     =  0;
extern int     TunnelSafeZone      =  120;
extern int     HardStopLoss        =  30;
extern int     StopLossToFibo      =  20;

extern bool    LondonOpen          =  true;
extern bool    NewYorkOpen         =  true;
extern bool    TokyoOpen           =  true;
*/
extern int     FasterEMA         =5;
extern int     SlowerEMA         =12;
extern int     RSIPeriod         =21;
extern double  TotalLots         =3.0;
extern int     TPLevel1          =55;
extern double  TPLevel1Lots      =1.0;
extern int     TPLevel2          =89;
extern double  TPLevel2Lots      =1.0;
extern int     TPLevel3          =144;

int     TrailingStop      =30;
int     CrossEffectiveTime=2;
int     TunnelBandWidth   =0;
int     TunnelSafeZone    =120;
int     HardStopLoss      =30;
int     StopLossToFibo    =20;

bool    LondonOpen        =true;
bool    NewYorkOpen       =true;
bool    TokyoOpen         =true;

double         CrossUp[];
double         CrossDown[];

bool           EMACrossedUp;
bool           EMACrossedDown;
bool           RSICrossedUp;
bool           RSICrossedDown;
bool           TunnelCrossedUp;
bool           TunnelCrossedDown;

int            EMACrossedUpTimer;
int            RSICrossedUpTimer;
int            EMACrossedDownTimer;
int            RSICrossedDownTimer;

int init()
  {
      // код доступен только после оплаты
   }

int deinit()
  {

   EMACrossedUp=false;
   RSICrossedUp=false;
   TunnelCrossedUp=false;
   EMACrossedDown=false;
   RSICrossedDown=false;
   TunnelCrossedDown=false;

   EMACrossedUpTimer=0;
   RSICrossedUpTimer=0;
   EMACrossedDownTimer=0;
   RSICrossedDownTimer=0;

   return(0);
  }

  int start() 
  {
      // код доступен только после оплаты
   }
   int i, cnt, total, ticket, orders;
   double fasterEMAnow, slowerEMAnow;
   double fasterEMAprevious, slowerEMAprevious;
   double RSInow, RSIprevious;
   double VegasTunnelFast, VegasTunnelSlow;
   double VegasPriceCrossedL, VegasPriceCrossedS;
   if (Minute()<2 && Seconds()<30)
     {
      fasterEMAnow     =iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, 1);
      fasterEMAprevious=iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, 2);

      slowerEMAnow     =iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, 1);
      slowerEMAprevious=iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, 2);

      RSInow           =iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,1);
      RSIprevious      =iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,2);

      VegasTunnelFast  =iMA(NULL,0,144,0,1,PRICE_CLOSE,0);
      VegasTunnelSlow  =iMA(NULL,0,169,0,1,PRICE_CLOSE,0);

      if ((RSInow > 50) && (RSIprevious < 50) && (RSICrossedUp==false))
        {
         RSICrossedUp  =true;
         RSICrossedDown=false;
        }
      if (RSICrossedUp==true)
         RSICrossedUpTimer++;  // Record the number of bars the cross has happened
      else
         RSICrossedUpTimer=0;  // Reset the timer once the cross is reversed
      if (RSICrossedUpTimer>=CrossEffectiveTime)
         RSICrossedUp=false; // Reset state register when crossed 3 bars ago

      if ((RSInow < 50) && (RSIprevious > 50) && (RSICrossedDown==false))
        {
         RSICrossedUp  =false;
         RSICrossedDown=true;
        }
      if (RSICrossedDown==true)
         RSICrossedDownTimer++;  // Record the number of bars the cross has happened
      else
         RSICrossedDownTimer=0;  // Reset the timer once the cross is reversed
      if (RSICrossedDownTimer>=CrossEffectiveTime)
         RSICrossedDown=false; // Reset register when crossed 3 bars ago

      if((fasterEMAnow > slowerEMAnow) &&
           (fasterEMAprevious < slowerEMAprevious) &&
           (EMACrossedUp==false))
        {
         EMACrossedUp  =true;
         EMACrossedDown=false;
        }
      if (EMACrossedUp==true)
         EMACrossedUpTimer++;  // Record the number of bars the cross has happened
      else
         EMACrossedUpTimer=0;  // Reset the timer once the cross is reversed
      if (EMACrossedUpTimer>=CrossEffectiveTime)
         EMACrossedUp=false; // Reset register when crossed 3 bars ago

      if((fasterEMAnow < slowerEMAnow) &&
           (fasterEMAprevious > slowerEMAprevious) &&
           (EMACrossedDown==false))
        {
         EMACrossedUp  =false;
         EMACrossedDown=true;
        }
      if (EMACrossedDown==true)
         EMACrossedDownTimer++;  // Record the number of bars the cross has happened
      else
         EMACrossedDownTimer=0;  // Reset the timer once the cross is reversed
      if (EMACrossedDownTimer>=CrossEffectiveTime)
         EMACrossedDown=false; // Reset register when crossed 3 bars ago
      if ((Close[1]>VegasTunnelFast && Close[1]>VegasTunnelSlow) &&
          (Close[2]<VegasTunnelFast || Close[2]<VegasTunnelSlow))
        {
         TunnelCrossedUp  =true;
         TunnelCrossedDown=false;
        }
      if ((Close[1]<VegasTunnelFast && Close[1]<VegasTunnelSlow) &&
          (Close[2]>VegasTunnelFast || Close[2]>VegasTunnelSlow))
        {
         TunnelCrossedUp  =false;
         TunnelCrossedDown=true;
        }

      total=OrdersTotal();

      for(cnt=0;cnt<total;cnt++)
        {
         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
         if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
           {
            if(OrderType()==OP_BUY)
              {

               if((EMACrossedDown==true) || (RSICrossedDown==true))
                 {
                  OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);
                  continue;
                 }

               if(TunnelCrossedUp==true)
                 {
                  if(Bid>=(VegasTunnelSlow+TPLevel3*Point))
                    {
                     if (OrderStopLoss()<Bid-TrailingStop*Point)
                        OrderModify(OrderTicket(),Ask,Bid-TrailingStop*Point,OrderTakeProfit(),0);
                     continue;
                    }

                  else if(Bid>=(VegasTunnelSlow+TPLevel2*Point))
                       {
                        VegasPriceCrossedL=(MathRound(10000*VegasTunnelSlow)/10000);
                        if (OrderLots()>1 && OrderOpenPrice()<VegasTunnelSlow+(TPLevel2-12)*Poi

Показано первые 50% кода (символов: 12267)

Открыть по тарифу

Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.

Разовая покупка файла

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
1 226,70₽ ≈ $14.99