Beyin yıkama: sistem geliştirme - sayfa 5

 

Fikir # iki başlangıç noktası (sadece gelecek için)

Bu fikri iTrend, PriceChannel_Stop_v1 ve T3 TRIX (ROC of T6).mq4 göstergesi ile manuel olarak test etmeye devam ediyorum. Manuel test için seçtiğim kurallara bakın https://www.mql5.com/en/forum/172979/page3

ve bazı ifadeler de bulabilirsiniz.

Bu fikir işe yarıyor. 1 numaralı fikir.

Ancak forexts başka bir fikirden bahsetti: PriceChannel_Stop_v1'den 0 veya 1 çubukta olmayan sat veya al sinyalini onaylamak. Sipariş açıldıktan sonra iTrend göstergesini dikkate almak anlamına gelir. Daha fazla kar elde etmek için.

2 numaralı fikir olacak. Sanırım ilk önce bu 1 numaralı fikri bitireceğiz ve 2 numaralı başka bir fikir geliştirmeye başlayacağız. Ama ben size fiyat eğrisinin (beyaz çizgi) iTrend göstergesi üzerinden nasıl hareket ettiğini göstermek istiyorum. Bu konuda hiçbir şey bilmiyorum. düşünmedim bile. Henüz değil. Resmi buraya gönderdim çünkü unutabilirim ve 2. fikrin geliştirilmesi için bir başlangıç noktası olabilir.

Dosyalar:
bw1_idea2.gif  23 kb
 

D1 zaman diliminde beyin yıkama.

Görüntülere bakın.

Sadece bu çok basit ticaret sistemini hatırlatmak için.

Bu sistemi aylarca M15'te takas ettim. Ve sonra birçok EA oluşturduk. EA'lar ve kurallar için bu konuya gidin https://www.mql5.com/en/forum/173031

Ancak bu basit sistemi D1 zaman diliminde hiç test etmedim.

 

Beyin yıkama sistemi USDCHF çifti için her zaman iyi olmuştur.

H4 zaman diliminde bu çift için son işlemler örneğine bakın.

Dosyalar:
 

#43 numaralı gönderide, D1 zaman diliminde Beyin Yıkama sisteminin bazı resimlerini görebilirsiniz.

GBPUSD'de 22 Kasım barının sinyalle kapatıldığını görebiliriz. Lütfen kapanış çubuğunda işlem yaptığımızı unutmayın.

Resimden görebileceğiniz tüm açıklamalar ve sonuçlar.

GBPUSD için D1 zaman dilimi için iTrend göstergesi için seviye = 0.008 kullanıyorum. Tabii ki bu sistemin ana kuralı olduğu için periyodik olarak gözden geçirilmelidir.

Dosyalar:
gbpusd1_d1.gif  26 kb
 
newdigital:
#43 numaralı gönderide, D1 zaman diliminde Beyin Yıkama sisteminin bazı resimlerini görebilirsiniz.

GBPUSD'de 22 Kasım barının sinyalle kapatıldığını görebiliriz. Lütfen kapanış çubuğunda işlem yaptığımızı unutmayın.

Resimden görebileceğiniz tüm açıklamalar ve sonuçlar.

GBPUSD için D1 zaman dilimi için iTrend göstergesi için seviye = 0.008 kullanıyorum. Tabii ki bu sistemin ana kuralı olduğu için periyodik olarak gözden geçirilmelidir.

Ve diğer çiftlerde bazı işlemler.

EURUSD D1 için iTrend göstergesi için seviye = 0.008 kullanıyorum; USDCHF D1 için 0,006 ve USDJPY D1 için 0,6.

Ve lütfen bu gönderiyi okuyun https://www.mql5.com/en/forum/173031 iTrend göstergesinin seviyesinin nasıl tahmin edileceğiyle ilgili. Bu Beyin Yıkama sistemini kullanan herkesin seviyeyi tahmin etmesi gerektiğini düşünüyorum çünkü bu seviye komisyoncuya bağlı. Bu, muhtemelen farklı bir iTrend göstergesi değerine sahip olacağınız anlamına gelir (ekli resimlerden farklı).

Resimlerde bulabileceğiniz tüm açıklamalar.

Dosyalar:
eurusd1_d1.gif  23 kb
usdchf1_d1.gif  24 kb
usdjpy1_d1.gif  26 kb
 

Bu, fiyat kanalı daha iyi

Dosyalar:
 
/*
//----+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ 
//Version  July 1, 2006                                              |
Editing   Nikolay Kositsin  15.06.2006  farria@mail.redcom.ru        |
//----+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ 
*/ 
//+------------------------------------------------------------------+
//|                                            PriceChannel_StopNK.mq4 | 
//|                           Copyright © 2005, TrendLaboratory Ltd. | 
//|                                       E-mail: igorad2004@list.ru | 
//+------------------------------------------------------------------+ 
#property copyright "Copyright © 2005, TrendLaboratory Ltd." 
#property link "E-mail: igorad2004@list.ru" 
//---- îòðèñîâêà èíäèêàòîðà â ãëàâíîì îêíå
#property indicator_chart_window 
//---- êîëè÷åñòâî èíäèêàòîðíûõ áóôôåðîâ
#property indicator_buffers 6 
//---- öâåòà èíäèêàòîðà
#property indicator_color1 Yellow 
#property indicator_color2 Magenta
#property indicator_color3 Lime 
#property indicator_color4 Red 
#property indicator_color5 Lime 
#property indicator_color6 Red  
//---- òîëùèíà èíäèêàòîðíûõ ëèíèé
#property indicator_width1 0
#property indicator_width2 0
#property indicator_width3 2
#property indicator_width4 2
#property indicator_width5 0
#property indicator_width6 0
//---- ÂÕÎÄÍÛÅ ÏÀÐÀÌÅÒÐÛ ÈÍÄÈÊÀÒÎÐÀ þþþþþþææ+ 

// double signal_up = iCustom(NULL,0,"Price ChannelNK", ChannelPeriod,Risk, Signal, Line, Shift,2,1 );



extern int ChannelPeriod=5; 
extern double       Risk=0.10; 
extern bool       Signal=true;
extern bool        Line =true; 
//---- æææææææææææææææææææææææææææææææææææææ+
//---- èíäèêàòîðíûå áóôôåðû
double UpTrendBuffer  []; 
double DownTrendBuffer[]; 
double UpTrendSignal  []; 
double DownTrendSignal[]; 
double UpTrendLine    []; 
double DownTrendLine  [];  
//+------------------------------------------------------------------+
//| PriceChannel_Stop initialization function                        | 
//+------------------------------------------------------------------+
int init() 
{ 
string short_name; 
//---- 6 èíäèêàòîðíûõ áóôôåðà èñïîëüçîâàíû äëÿ ñ÷¸òà
SetIndexBuffer(0,UpTrendBuffer); 
SetIndexBuffer(1,DownTrendBuffer); 
SetIndexBuffer(2,UpTrendSignal); 
SetIndexBuffer(3,DownTrendSignal); 
SetIndexBuffer(4,UpTrendLine); 
SetIndexBuffer(5,DownTrendLine); 
//---- Ñòèëü èñïîëíåíèÿ ãðàôèêà
SetIndexStyle(0,DRAW_ARROW); 
SetIndexStyle(1,DRAW_ARROW); 
SetIndexStyle(2,DRAW_ARROW); 
SetIndexStyle(3,DRAW_ARROW); 
SetIndexStyle(4,DRAW_LINE); 
SetIndexStyle(5,DRAW_LINE); 
SetIndexArrow(0,159); 
SetIndexArrow(1,159); 
SetIndexArrow(2,108); 
SetIndexArrow(3,108); 
//---- óñòàíîâêà çíà÷åíèé èíäèêàòîðà, êîòîðûå íå áóäóò âèäèìû íà ãðàôèêå
SetIndexEmptyValue(0,0.0);
SetIndexEmptyValue(1,0.0);
SetIndexEmptyValue(2,0.0);
SetIndexEmptyValue(3,0.0);
SetIndexEmptyValue(4,0.0);
SetIndexEmptyValue(5,0.0);
//---- èìÿ äëÿ îêîí äàííûõ è ëýéáà äëÿ ñóáúîêîí
short_name="PriceChannel_Stop_v1("+ChannelPeriod+")"; 
IndicatorShortName(short_name); 
SetIndexLabel(0,"UpTrend Stop"); 
SetIndexLabel(1,"DownTrend Stop"); 
SetIndexLabel(2,"UpTrend Signal"); 
SetIndexLabel(3,"DownTrend Signal"); 
SetIndexLabel(4,"UpTrend Line"); 
SetIndexLabel(5,"DownTrend Line"); 
//---- óñòàíîâêà íîìåðà áàðà, íà÷èíàÿ ñ êîòîðîãî áóäåò îòðèñîâûâàòüñÿ èíäèêàòîð 
SetIndexDrawBegin(0,ChannelPeriod); 
SetIndexDrawBegin(1,ChannelPeriod); 
SetIndexDrawBegin(2,ChannelPeriod); 
SetIndexDrawBegin(3,ChannelPeriod); 
SetIndexDrawBegin(4,ChannelPeriod); 
SetIndexDrawBegin(5,ChannelPeriod); 
//---- Óñòàíîâêà ôîðìàòà òî÷íîñòè (êîëè÷åñòâî çíàêîâ ïîñëå äåñÿòè÷íîé òî÷êè) äëÿ âèçóàëèçàöèè çíà÷åíèé èíäèêàòîðà  
IndicatorDigits(Digits);
//---- çàâåðøåíèå èíèöèàëèçàöèè
return(0); 
}
//+------------------------------------------------------------------+
//| PriceChannel_Stop                                                | 
//+------------------------------------------------------------------+
int start() 
{ 
//---- ïðîâåðêà êîëè÷åñòâà áàðîâ íà äîñòàòî÷íîñòü äëÿ ðàñ÷¸òà
if (Bars-1<ChannelPeriod+1)return(0);
//----+ Ââåäåíèå ïåðåìåííûõ ñ ïëàâàþùåé òî÷êîé
double bsmax[1],bsmin[1],high,low,price,dprice; 
//---- ââåäåíèå ïåðåìåííûõ ïàìÿòè  
static int time2,TREND;static double BSMAX,BSMIN;
//----+ Ââåäåíèå öåëûõ ïåðåìåííûõ è ïîëó÷åíèå óæå ïîñ÷èòàííûõ áàðîâ
int trend,MaxBar,bar,limit,ii,counted_bars=IndicatorCounted();
//---- ïðîâåðêà íà âîçìîæíûå îøèáêè
if (counted_bars<0)return(-1);
//---- ïîñëåäíèé ïîñ÷èòàííûé áàð äîëæåí áûòü ïåðåñ÷èòàí 
if (counted_bars>0) counted_bars--;
//---- îïðåäåëåíèå íîìåðà ñàìîãî ñòàðîãî áàðà, íà÷èíàÿ ñ êîòîðîãî áóäåò ïðîèçåä¸í ïåðåñ÷¸ò íîâûõ áàðîâ 
MaxBar=Bars-1-ChannelPeriod-1;
limit=Bars-counted_bars-1; 
//---- èíèöèàëèçàöèÿ íóëÿ
if (limit>MaxBar)
      {
       for (bar=limit;bar>=MaxBar;bar--) 
        { 
         UpTrendBuffer  [bar]=0.0; 
         DownTrendBuffer[bar]=0.0; 
         UpTrendSignal  [bar]=0.0; 
         DownTrendSignal[bar]=0.0; 
         UpTrendLine    [bar]=0.0; 
         DownTrendLine  [bar]=0.0; 
        } 
       limit=MaxBar;
      }
//---- èçìåíåíèå ðàçìåðîâ âðåìåííûõ áóôôåðîâ 
if(ArrayResize(bsmax,limit+2)!=limit+2)return(-1);
if(ArrayResize(bsmin,limit+2)!=limit+2)return(-1);
//---- ïðåäâàðèòåëüíûé öèêë ðàñ÷¸òà âðåìåííûõ áóôôåðîâ 
for (bar=limit;bar>=0;bar--) 
  { 
   high=High[bar]; 
   low =Low [bar]; 
   ii=bar-1+ChannelPeriod; 
   while(ii>=bar) 
    { 
     price=High[ii]; 
     if(high<price)high=price; 
     price=Low[ii]; 
     if(low>price) low=price; 
     ii--; 
    } 
  dprice=(high-low)*Risk;
  bsmax[bar]=high-dprice; 
  bsmin[bar]=low +dprice;
 }
//----
int Tnew=Time[limit+1];
//+--- âîññòàíîâëåíèå çíà÷åíèé ïåðåìåííûõ +======+
if (limit<MaxBar)
  if (Tnew==time2)
   {
     bsmax[limit+1]=BSMAX;
     bsmin[limit+1]=BSMIN;
     trend=TREND;
   } 
  else 
   {
    if (Tnew>time2)Print("Îøèáêà âîññòàíîâëåíèÿ ïåðåìåííûõ. Tnew>time2");
              else Print("Îøèáêà âîññòàíîâëåíèÿ ïåðåìåííûõ. Tnew<time2");
    Print("Áóäåò ïðîèçâåä¸í ïåðåñ÷¸ò èíäèêàòîðà íà âñåõ áàðàõ");
    return(-1); 
   }
//+--- +==========================================+

//---- îñíîâíîé öèêë ðàñ÷¸òà èíäèêàòîðà
for (bar=limit;bar>=0;bar--) 
 { 
  //+--- Ñîõðàíåíèå çíà÷åíèé ïåðåìåííûõ +====+ 
   if (bar==1)
    {
     if(((limit==1)&&(time2==Time[2]))||(limit>1))
       {
         time2=Time [2];
         BSMAX=bsmax[2]; 
         BSMIN=bsmin[2];
         TREND=trend;
       }
    }
  //+---+====================================+     
   //----
   UpTrendBuffer  [bar]=0.0; 
   DownTrendBuffer[bar]=0.0; 
   UpTrendSignal  [bar]=0.0; 
   DownTrendSignal[bar]=0.0; 
   UpTrendLine    [bar]=0.0; 
   DownTrendLine  [bar]=0.0; 
   //----
  if (Close[bar]>bsmax[bar+1])trend= 1; 
  if (Close[bar]<bsmin[bar+1])trend=-1; 
  //----
  if(trend>0 && bsmin[bar]<bsmin[bar+1]) bsmin[bar]=bsmin[bar+1]; 
  if(trend<0 && bsmax[bar]>bsmax[bar+1]) bsmax[bar]=bsmax[bar+1]; 
  //---- +++
  if (trend>0) 
   { 
     price=bsmin[bar];
    if (Signal==true && DownTrendBuffer[bar+1]>0) 
     { 
      UpTrendSignal[bar]=price; 
      if(Line==true) UpTrendLine[bar]=price; 
     } 
    else 
     { 
      UpTrendBuffer[bar]=price; 
      if(Line==true) UpTrendLine[bar]=price; 
     }
  }  
 //---- +++
 if (trend<0) 
  { 
   price=bsmax[bar];
   if (Signal==true && UpTrendBuffer[bar+1]>0) 
    { 
     DownTrendSignal[bar]=price;
     if(Line==true) DownTrendLine[bar]=price; 
    } 
   else 
    { 
     DownTrendBuffer[bar]=price;
     if(Line==true) DownTrendLine[bar]=price;
    } 
  } 
  //---- +++
 } 
//----
return(0); 
}
//+------------------------------------------------------------------+

 

İşte bu gösterge için temel bir EA:

 //+------------------------------------------------------------------+
//|                                          EA_Price_Channel_NK.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link        "https://www.mql5.com"
#property version    "1.00"
#property strict

extern bool open_buy = true ;
extern bool open_sell = true ;

 extern int   MagicNumber   = 451 ;
 extern    double StopLoss   = 135 ;
 extern    double TakeProfit = 400 ;
 extern    double lots       = 0.1 ; 
 string Text ; 
extern int Tral_Stop      = 180 ;                       

 // double signal_up = iCustom(NULL,0,"Price ChannelNK", ChannelPeriod,Risk, Signal, Line, Shift,2,1 );

extern int ChannelPeriod= 5 ; 
extern double        Risk= 0.10 ; 
extern bool        Signal= true ;
extern bool         Line = true ; 

datetime time0; 
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit ()
  {
//---
   
//---
   return ( INIT_SUCCEEDED );
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit ( const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick ()
  {
//---
   if ( time0 == Time [ 0 ] ) return ;
       time0= Time [ 0 ];
   
   if ( count_tip( OP_BUY ) > 0 ) trailing_stop();
   if ( count_tip( OP_SELL ) > 0 ) trailing_stop();
   
   
     double signal_up = iCustom ( NULL , 0 , "Price ChannelNK" , ChannelPeriod,Risk, Signal, Line, 2 , 1 );
     double sl_buy = MathMin ( Bid - StopLoss* Point , signal_up );
      
      
       if ( signal_up != 0.0 && open_buy && count_tip( OP_BUY ) == 0 )
         {
           int ticket_buy = OrderSend ( _Symbol , OP_BUY , lots, Ask , 3 , sl_buy, Ask +TakeProfit* Point , "RsiEma" , MagicNumber);
         }
  
  
     double signal_down = iCustom ( NULL , 0 , "Price ChannelNK" , ChannelPeriod,Risk, Signal, Line, 3 , 1 );
     double sl_sell = MathMax ( Ask + StopLoss* Point , signal_down );
      
      
       if ( signal_down != 0.0 && open_sell && count_tip( OP_SELL ) == 0 )
         {
           int ticket_sell  = OrderSend ( _Symbol , OP_SELL , lots, Bid , 3 , sl_sell, Bid - TakeProfit* Point , "RsiEma" , MagicNumber);
         }
   
   
  }
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
int count_tip( int tip = - 1 )
{
   int cpte_order = 0 ; 
   for ( int i = ( OrdersTotal ()- 1 ); i >= 0 ; i--)
  {
     if ( OrderSelect (i, SELECT_BY_POS , MODE_TRADES ) == false ) continue ;    
     if ( OrderMagicNumber ()==MagicNumber && OrderType ()== tip) cpte_order++;
   }
   return (cpte_order);
}

//+------------------------------------------------------------------+
//   https://book.mql4.com/trading/ordermodify
//------------------------------------------------------------------------------- 1 --
void trailing_stop ( )                                   // Special function 'start'
  {
   string Symb= Symbol ();                         // Symbol
//------------------------------------------------------------------------------- 2 --
   for ( int i= 1 ; i<= OrdersTotal (); i++)           // Cycle searching in orders
     {
       if ( OrderSelect (i- 1 , SELECT_BY_POS )== true ) // If the next is available
        {                                       // Analysis of orders:
         int Tip= OrderType ();                   // Order type
         if ( OrderSymbol ()!=Symb||Tip> 1 ) continue ; // The order is not "ours"
         double SL= OrderStopLoss ();             // SL of the selected order
         //---------------------------------------------------------------------- 3 --
         while ( true )                             // Modification cycle
           {
             double TS=Tral_Stop;                 // Initial value
             int Min_Dist= ( int ) MarketInfo (Symb, MODE_STOPLEVEL ); //Min. distance
             if (TS < Min_Dist)                   // If less than allowed
               TS=Min_Dist;                     // New value of TS
             //------------------------------------------------------------------- 4 --
             bool Modify= false ;                   // Not to be modified
             switch (Tip)                         // By order type
              {
               case 0 :                         // Order Buy
                   if ( NormalizeDouble (SL, Digits )< // If it is lower than we want
                     NormalizeDouble ( Bid -TS* Point , Digits ))
                    {
                     SL= Bid -TS* Point ;           // then modify it
                      Text= "Buy " ;         // Text for Buy 
                     Modify= true ;               // To be modified
                    }
                   break ;                         // Exit 'switch'
               case 1 :                         // Order Sell
                   if ( NormalizeDouble (SL, Digits )> // If it is higher than we want
                     NormalizeDouble ( Ask +TS* Point , Digits )
                     || NormalizeDouble (SL, Digits )== 0 ) //or equal to zero
                    {
                     SL= Ask +TS* Point ;           // then modify it
                     Text= "Sell " ;               // Text for Sell 
                     Modify= true ;               // To be modified
                    }
              }                                 // End of 'switch'
             if (Modify== false )                   // If it is not modified
               break ;                           // Exit 'while'
             //------------------------------------------------------------------- 5 --
             double TP    = OrderTakeProfit ();     // TP of the selected order
             double Price = OrderOpenPrice ();     // Price of the selected order
             int     Ticket= OrderTicket ();         // Ticket of the selected order
 
             Alert ( "Modification " ,Text,Ticket, ". Awaiting response.." );
             bool Ans= OrderModify (Ticket,Price,SL,TP, 0 ); //Modify it!
             //------------------------------------------------------------------- 6 --
             if (Ans== true )                       // Got it! :)
              {
               Alert ( "Order " ,Text,Ticket, " is modified:)" );
               break ;                           // From modification cycle.
              }
             //------------------------------------------------------------------- 7 --
             int Error= GetLastError ();           // Failed :(
             switch (Error)                       // Overcomable errors
              {
               case 130 : Alert ( "Wrong stops. Retrying." );
                   RefreshRates ();               // Update data
                   continue ;                     // At the next iteration
               case 136 : Alert ( "No prices. Waiting for a new tick.." );
                   while ( RefreshRates ()== false )   // To the new tick
                     Sleep ( 1 );                   // Cycle delay
                   continue ;                     // At the next iteration
               case 146 : Alert ( "Trading subsystem is busy. Retrying " );
                   Sleep ( 500 );                   // Simple solution
                   RefreshRates ();               // Update data
                   continue ;                     // At the next iteration
                   // Critical errors
               case 2 : Alert ( "Common error." );
                   break ;                         // Exit 'switch'
               case 5 : Alert ( "Old version of the client terminal." );
                   break ;                         // Exit 'switch'
               case 64 : Alert ( "Account is blocked." );
                   break ;                         // Exit 'switch'
               case 133 : Alert ( "Trading is prohibited" );
                   break ;                         // Exit 'switch'
               default : Alert ( "Occurred error " ,Error); //Other errors
              }
             break ;                               // From modification cycle
           }                                     // End of modification cycle
         //---------------------------------------------------------------------- 8 --
        }                                       // End of order analysis
     }                                           // End of order search
//------------------------------------------------------------------------------- 9 --
   return ;                                       // Exit start()
  }
//----------------------------------------------------------------
 
Chart EURUSD, H1, 2018.10.27 14:45 UTC, FxPro Financial Services Ltd, MetaTrader 4, Real
Chart EURUSD, H1, 2018.10.27 14:45 UTC, FxPro Financial Services Ltd, MetaTrader 4, Real
  • www.mql5.com
Symbol: EURUSD. Periodicity: H1. Broker: FxPro Financial Services Ltd. Trading Platform: MetaTrader 4. Trading Mode: Real. Date: 2018.10.27 14:45 UTC.
 


GÖSTERGE GÖRÜNTÜSÜ

Yeni başlayanlar bu tür bir gösterge ve EA ile başlamalıdır .... Ve onu geliştirmeye çalışın,


Bu bir MQL4 Kodudur

Kodda, iyi çalışan bir takip eden durdurma işlevi var.

Neden: