Wie ich meinen Berater durch Versuch und Irrtum zusammenstelle - Seite 51

 
Alexsandr San:

Ja! Sie sollten auch dies zum Dienstprogramm hinzufügenhttps://www.mql5.com/ru/code/23939


#Eigenschaft Version "1.009"

Diese Funktion hinzugefügt

input string   t10="----- Price Line:     -----";                //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input ushort   InpIndentUp                  = 5;                 // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 10;                // Indent down, in pips (1.00045-1.00055=1 pips)
input int      InpSeconds                   = 3;                 // Number of seconds

unter Indikator, brauchen einen Namen - LOW

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
Dateien:
 
Alexsandr San:

#Eigenschaft Version "1.009"

Ich habe diese Funktion hinzugefügt

unter Indikator, brauchen einen Namen - LOW

Vergessen! Deaktivieren Sie diese Funktion

#Eigenschaft Version "1.010"

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input ushort   InpIndentUp                  = 5;                 // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 10;                // Indent down, in pips (1.00045-1.00055=1 pips)
input int      InpSeconds                   = 3;                 // Number of seconds
input bool     InpOnTimer                   = false;             // OnTimer "LOW Up" "LOW Down"
Dateien:
 

Was kann dieses Dienstprogramm tun? - ja! praktisch alles, alle Ihre Fantasien in einem.

GBPUSDM30

 
Alexsandr San:

Was kann dieses Dienstprogramm leisten? - ja! praktisch alles, alle Ihre Fantasien in einem.

Nun, wenn der Preis zu einem Kreuzungspunkt kommt, dann ja)))) sicher

 
Alexsandr San:

Was kann dieses Dienstprogramm leisten? - Ja! So ziemlich alles, alle deine Fantasien in einem.

Ich bitte um eine weitere Funktion in diesem Dienstprogramm - Schleppnetz, hinter der horizontalen blauen Linie

Nach diesem Dienstprogramm fragen 1

Schnappschuss2 2

Hier bewege ich die gelbe horizontale Linie manuell und ein Stopp wird ausgelöst.

Schnappschuss3 3

 
Alexsandr San:

Dieses Dienstprogramm fragt nach einer anderen Funktion - Schleppnetz, hinter der horizontalen blauen Linie

1

2

Hier habe ich die gelbe horizontale Linie manuell verschoben und einen Stopp ausgelöst

3

Sie liegt hinter der horizontalen Linie - es bleibt abzuwarten, welche Berechnung im Indikator Low_Macd_Line.mq5 durchgeführt wird, um hinter die blaue Linie zu gelangen

Foto von

im Bild - das obere blaue, das das obere gelbe berührt, löst das Signal aus

und der untere blaue, der den unteren gelben berührt, löst das Signal aus

 
Alexsandr San:

Es ist hinter den Horizontalen Linien - es bleibt zu verstehen - welche Berechnung in dem Low_Macd_Line.mq5 Indikator gemacht wird, um hinter den blauen zu schleppen

im Bild - das obere blaue, das das obere gelbe berührt, löst das Signal aus

und der untere blaue, der den unteren gelben berührt, löst das Signal aus

Konnte das Schleppnetz im IndikatorfensterLow_Macd_Line.mq5 reparieren- jetzt am Montag, um es richtig zu machen und das Dienstprogramm zu aktualisieren

Schuss4

------------------------

Hier ist das Schleppnetz selbst

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTickObjTrailingCS(void)
  {
//---
   if(InpSignalsFrequency>=10) // trailing no more than once every 10 seconds
     {
      datetime time_current=TimeCurrent();
      if(time_current-m_obj_last_trailingCS>10)
        {
         if(RefreshRates())
            ObjTrailingCS();
         else
            return;
         m_obj_last_trailingCS=time_current;
        }
     }
//--- we work only at the time of the birth of new bar
   datetime time_0=iTime(m_symbol.Name(),Period(),0);
   if(time_0==m_prev_barsCS)
      return;
   m_prev_barsCS=time_0;
   if(InpSignalsFrequency<10) // trailing only at the time of the birth of new bar
     {
      if(RefreshRates())
         ObjTrailingCS();
     }
  }
//+------------------------------------------------------------------+
//| Object Trailing                                                  |
//|   InpObjTrailingStop: min distance from price to object          |
//+------------------------------------------------------------------+
void ObjTrailingCS(void)
  {
   double new_up_price        = -1;   //
   double new_down_price      = 1;   //
   double current_up_price    = ObjectGetDouble(0,InpFont0,OBJPROP_PRICE);
   double current_down_price  = ObjectGetDouble(0,InpFont1,OBJPROP_PRICE);
   double price_up            = ObjectGetDouble(0,InpFont2,OBJPROP_PRICE);
   double price_down          = ObjectGetDouble(0,InpFont3,OBJPROP_PRICE);

   if(current_up_price>new_up_price)
     {
      if(current_up_price>price_up+InpObjTrail)
        {
         m_obj_up_priceCS=price_up+InpObjTrail;
         HLineMove(0,InpFont0,m_obj_up_priceCS);
        }
     }
   if(current_down_price<new_down_price)
     {
      if(current_down_price<price_down-InpObjTrail)
        {
         m_obj_down_priceCS=price_down-InpObjTrail;
         HLineMove(0,InpFont1,m_obj_down_priceCS);
        }
     }
  }
//+------------------------------------------------------------------+
 
Alexsandr San:

Ich habe es geschafft, das Schleppnetz im IndikatorfensterLow_Macd_Line.mq5 zum Laufen zu bringen- jetzt muss ich es am Montag richtig machen und das Dienstprogramm aktualisieren

------------------------

Hier ist das Schleppnetz selbst

Vielleicht ist jemand daran interessiert, mit dieser Funktion im Tester zu spielen - ich füge das Dienstprogramm ein, es ist rein für den Tester, Sie benötigen auch diesen IndikatorLow_Macd_Line.mq5

die Funktion selbst Hier-

input string   t10="----- Price Line:     -----";                //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:
input double   InpObjTrail                  = 0.0001;            // Obj: Trailing Stop MACD
input double   InpObjTrailStep              = 0.0001;            // Obj: Trailing Step MACD
input ushort   InpObjTrailingStopCS         = 15;                // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepCS         = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input ushort   InpIndentUp                  = 5;                 // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 10;                // Indent down, in pips (1.00045-1.00055=1 pips)
input int      InpSeconds                   = 3;                 // Number of seconds
input bool     InpOnTimer                   = true;              // OnTimer "LOW Up" "LOW Down"

wenn aus dem IndikatorLow_Macd_Line.mq5 müssen Sie diese horizontalen Linien, ein Name"LOW" zu setzen

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
Dateien:
02_llliiiooo.mq5  255 kb
 
Alexsandr San:

Eine weitere Funktion sollte zu diesem Dienstprogramm hinzugefügt werden - Schleppnetz, hinter der horizontalen blauen Linie

#Eigenschaft Version "1.011"

Trailing Arm sollte für jedes Paar (für XAU/USD für 1 Stunde) für eine Minute angepasst werden 0,1001

Auf GBPUSD unter einer Minute 0,0001

input double   InpObjTrail                  = 1.0001;            // Obj: Trailing Stop MACD ("0" -> Off)
input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD

Das Wichtigste - bei Verwendung des IndikatorsLow_Macd_Line.mq5

Sie müssen den Namen der horizontalen Linie korrekt eingeben (es gibt zwei davon) - das ist sehr wichtig!!! Was würde der IndikatorLow_Macd_Line.mq5 in 1 Fenster des Indikators auf dem Chart sein

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL

So muss es sein!

input string   InpFont2                     = "LOW";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW";          // Obj: Name Price Line SELL

GBPUSDM1XX 1.

GBPUSDM1YY 2.

GBPUSDM1YY1 3.

GBPUSDM1YY2 4.

In den Bildern - das Schleppnetz hat funktioniert und die Richtung geändert - jetzt wollen Sie manuell, wieder die horizontale Linie von SELL setzen - falls diese wieder die Richtung ändert

Dateien:
 
Alexsandr San:

#Eigenschaft Version "1.011"

Trailing Arm sollte für jedes Paar (für XAU/USD für 1 Stunde) für eine Minute angepasst werden 0,1001

Auf GBPUSD unter einer Minute 0,0001

Das Wichtigste - wenn der IndikatorLow_Macd_Line.mq5

Sie müssen den Namen der horizontalen Linie (es gibt zwei) richtig eingeben - das ist wichtiger!!! Was würde der IndikatorLow_Macd_Line.mq5 war in 1 Fenster des Indikators auf dem Chart

#Eigenschaft Version "1.012"

Die Funktion wurde leicht verfeinert

input string   t0="----- Price Line:        -----";              //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:
input double   InpObjTrail                  = 1.0001;            // Obj: Trailing Stop MACD ("0" -> Off)
input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD
input bool     InpDub                       = false;             // "0.0":Price=false(Trail->Off) "LOW":Price=true(Trail->ON)
input bool     InpDubll                     = false;             // Duplicate "BUY""SELL" (ObjTrailStep)
input ushort   InpObjTrailingStopCS         = 15;                // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepCS         = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input bool     InpOnTimer                   = false;             // OnTimer "LOW Up" "LOW Down"
input ushort   InpIndentUp                  = 5;                 // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 10;                // Indent down, in pips (1.00045-1.00055=1 pips)

Wenn die horizontale Linie SELL ausgelöst wird, wird eine Position eröffnet und eine horizontale Linie BUY angezeigt und umgekehrt.

Außerdem wird die Linie entweder ab "0" gesetzt und der Abstand wirddurch Obj: Trailing Step MACD

oder von der horizontalen Linie"LOW".


input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD
input bool     InpDub                       = false;             // "0.0":Price=false(Trail->Off) "LOW":Price=true(Trail->ON)
input bool     InpDubll                     = false;             // Duplicate "BUY""SELL" (ObjTrailStep)

FromTimer "LOW Up" "LOW Down" gleich, nurder Abstand wird gesetzt (input ushort InpObjTrailingStepCS = 5;// Obj: Trailing Step, in Pips (1.00045-1.00055=1 Pips)

input ushort   InpObjTrailingStepCS         = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input bool     InpOnTimer                   = false;             // OnTimer "LOW Up" "LOW Down"

Wie kann man den Abstand der horizontalen Linie im IndikatorLow_Macd_Line.mq5 wissen, um in der Spur (auf jedem Paar, einen anderen Abstand) gesetzt

Kopieren und Einfügen der Einstellungen des Dienstprogramms

input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD

Foto von

im Bild von "0" bis Horizontal BUY 0.0064 und wenn es Horizontal LOW berührt, wird Horizontal SELL gesetzt (nur unter"0"-0.0064)

WICHTIG!!! kein Minus ( - ) vor die Zahlen setzen, die wir in das Dienstprogramm eingeben

Schnappschuss2 Eine der Varianten dieser Funktion

Dateien:
Grund der Beschwerde: