エリート指標 :) - ページ 383 1...376377378379380381382383384385386387388389390...1108 新しいコメント TepeFinans 2011.10.02 08:24 #3821 Mladenさん、こんにちは。 ありがとうございます mladen: TepeFinansこちらです。 メタトレーダーが提供する「デフォルト」のインディケータを使用したのではなく、値とシグナルの平滑化の期間を変えることができるバージョンを使用しています。数値とシグナルの両方で使用されているスムージングは、三角移動平均(中央値ではなく「通常の」三角移動平均なので、再計算は一切ありません)で、デフォルトでは内蔵インジケータと同じに設定されていますが、異なるスムージング長さを実験することもできます。 シンプルなインジケータと、mtf、アラート、ダイバージェンスラインを含むバージョンを添付しています。シンプルなバージョンを添付することで、デフォルトのビルトイン・インディケーターと単純に比較できるようにするため。また、ダイバージェンスを探す場合、rviのスムージングをOFF(スムージング期間を1に設定)にすると、「生のrvi」値のラグが最小限になり、スムージングモードよりもピークの識別がより正確になるので、良いアイデアかもしれません。しかし、それは「生のrvi」であり、rviではないことに注意してください(ここに、通常のrvi(上)と「生のrvi」(下)のダイバージェンスの比較があります - ダイバージェンスに関する限り、生の方がより正確に仕事をし、この方法で「汎用」バージョンが少し便利になります よろしくお願いします。 ムラデン Mladen Rakic 2011.10.03 08:55 #3822 QQEアドバンスドすでに便利なインジケータを もう少し便利にする試みです。 QQEに追加されたもの:計算で使用する前に価格を選択しスムージング(フィルター)すること、メタトレーダー内蔵のrsi以外を使用すること。メタトレーダー内蔵のrsiは、オリジナルのWelles Wilderのrsiとは異なり、QQEの計算で使用するデフォルトのrsiタイプをWilderのrsiに設定することにした理由は1つだけではありません。例によって、rsiのメソッドは 0 - "通常の" rsi 1 - ワイルダーズrsi 2 - rsx 3 - カトラーrsi また、非常に穏やかな価格の事前平滑化でさえ、むしろ興味深い結果を与えています:ここでは、計算に使用されるWilderの3期間の事前平滑化(MaPeriodset to 3)rsiと「レギュラー」QQEと上級QQEを比較します。 または、15分足チャートに同じ設定の1時間足インジケータ(スイングを求める人が多い昨今、このようなものを見ておけば、間違いを避けられたかもしれませんね) ファイル: qqe_adv_1.gif 24 kb qqe_adv_2.gif 20 kb qqe_advanced.mq4 12 kb khaliddxd 2011.10.03 12:31 #3823 Mladen, ご要望をお聞かせください 親愛なるMladen。 qqeのインジケータをカラーバーに変換していただけませんか?前作のように。 ありがとうございます。 Yours, khaliddxd camisa 2011.10.03 19:56 #3824 mladen: TepeFinansはい、どうぞ。 メタトレーダーが提供する "デフォルト "のインディケータを使用したのではなく、値とシグナルの平滑化の期間を変えることができるバージョンを使用しています。数値とシグナルの両方で使用されているスムージングは、三角移動平均(中央値ではなく「通常の」三角移動平均なので、再計算は一切ありません)で、デフォルトでは内蔵インジケータと同じに設定されていますが、異なるスムージング長さを実験することもできます。 シンプルなインジケータと、mtf、アラート、ダイバージェンスラインを含むバージョンを添付しています。シンプルなバージョンを添付することで、デフォルトのビルトイン・インディケーターと単純に比較できるようにするため。また、ダイバージェンスを探す場合、rviのスムージングをOFF(スムージング期間を1に設定)にすると、「生のrvi」値のラグが最小限になり、スムージングモードよりもピークの識別がより正確になるので、良いアイデアかもしれません。しかし、それは「生のrvi」であり、rviではないことに注意してください(ここに、通常のrvi(上)と「生のrvi」(下)のダイバージェンスの比較があります - ダイバージェンスに関する限り、生の方がより正確に仕事をし、この方法で「汎用」バージョンが少し便利になります よろしくお願いします。 ムラデン 矢印をお願いします。(Mladenの新しいQQEのための同じをお願いします) forexts2 2011.10.04 04:35 #3825 別の新しいインディのリクエスト Mladenです。 モガレフバンドという新しいインジケーターの リクエストです。 このコードは今年の5月にトレーダーズミーティングで公開されました。 現在、フォーラムでは様々なバージョンが公開されています。Ninja, PRT, GraphAT (see attached documents)などです。 が、GrapATのバージョンは問題ないようです。 このコードのMql4翻訳版を作っていただけないでしょうか、誰もが気に入ると思います。 必要であれば、ご自由に改造してください。 ありがとうございました。 デビンチ **************************************************************** //======================= // Mogalef Bands - GrapAT //======================= //1---- Weighted prices "Mogalef" // CP(0)=(High+Low+Open+2*Close)/5 //2---- linear regression Weighted prices P1 periods // If RangHisto>=P1 Then somx = 0 somy = 0 somxx = 0 somxy = 0 For P1 Prices somx = somx+RangPour somy = somy+CP somxx = somxx+RangPour*RangPour somxy = somxy+RangPour*CP EndFor a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx) b = (somy-a*somx)/P1 MogRegLin = b + a*P1 EndIf //3---Standard deviation of linear regression on P2 periods // If RangHisto>= P1+P2-1 Then StanDev(0)=StandarDeviation(MogRegLin,P2) EndIf //4---- "Mogalef" Bands // If RangHisto>=P1+P2 Then If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands Then StanDev=StanDev(1) MogM=MogM(1) MogH=MogH(1) MogB=MogB(1) IfNot // shift/lag when computing new band values MogM=MogRegLin MogH=MogRegLin+P3*StanDev MogB=MogRegLin-P3*StanDev EndIf EndIf //end of code ************************************************************************** other version: {********************************************************* Mogalef Bands easy language Multicharts **********************************************************} variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0); var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0); var1 = StandardDev(var0,7,1); if currentbar=8 then begin HighBand = var0 + 2*var1; LowBand = var0 - 2*var1; Mediane = var0; end else if var0 HighBand then begin HighBand = var0 + 2*var1; LowBand = var0 - 2*var1; Mediane = var0; end; Plot1(HighBand,"HighBand"); Plot2(LowBand,"LowBand"); Plot3(Mediane,"Mediane"); ********************************************************* other version: ************************** Mogalef Bands Ninja trader ************************** #region Using declarations using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Gui.Chart; #endregion // This namespace holds all indicators and is required. Do not change it. namespace NinjaTrader.Indicator { /// /// Enter the description of your new custom indicator here /// [Description("Enter the description of your new custom indicator here")] public class MogalefBands : Indicator { #region Variables // Wizard generated variables // User defined variables (add any user defined variables below) private DataSeries CPSerie, ESerie, FSerie; private double nMedian = 0, nHigh = 0, nLow = 0; private int LinRegPeriode = 3, StdDevPeriode = 7; #endregion /// /// This method is used to configure the indicator and is called once before any bar data is loaded. /// protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian")); Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh")); Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow")); Overlay = true; CPSerie = new DataSeries( this ); ESerie = new DataSeries( this ); FSerie = new DataSeries( this ); } /// /// Called on each bar update event (incoming tick) /// protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. if (CurrentBar < 8) { CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5); nMedian = CPSerie[0]; nHigh = 0; nLow = 0; return; } CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5); if (CurrentBar > 8 + StdDevPeriode) { FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]); ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]); } else { FSerie.Set(CPSerie[0]); ESerie.Set(0); } if (FSerie[0] nHigh) { nMedian = FSerie[0]; nHigh = nMedian + (2*ESerie[0]); nLow = nMedian - (2*ESerie[0]); } MMedian.Set(nMedian); MHigh.Set(nHigh); MLow.Set(nLow); } #region Properties // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MMedian { get { return Values[0]; } } // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MHigh { get { return Values[1]; } } // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MLow { get { return Values[2]; } } [Description("")] [Category("Parameters")] [Gui.Design.DisplayName("LinReg periode")] public int LinRegPERIODE { get { return LinRegPeriode; } set { LinRegPeriode = Math.Max(1, value); } } [Description("")] [Category("Parameters")] [Gui.Design.DisplayName("StdDev periode")] public int StdDevPERIODE { get { return StdDevPeriode; } set { StdDevPeriode = Math.Max(1, value); } } #endregion } } ****************************************************************** ****************************************************************** ファイル: example1.png 37 kb Elite indicators :) T3 T3 Mladen Rakic 2011.10.04 04:58 #3826 デビンチ 彼らが使っているデフォルトのパラメータを 使い、彼らが使っている価格(メタトレーダーには存在しない (High+Low+Open+2*Close)/5) を追加しました。BandsPrice パラメータで8を使ってその価格を取得します。 PS: あなたの投稿を編集したのは、「視覚的に短く」するためです。他には何も変更していません。気にしないでください。 よろしくお願いします。 Mladen devinci: Mladenです。 モガレフバンドという新しいインジケータの要望です。このコードは今年の5月にトレーダーズミーティングで公開されました。現在、フォーラムでは様々なバージョンが公開されています。Ninja, PRT, GraphAT (see attached documents)などです。が、GrapATのバージョンは問題ないようです。このコードのMql4翻訳版を作っていただけないでしょうか、誰もが気に入ると思います。必要であれば、ご自由に改造してください。ありがとうございました。デビンチ**************************************************************** //======================= // Mogalef Bands - GrapAT //======================= //1---- Weighted prices "Mogalef" // CP(0)=(High+Low+Open+2*Close)/5 //2---- linear regression Weighted prices P1 periods // If RangHisto>=P1 Then somx = 0 somy = 0 somxx = 0 somxy = 0 For P1 Prices somx = somx+RangPour somy = somy+CP somxx = somxx+RangPour*RangPour somxy = somxy+RangPour*CP EndFor a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx) b = (somy-a*somx)/P1 MogRegLin = b + a*P1 EndIf //3---Standard deviation of linear regression on P2 periods // If RangHisto>= P1+P2-1 Then StanDev(0)=StandarDeviation(MogRegLin,P2) EndIf //4---- "Mogalef" Bands // If RangHisto>=P1+P2 Then If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands Then StanDev=StanDev(1) MogM=MogM(1) MogH=MogH(1) MogB=MogB(1) IfNot // shift/lag when computing new band values MogM=MogRegLin MogH=MogRegLin+P3*StanDev MogB=MogRegLin-P3*StanDev EndIf EndIf //end of code ************************************************************************** other version: {********************************************************* Mogalef Bands easy language Multicharts **********************************************************} variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0); var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0); var1 = StandardDev(var0,7,1); if currentbar=8 then begin HighBand = var0 + 2*var1; LowBand = var0 - 2*var1; Mediane = var0; end else if var0 HighBand then begin HighBand = var0 + 2*var1; LowBand = var0 - 2*var1; Mediane = var0; end; Plot1(HighBand,"HighBand"); Plot2(LowBand,"LowBand"); Plot3(Mediane,"Mediane"); ********************************************************* other version: ************************** Mogalef Bands Ninja trader ************************** #region Using declarations using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Gui.Chart; #endregion // This namespace holds all indicators and is required. Do not change it. namespace NinjaTrader.Indicator { /// /// Enter the description of your new custom indicator here /// [Description("Enter the description of your new custom indicator here")] public class MogalefBands : Indicator { #region Variables // Wizard generated variables // User defined variables (add any user defined variables below) private DataSeries CPSerie, ESerie, FSerie; private double nMedian = 0, nHigh = 0, nLow = 0; private int LinRegPeriode = 3, StdDevPeriode = 7; #endregion /// /// This method is used to configure the indicator and is called once before any bar data is loaded. /// protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian")); Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh")); Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow")); Overlay = true; CPSerie = new DataSeries( this ); ESerie = new DataSeries( this ); FSerie = new DataSeries( this ); } /// /// Called on each bar update event (incoming tick) /// protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. if (CurrentBar < 8) { CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5); nMedian = CPSerie[0]; nHigh = 0; nLow = 0; return; } CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5); if (CurrentBar > 8 + StdDevPeriode) { FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]); ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]); } else { FSerie.Set(CPSerie[0]); ESerie.Set(0); } if (FSerie[0] nHigh) { nMedian = FSerie[0]; nHigh = nMedian + (2*ESerie[0]); nLow = nMedian - (2*ESerie[0]); } MMedian.Set(nMedian); MHigh.Set(nHigh); MLow.Set(nLow); } #region Properties // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MMedian { get { return Values[0]; } } // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MHigh { get { return Values[1]; } } // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries MLow { get { return Values[2]; } } [Description("")] [Category("Parameters")] [Gui.Design.DisplayName("LinReg periode")] public int LinRegPERIODE { get { return LinRegPeriode; } set { LinRegPeriode = Math.Max(1, value); } } [Description("")] [Category("Parameters")] [Gui.Design.DisplayName("StdDev periode")] public int StdDevPERIODE { get { return StdDevPeriode; } set { StdDevPeriode = Math.Max(1, value); } } #endregion } } ****************************************************************** ****************************************************************** ファイル: mogalef_bands.mq4 5 kb linr_bands.gif 19 kb forexts2 2011.10.04 10:32 #3827 モガレフバンド Mladenです。 ありがとうございます、これは完璧です 良い一日をお過ごしください。 デビンチ barbaron 2011.10.04 16:06 #3828 そして今、可能であればヒストーをお願いします こんにちは、ムラデンです。 あなたは別の時間枠で2 QQE高度からあなたが前に単純なQQE(赤、緑、灰色のバー)で作られた同じヒストグラムを作ることができます。 事前にありがとうございます。 barbaron 2011.10.05 04:58 #3829 モガレフ・バンド ところで、Mogalef Bandsの素敵な説明と使い方はこちら http://www.whselfinvest.com/en/trading_strategies_26_Mogalef_Bands.phpお楽しみに。 barbaron 2011.10.05 05:43 #3830 いつものように もうすでに何千もの感謝に包まれていると思いますが、もう一つ。ありがとうございます。 1...376377378379380381382383384385386387388389390...1108 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
Mladenさん、こんにちは。
ありがとうございます
TepeFinans
こちらです。![](https://c.mql5.com/forextsd/smiles/smile.png)
メタトレーダーが提供する「デフォルト」のインディケータを使用したのではなく、値とシグナルの平滑化の期間を変えることができるバージョンを使用しています。数値とシグナルの両方で使用されているスムージングは、三角移動平均(中央値ではなく「通常の」三角移動平均なので、再計算は一切ありません)で、デフォルトでは内蔵インジケータと同じに設定されていますが、異なるスムージング長さを実験することもできます。
シンプルなインジケータと、mtf、アラート、ダイバージェンスラインを含むバージョンを添付しています。シンプルなバージョンを添付することで、デフォルトのビルトイン・インディケーターと単純に比較できるようにするため。また、ダイバージェンスを探す場合、rviのスムージングをOFF(スムージング期間を1に設定)にすると、「生のrvi」値のラグが最小限になり、スムージングモードよりもピークの識別がより正確になるので、良いアイデアかもしれません。しかし、それは「生のrvi」であり、rviではないことに注意してください(ここに、通常のrvi(上)と「生のrvi」(下)のダイバージェンスの比較があります - ダイバージェンスに関する限り、生の方がより正確に仕事をし、この方法で「汎用」バージョンが少し便利になります
よろしくお願いします。
ムラデンQQEアドバンスド
すでに便利なインジケータを もう少し便利にする試みです。![](https://c.mql5.com/forextsd/smiles/smile.png)
QQEに追加されたもの:計算で使用する前に価格を選択しスムージング(フィルター)すること、メタトレーダー内蔵のrsi以外を使用すること。メタトレーダー内蔵のrsiは、オリジナルのWelles Wilderのrsiとは異なり、QQEの計算で使用するデフォルトのrsiタイプをWilderのrsiに設定することにした理由は1つだけではありません。例によって、rsiのメソッドは
Mladen, ご要望をお聞かせください
親愛なるMladen。
qqeのインジケータをカラーバーに変換していただけませんか?前作のように。
ありがとうございます。![](https://c.mql5.com/forextsd/smiles/smile.png)
Yours,
khaliddxd
TepeFinans
はい、どうぞ。![](https://c.mql5.com/forextsd/smiles/smile.png)
メタトレーダーが提供する "デフォルト "のインディケータを使用したのではなく、値とシグナルの平滑化の期間を変えることができるバージョンを使用しています。数値とシグナルの両方で使用されているスムージングは、三角移動平均(中央値ではなく「通常の」三角移動平均なので、再計算は一切ありません)で、デフォルトでは内蔵インジケータと同じに設定されていますが、異なるスムージング長さを実験することもできます。
シンプルなインジケータと、mtf、アラート、ダイバージェンスラインを含むバージョンを添付しています。シンプルなバージョンを添付することで、デフォルトのビルトイン・インディケーターと単純に比較できるようにするため。また、ダイバージェンスを探す場合、rviのスムージングをOFF(スムージング期間を1に設定)にすると、「生のrvi」値のラグが最小限になり、スムージングモードよりもピークの識別がより正確になるので、良いアイデアかもしれません。しかし、それは「生のrvi」であり、rviではないことに注意してください(ここに、通常のrvi(上)と「生のrvi」(下)のダイバージェンスの比較があります - ダイバージェンスに関する限り、生の方がより正確に仕事をし、この方法で「汎用」バージョンが少し便利になります
よろしくお願いします。
ムラデン矢印をお願いします。(Mladenの新しいQQEのための同じをお願いします)
別の新しいインディのリクエスト
Mladenです。
モガレフバンドという新しいインジケーターの リクエストです。
このコードは今年の5月にトレーダーズミーティングで公開されました。
現在、フォーラムでは様々なバージョンが公開されています。Ninja, PRT, GraphAT (see attached documents)などです。
が、GrapATのバージョンは問題ないようです。
このコードのMql4翻訳版を作っていただけないでしょうか、誰もが気に入ると思います。
必要であれば、ご自由に改造してください。
ありがとうございました。
デビンチ
//=======================
// Mogalef Bands - GrapAT
//=======================
//1---- Weighted prices "Mogalef"
//
CP(0)=(High+Low+Open+2*Close)/5
//2---- linear regression Weighted prices P1 periods
//
If RangHisto>=P1 Then
somx = 0
somy = 0
somxx = 0
somxy = 0
For P1 Prices
somx = somx+RangPour
somy = somy+CP
somxx = somxx+RangPour*RangPour
somxy = somxy+RangPour*CP
EndFor
a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx)
b = (somy-a*somx)/P1
MogRegLin = b + a*P1
EndIf
//3---Standard deviation of linear regression on P2 periods
//
If RangHisto>= P1+P2-1 Then
StanDev(0)=StandarDeviation(MogRegLin,P2)
EndIf
//4---- "Mogalef" Bands
//
If RangHisto>=P1+P2 Then
If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands
Then
StanDev=StanDev(1)
MogM=MogM(1)
MogH=MogH(1)
MogB=MogB(1)
IfNot // shift/lag when computing new band values
MogM=MogRegLin
MogH=MogRegLin+P3*StanDev
MogB=MogRegLin-P3*StanDev
EndIf
EndIf
//end of code
**************************************************************************
other version:
{*********************************************************
Mogalef Bands easy language Multicharts
**********************************************************}
variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0);
var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0);
var1 = StandardDev(var0,7,1);
if currentbar=8 then
begin
HighBand = var0 + 2*var1;
LowBand = var0 - 2*var1;
Mediane = var0;
end
else
if var0 HighBand then
begin
HighBand = var0 + 2*var1;
LowBand = var0 - 2*var1;
Mediane = var0;
end;
Plot1(HighBand,"HighBand");
Plot2(LowBand,"LowBand");
Plot3(Mediane,"Mediane");
*********************************************************
other version:
**************************
Mogalef Bands Ninja trader
**************************
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
///
/// Enter the description of your new custom indicator here
///
[Description("Enter the description of your new custom indicator here")]
public class MogalefBands : Indicator
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
private DataSeries CPSerie, ESerie, FSerie;
private double nMedian = 0, nHigh = 0, nLow = 0;
private int LinRegPeriode = 3, StdDevPeriode = 7;
#endregion
///
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian"));
Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh"));
Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow"));
Overlay = true;
CPSerie = new DataSeries( this );
ESerie = new DataSeries( this );
FSerie = new DataSeries( this );
}
///
/// Called on each bar update event (incoming tick)
///
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (CurrentBar < 8)
{
CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);
nMedian = CPSerie[0];
nHigh = 0;
nLow = 0;
return;
}
CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);
if (CurrentBar > 8 + StdDevPeriode)
{
FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]);
ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]);
}
else
{
FSerie.Set(CPSerie[0]);
ESerie.Set(0);
}
if (FSerie[0] nHigh)
{
nMedian = FSerie[0];
nHigh = nMedian + (2*ESerie[0]);
nLow = nMedian - (2*ESerie[0]);
}
MMedian.Set(nMedian);
MHigh.Set(nHigh);
MLow.Set(nLow);
}
#region Properties
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MMedian
{
get { return Values[0]; }
}
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MHigh
{
get { return Values[1]; }
}
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MLow
{
get { return Values[2]; }
}
[Description("")]
[Category("Parameters")]
[Gui.Design.DisplayName("LinReg periode")]
public int LinRegPERIODE
{
get { return LinRegPeriode; }
set { LinRegPeriode = Math.Max(1, value); }
}
[Description("")]
[Category("Parameters")]
[Gui.Design.DisplayName("StdDev periode")]
public int StdDevPERIODE
{
get { return StdDevPeriode; }
set { StdDevPeriode = Math.Max(1, value); }
}
#endregion
}
}
******************************************************************
******************************************************************デビンチ
PS: あなたの投稿を編集したのは、「視覚的に短く」するためです。他には何も変更していません。気にしないでください。
よろしくお願いします。
Mladen
Mladenです。
モガレフバンドという新しいインジケータの要望です。
このコードは今年の5月にトレーダーズミーティングで公開されました。
現在、フォーラムでは様々なバージョンが公開されています。Ninja, PRT, GraphAT (see attached documents)などです。
が、GrapATのバージョンは問題ないようです。
このコードのMql4翻訳版を作っていただけないでしょうか、誰もが気に入ると思います。
必要であれば、ご自由に改造してください。
ありがとうございました。
デビンチ
//=======================
// Mogalef Bands - GrapAT
//=======================
//1---- Weighted prices "Mogalef"
//
CP(0)=(High+Low+Open+2*Close)/5
//2---- linear regression Weighted prices P1 periods
//
If RangHisto>=P1 Then
somx = 0
somy = 0
somxx = 0
somxy = 0
For P1 Prices
somx = somx+RangPour
somy = somy+CP
somxx = somxx+RangPour*RangPour
somxy = somxy+RangPour*CP
EndFor
a = (P1*somxy-somx*somy)/(P1*somxx-somx*somx)
b = (somy-a*somx)/P1
MogRegLin = b + a*P1
EndIf
//3---Standard deviation of linear regression on P2 periods
//
If RangHisto>= P1+P2-1 Then
StanDev(0)=StandarDeviation(MogRegLin,P2)
EndIf
//4---- "Mogalef" Bands
//
If RangHisto>=P1+P2 Then
If MogRegLinMogB(1) // NO LAG if Lin Reg is within inside bands
Then
StanDev=StanDev(1)
MogM=MogM(1)
MogH=MogH(1)
MogB=MogB(1)
IfNot // shift/lag when computing new band values
MogM=MogRegLin
MogH=MogRegLin+P3*StanDev
MogB=MogRegLin-P3*StanDev
EndIf
EndIf
//end of code
**************************************************************************
other version:
{*********************************************************
Mogalef Bands easy language Multicharts
**********************************************************}
variables: var0(0), var1(0), HighBand(0), LowBand(0), Mediane(0);
var0 = LinearRegValue((Open+High+Low+(2*Close))/5,3,0);
var1 = StandardDev(var0,7,1);
if currentbar=8 then
begin
HighBand = var0 + 2*var1;
LowBand = var0 - 2*var1;
Mediane = var0;
end
else
if var0 HighBand then
begin
HighBand = var0 + 2*var1;
LowBand = var0 - 2*var1;
Mediane = var0;
end;
Plot1(HighBand,"HighBand");
Plot2(LowBand,"LowBand");
Plot3(Mediane,"Mediane");
*********************************************************
other version:
**************************
Mogalef Bands Ninja trader
**************************
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
///
/// Enter the description of your new custom indicator here
///
[Description("Enter the description of your new custom indicator here")]
public class MogalefBands : Indicator
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
private DataSeries CPSerie, ESerie, FSerie;
private double nMedian = 0, nHigh = 0, nLow = 0;
private int LinRegPeriode = 3, StdDevPeriode = 7;
#endregion
///
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "MMedian"));
Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MHigh"));
Add(new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "MLow"));
Overlay = true;
CPSerie = new DataSeries( this );
ESerie = new DataSeries( this );
FSerie = new DataSeries( this );
}
///
/// Called on each bar update event (incoming tick)
///
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (CurrentBar < 8)
{
CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);
nMedian = CPSerie[0];
nHigh = 0;
nLow = 0;
return;
}
CPSerie.Set((Open[0] + High[0] + Low[0] + (2*Close[0]))/5);
if (CurrentBar > 8 + StdDevPeriode)
{
FSerie.Set(LinReg(CPSerie,LinRegPeriode)[0]);
ESerie.Set(StdDev(FSerie,StdDevPeriode)[0]);
}
else
{
FSerie.Set(CPSerie[0]);
ESerie.Set(0);
}
if (FSerie[0] nHigh)
{
nMedian = FSerie[0];
nHigh = nMedian + (2*ESerie[0]);
nLow = nMedian - (2*ESerie[0]);
}
MMedian.Set(nMedian);
MHigh.Set(nHigh);
MLow.Set(nLow);
}
#region Properties
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MMedian
{
get { return Values[0]; }
}
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MHigh
{
get { return Values[1]; }
}
// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries MLow
{
get { return Values[2]; }
}
[Description("")]
[Category("Parameters")]
[Gui.Design.DisplayName("LinReg periode")]
public int LinRegPERIODE
{
get { return LinRegPeriode; }
set { LinRegPeriode = Math.Max(1, value); }
}
[Description("")]
[Category("Parameters")]
[Gui.Design.DisplayName("StdDev periode")]
public int StdDevPERIODE
{
get { return StdDevPeriode; }
set { StdDevPeriode = Math.Max(1, value); }
}
#endregion
}
}
******************************************************************
******************************************************************モガレフバンド
Mladenです。
ありがとうございます、これは完璧です
良い一日をお過ごしください。
デビンチ
そして今、可能であればヒストーをお願いします
こんにちは、ムラデンです。
あなたは別の時間枠で2 QQE高度からあなたが前に単純なQQE(赤、緑、灰色のバー)で作られた同じヒストグラムを作ることができます。
事前にありがとうございます。![](https://c.mql5.com/forextsd/smiles/regular_smile.png)
モガレフ・バンド
ところで、Mogalef Bandsの素敵な説明と使い方はこちら http://www.whselfinvest.com/en/trading_strategies_26_Mogalef_Bands.phpお楽しみに。
いつものように
もうすでに何千もの感謝に包まれていると思いますが、もう一つ。ありがとうございます。![](https://c.mql5.com/forextsd/smiles/regular_smile.png)