エリート指標 :) - ページ 199

 

デジタルフィルタ EA情報

ムラデン、MrTools。

1987から1989で紹介されているDigital Filtersは非常に素晴らしいです。

これを使ったEAを試してみたいのですが、iCustomで値を抽出するための設定方法を教えてください。

Digital Filters on Chart Smoothed - Mode 1 (SATL) and Mode 0 (FATL)がいいかもしれませんね。

EAのロジックは単純で、FATL>SATLで両者の傾きが正なら買い、逆なら売り、FATLの傾き=0ならクローズとします。

ここで傾きを計算するのに最適な方法について、何かお勧めがあれば教えてください。

ありがとうございます。

Rex

 
mladen:
レックス

平滑化されていないバージョンのスロープを見つけるには、次のようなものを使うことができます。

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]to find it out in the smoothed version use something like this (additional parameters needed in iCustom() call)

int length = 5;

int phase = 0

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]Both examples are using current (open) bar value. To avoid it change the last parameter from 0 and 1 to 1 and 2. Also, included even unnecessary values calculations (as you can see all the digital filters types are calculated) in order to show how to retreive every value

To compare values of different filters simply compare (for example) if (fatlCurrent>rftlCurrent) or if (fatlCurrent<rftlCurrent) but that just shows their relative values. It does not show if they just crossed one above/bellow the other

______________________

To find crossings of a different filters, it gets a bit more complicated and the best way is to write a new indicator. It is more complicated because it depends how do you treat eventual equal values of two indicators. I prefer to treat them as a trend continuation and not as a possible trend reversal. Attaching an indicator that will show you "trends" (a simple "bigger"/ "smaller" relation) of 2 digital filters. To use it all you need is to check the value that is even not going to be displayed anywhere on chart, like this

[php] int price = PRICE_CLOSE;

int filterType1 = 0; // fatl

int filterType2 = 2; // rftl

int filtersTrendCurrent = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,0); // retrieve value from trend buffer

int filtersTrendPrevious = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,1); //

if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if (filtersTrendCurrent== 1) ....// trend changed to up

if (filtersTrendCurrent==-1) ....// trend changed to down

}

Also, the remark for a opened bar stands for this example too, so change the last parameter to desired value (1 for closed bar, for example) if you do not want to use opened bar signals. The target indicator is the histogram down on the picture (fatl / rftl crosses in this case on a 5 minute chart)
And in the end, you could do something like this :

[php] if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if ( fatlCurrent>fatlPrevious && rftlCurrent>rftlPrevious && filtersTrendCurrent== 1) Buy...

if ( fatlCurrent<fatlPrevious && eftlCurrent<rftlPrevious && filtersTrendCurrent==-1) Sell....

}

//

// the danger is that the slope and the crosses are not going to change in the same

// moment and buying or selling on every bar when slopes are equal would cause an

// EA to "overtrade"

//

しかし、私の意見では、クロスをチェックするだけでも十分で、フィルタリングには他のスロープを使用します(この例では高速デジタルフィルタが使用されていますが、低速デジタルフィルタ(satlまたはrstl)を「スロープ」フィルタリングとして使用することも可能です)。

______________________

PS: EAの場合、値を表示しないインジケータを書くことを考えるかもしれません(その場合、このヒスト版では2つのバッファを節約できます)しかしその場合、コードで何をしているのかを101%確信する必要があります(「視覚的制御」がありません)

よろしくお願いします。

ムラデン

Rexです。

このMladenのデジタルインジケータは、Eaのための非常に良い選択だと言いたいです。特にSTLMスロープを使った古いデジタルバージョンでは、コンピュータに負担がかかっていましたので、これは同等かそれ以上のようです。

ありがとうございました。

ツール

 

ムラデン、ミスターツールズ。

まさに私が望んでいたことです!

これは大きな助けです。

本当にありがとうございます。

Rex

 

レックス

平滑化されていないバージョンのスロープを見つけるには、次のようなものを使用します。

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters - on chart","",filterType,price,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]to find it out in the smoothed version use something like this (additional parameters needed in iCustom() call)

int length = 5;

int phase = 0

int price = PRICE_CLOSE;

int filterType;

filterType = 0;

double fatlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double fatlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 1;

double satlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double satlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 2;

double rftlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rftlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

filterType = 3;

double rstlCurrent = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,0);

double rstlPrevious = iCustom(NULL,0,"Digital filters smoothed - on chart","",filterType,price,length,phase,0,1);

//

//

// slope of any of the values, fatl in this case

//

//

bool slopeUp = false;

bool slopeDown = false;

if (fatlCurrent>fatlPrevious) slopeUp = true;

if (fatlCurrent<fatlPrevious) slopeUp = true;

[/php]Both examples are using current (open) bar value. To avoid it change the last parameter from 0 and 1 to 1 and 2. Also, included even unnecessary values calculations (as you can see all the digital filters types are calculated) in order to show how to retreive every value

To compare values of different filters simply compare (for example) if (fatlCurrent>rftlCurrent) or if (fatlCurrent<rftlCurrent) but that just shows their relative values. It does not show if they just crossed one above/bellow the other

______________________

To find crossings of a different filters, it gets a bit more complicated and the best way is to write a new indicator. It is more complicated because it depends how do you treat eventual equal values of two indicators. I prefer to treat them as a trend continuation and not as a possible trend reversal. Attaching an indicator that will show you "trends" (a simple "bigger"/ "smaller" relation) of 2 digital filters. To use it all you need is to check the value that is even not going to be displayed anywhere on chart, like this

[php] int price = PRICE_CLOSE;

int filterType1 = 0; // fatl

int filterType2 = 2; // rftl

int filtersTrendCurrent = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,0); // retrieve value from trend buffer

int filtersTrendPrevious = iCustom(NULL,0,"Digital filters - on chart trend","",filterType1,FilterType2,price,5,1); //

if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if (filtersTrendCurrent== 1) ....// trend changed to up

if (filtersTrendCurrent==-1) ....// trend changed to down

}

Also, the remark for a opened bar stands for this example too, so change the last parameter to desired value (1 for closed bar, for example) if you do not want to use opened bar signals. The target indicator is the histogram down on the picture (fatl / rftl crosses in this case on a 5 minute chart)
And in the end, you could do something like this :

[php] if (filterTrendCurrent!= filterTrendPrevious) // trend just changed

{

if ( fatlCurrent>fatlPrevious && rftlCurrent>rftlPrevious && filtersTrendCurrent== 1) Buy...

if ( fatlCurrent<fatlPrevious && eftlCurrent<rftlPrevious && filtersTrendCurrent==-1) Sell....

}

//

// the danger is that the slope and the crosses are not going to change in the same

// moment and buying or selling on every bar when slopes are equal would cause an

// EA to "overtrade"

//

しかし、私の意見では、クロスをチェックするだけでも十分で、フィルタリングには他のスロープを使用します(この例では高速デジタルフィルタが使用されていますが、低速デジタルフィルタ(satlまたはrstl)を「スロープ」フィルタリングとして使用することも可能です)。

______________________

PS: EAに関して言えば、値を表示しないインジケータを書くことも考えられるかもしれません(その場合、このHistoバージョンでは2つのバッファを節約できます)しかしその場合、コードで何をしているのかを101%確信する必要があります(「視覚制御」なし)

______________________

PPS: 正しい "digital filters - on chart trends" インジケータは、この投稿にありますhttps://www.mql5.com/en/forum/general

よろしくお願いします。

Mladen

rdoane:
ムラデン、MrTools,

1987から#1989で示されたDigital Filtersは非常に印象的です。

これを使ったEAを試してみたいのですが、iCustomで値を抽出するための設定方法を教えてください。

Digital Filters on Chart Smoothed - Mode 1 (SATL) and Mode 0 (FATL)がいいかもしれませんね。

EAのロジックは単純で、FATL>SATLで両者の傾きが正なら買い、逆なら売り、FATLの傾き=0ならクローズとします。

ここで傾きを計算するのに最適な方法について、何かお勧めがあれば教えてください。

ありがとうございます。

レックス
ファイル:
 

当初この投稿 :https://www.mql5.com/en/forum/general に掲載した「デジタルフィルター - チャートのトレンドについて」の中で、1つ誤りがありました。こちらは訂正したものですので、こちらをご利用ください。

よろしくお願いします。

ムラデン

 

ムラデンです。

このインジケーターにノンリペイントカラーリングとmtfオプションを追加していただけないでしょうか?

ファイル:
rsi_ma.mq4  4 kb
 

Pc-ブレイクアウト

ムラデンです。

仮想プライベートサーバで EAを使用しています。チケット番号にマウスを乗せると「PC-Breakout」と表示されることがあります。

これはどういう意味でしょうか?接続が切れたのでしょうか、それともサーバーを再起動したのでしょうか?

ありがとうございます。

よろしくお願いします。

 
casaliss:
こんにちは、mladenさん

現在のチャートにゼロラインクロス矢印を追加してください。

ありがとうございます。

こんにちは、Mladen

1997年の投稿

ありがとうございます。

 

Tradefx1

私の推測では、EAが注文に付けているコメントだと思います(注文のリストで右クリックしたときに「コメント」もチェックしてみて、コメントが表示されているポップアップテキストに対応しているかどうか確認してください)。

よろしくお願いします。

ムラデン

Tradefx1:
ムラデン

仮想プライベートサーバーでEAを使用しています。チケット番号にマウスを乗せると "PC-Breakout "と表示されることがあります。

これは何を意味するのでしょうか?接続が切れたのでしょうか、それともサーバーを再起動したのでしょうか?

ありがとうございます。

よろしくお願いします。
 

ビディック

これです
PS: "mtf "の部分を見落としていました。mtfバージョンも添付します。

よろしく

ムラデン

biddick:
Mladen, このインジケーターにノンリペイントカラーリングとmtfオプションを追加することはできますか?
ファイル: