私が試行錯誤しているアドバイザーの組み立て方 - ページ 51

削除済み  
Alexsandr San:

#property version "1.009"

この機能を追加しました

インジケーターの下で、1つの名前が必要 - LOW

忘れてた!本機能を無効にする

#property 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"
ファイル:
削除済み  

このユーティリティで何ができるんだ!?- そうです!実質的にすべて、あなたのファンタジーのすべてが1つになっているのです。

GBPUSDM30

 
Alexsandr San:

このユーティリティで何ができるんだ!?- そうです!実質的にすべて、あなたのファンタジーのすべてが1つになっているのです。

まあ、価格がクロスオーバーするようになれば、そうですね))))))))))))))))))))))))))))))確かに

削除済み  
Alexsandr San:

このユーティリティで何ができるんだ!?- そうです!あなたのファンタジーをすべて1つにしたようなものです。

このユーティリティに別の機能を求めている - トロール、水平の青い線の後ろに

このユーティリティを求める 1

スナップショット2 2

ここで、私が手動で黄色の水平線を動かすと、ストップが発動します。

スナップショット3 3

削除済み  
Alexsandr San:

このユーティリティは、別の機能であるトロールを求めるもので、水平の青線後ろに あります。

1

2

ここで私は手動で、黄色の水平線を移動させ、ストップをトリガーした

3

それは水平線の背後にある - それは、インジケータLow_Macd_Line.mq5で 行われるどの計算を見るために残っている 青いものの背後にトロールする。

撮影者

写真では、上の青が、上の黄色に触れると、信号が発生します。

という信号が発生し、下側の青が下側の黄色に触れることで

削除済み  
Alexsandr San:

水平線の後ろにある -Low_Macd_Line.mq5 インジケータでどの計算が行われるかはまだ不明です 青い線の後ろをトロールするために

写真では、上の青が、上の黄色に触れると、信号が発生します。

という信号が発生し、下側の青が下側の黄色に触れることで

インジケーターウィンドウのトロールを修正できたLow_Macd_Line.mq5動作した - 今、月曜日に、それを正しくしてユーティリティを更新するために

ショット4

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

以下は、トロールそのものです。

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

Low_Macd_Line.mq5の インジケーターウィンドウでトロールを動作させることに成功した - 今、月曜日に、それを正しくして、ユーティリティを更新 します。

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

以下は、トロールそのものです。

多分、誰かがテスターでこの機能で遊んでみたいと思うでしょう - 私はユーティリティを貼り付けています、それは純粋にテスター用です、あなたはこのインジケータLow_Macd_Line.mq5も 必要です

関数そのもの ここで

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"

インジケータLow_Macd_Line.mq5 から、これらの水平線を設定する必要が ある場合、1 つの Name"LOW".

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
ファイル:
02_llliiiooo.mq5  255 kb
削除済み  
Alexsandr San:

このユーティリティにもう一つ機能を追加すべきです - トロール、水平の青い線の後ろ

#property version "1.011"

トレーリングアームは各ペアごとに(XAU/USDは1時間 足)1分足0.1001で 調整します。

GBPUSDの1 未満 0.0001について

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

最も重要なこと - インジケータを使用する場合Low_Macd_Line.mq5

水平線の名前を正しく入力する必要があります(2つあります) - これは非常に重要です!チャート上のIndicatorLow_Macd_Line.mq 5を1ウィンドウにするとどうなるでしょうか。

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

こうでなきゃダメなんだ!

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.

写真では、トロールが動作し、方向を変更しました - 今、あなたは手動で、再び売りの水平線を設定したい - これは再び方向を変更した場合に備えて。

ファイル:
削除済み  
Alexsandr San:

#property version "1.011"

トレーリングアームは各ペアごとに(XAU/USDは1時間 足)1分足0.1001で 調整します。

GBPUSDの1 未満 0.0001について

最も重要なこと - インジケータLow_Macd_Line.mq5 の場合

水平線の名前を正しく入力する必要がある(2つある) - もっと重要!!!インジケータ Low_Macd_Line.mq5がチャート上のインジケータの1つのウィンドウにあったもの。

#property version "1.012"

機能を若干リファイン

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)

トリガーされると、水平線SELLがポジションをオープンし、水平線BUYを表示、またはその逆が行われます。

また、ラインは"0" から、距離はObj: Trailing Step MACDで 設定されます。

または水平線"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"同じく、距離のみ設定 (input ushort InpObjTrailingStepCS = 5;// Obj: Trailing Step, 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"

インジケータで水平線の距離を 知る方法Low_Macd_Line.mq5 トレイルで設定する(各ペアで、異なる距離)

ユーティリティの設定をコピーして貼り付ける

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

撮影者

画像では "0"からHorizontal BUY 0.0064、Horizontal LOWに触れるとHorizontal SELLが設定されます("0"-0.0064 以下の場合のみ)。

重要!!ユーティリティに入力する数値の前にマイナス(-)を付けないでください。

スナップショット2 この関数のバリアントの1つ

ファイル:
削除済み  

すべてはポイントを求めて - これにRsiとMacdを追加(Indicator https://www.mql5.com/ru/code/392)。

XAUUSDM30

BrainTrend1Sig
BrainTrend1Sig
  • www.mql5.com
Просмотров: 4377 Рейтинг: Опубликован: 2011.07.29 17:23 Обновлен: 2016.11.22 07:33 BrainTrend1Sig - это рыночный индикатор для открытия позиций и выхода из них. Он показывает точки смены тренда цветом, когда цена достигает экстремальных значений и наступает самое удобное время для входа или выхода из рынка. В основе индикатора заложены...
ファイル: