Gehirnwäsche: Systementwicklung - Seite 5

 

Idee # zwei Ausgangspunkt (nur für die Zukunft)

Ich teste diese Idee weiterhin manuell mit iTrend, PriceChannel_Stop_v1 und T3 TRIX (ROC of T6).mq4 Indikator. Siehe die Regeln, die ich für manuelle Tests ausgewählt habe https://www.mql5.com/en/forum/172979/page3

und vielleicht finden Sie dort auch einige Erklärungen.

Diese Idee funktioniert. Es ist Idee #1.

Aber forexts sagte über eine andere Idee: das Verkaufs- oder Kaufsignal von PriceChannel_Stop_v1 nicht auf 0 oder 1 bar zu bestätigen. Es bedeutet, den iTrend-Indikator zu berücksichtigen, nachdem die Order eröffnet wurde. Um mehr Gewinn zu erzielen.

Es wird Idee # 2 sein. Ich denke, wir werden mit dieser Idee # 1 zuerst beenden und werden beginnen, eine andere Idee # 2 zu entwickeln. Aber ich möchte Ihnen zeigen, wie sich die Preiskurve (weiße Linie) durch den iTrend Indikator bewegt. Ich weiß nicht, über sie etwas. Ich habe nicht einmal gedacht. Noch nicht. Ich habe hier nur das Bild gepostet, weil ich es vielleicht vergesse und um einen Ausgangspunkt für die Entwicklung von Idee # 2 zu haben.

Dateien:
bw1_idea2.gif  23 kb
 

Gehirnwäsche im Zeitrahmen D1.

Siehe die Bilder.

Nur um noch einmal auf dieses sehr einfache Handelssystem hinzuweisen.

Ich handelte dieses System auf M15 während der vielen Monate. Und dann haben wir viele EAs erstellt. Für EAs und Regeln gehen Sie zu diesem Thread https://www.mql5.com/en/forum/173031

Aber ich habe dieses einfache System nie auf dem D1-Zeitrahmen getestet.

 

Brainwashing System war immer gut für USDCHF Paar.

Siehe Beispiel der jüngsten Trades für dieses Paar auf H4 Zeitrahmen.

Dateien:
 

Im Beitrag #43 können Sie einige Bilder des Brainwashing-Systems auf dem D1-Zeitrahmen sehen.

Wir können auf GBPUSD sehen, dass der Balken vom 22. November mit einem Signal geschlossen wurde. Bitte beachten Sie, dass wir auf dem geschlossenen Balken handeln.

Alle Erklärungen und Ergebnisse können Sie auf dem Bild sehen.

Ich verwende das Niveau = 0,008 für den iTrend-Indikator für den Zeitrahmen D1 für GBPUSD. Natürlich sollte es in regelmäßigen Abständen überprüft werden, da es die wichtigste Regel für dieses System ist.

Dateien:
gbpusd1_d1.gif  26 kb
 
newdigital:
Im Beitrag #43 sehen Sie einige Bilder des Brainwashing-Systems auf dem D1-Zeitrahmen.

Wir können auf GBPUSD sehen, dass der Balken vom 22. November mit einem Signal geschlossen wurde. Bitte beachten Sie, dass wir auf dem geschlossenen Balken handeln.

Alle Erklärungen und Ergebnisse können Sie auf dem Bild sehen.

Ich verwende Level = 0.008 für den iTrend-Indikator für den D1-Zeitrahmen für GBPUSD. Natürlich sollte es in regelmäßigen Abständen überprüft werden, da es die wichtigste Regel für dieses System ist.

Und einige Trades für andere Paare.

Ich benutze Level = 0.008 für den iTrend Indikator für EURUSD D1; 0.006 für USDCHF D1 und 0.6 für USDJPY D1.

Und bitte lesen Sie diesen Beitrag https://www.mql5.com/en/forum/173031 darüber, wie man das Niveau des iTrend Indikators schätzt. Ich denke, dass jeder, der dieses Brainwashing-System verwendet, das Niveau schätzen sollte, weil dieses Niveau vom Broker abhängt. Das bedeutet, dass Sie wahrscheinlich einen anderen Wert des iTrend-Indikators haben werden (anders als in den beigefügten Bildern).

Alle Erklärungen können Sie in den Bildern finden.

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

Dieser, Preiskanal ist besser

Dateien:
 
/*
//----+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ 
//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); 
}
//+------------------------------------------------------------------+

 

Hier ist ein einfacher EA für diesen Indikator:

//+------------------------------------------------------------------+
//|                                          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.
 


BILD DES INDIKATORS

Ein Anfänger muss mit dieser Art von Indikator und EA .... beginnen und versuchen, ihn zu verbessern,


Es ist ein MQL4 Code

Sie haben eine Trailing-Stop-Funktion in den Code, die gut funktionieren

Grund der Beschwerde: