Damiani フィルタ(関数版:MetaTrader4用)のソース
公開日:
:
最終更新日:2015/01/11
マネー
公開されているインディケーター Damiani_volatmeter のソースより抜き出して、私が関数版に書き直したものがこちらです。
ご自分の EA にお使いください。
戻り値はトレンド相場のとき1、レンジ相場のとき0です。
//+------------------------------------------------------------------+ // Damiani volatmeter 関数版 終値を使用 // // 戻り値はトレンド相場のとき1、レンジ相場のとき0 //+------------------------------------------------------------------+ //---- input parameters extern int Viscosity=13; extern int Sedimentation=50; extern double Threshold_level=1.3; extern bool lag_supressor=true; double lag_s_K=0.5; double s0 = 0; double s1= 0; double s2 = 0; double s3 = 0; double vol=0; double t=Threshold_level; int damiani_f() { double sa=iATR(NULL,0,Viscosity,1) ; double ia = iATR(NULL,0,Sedimentation,1) ; if(lag_supressor){ if (ia == 0) vol = 1.0 ; else vol= sa/ia + lag_s_K*(s1-s3) ; }else{ if (ia == 0) vol = 1.0 ; else vol= sa/ia ; } double anti_thres=iStdDev(NULL,0,Viscosity,0,MODE_LWMA,PRICE_TYPICAL,1) ; double isd = iStdDev(NULL,0,Sedimentation,0,MODE_LWMA,PRICE_TYPICAL,1) ; if (isd == 0) anti_thres = 1.0 ; else anti_thres = anti_thres/isd ; t=t-anti_thres; s3 = s2; s2 = s1; s1= s0; s0 = vol; if (vol>t){ return(1); }else{ return(0); } }
###
関連記事
-
-
早起きは5pipsの得
iCustom(アイカスタム)で変幻自在のメタトレーダー (Modern Alc
-
-
未来を予測する(?)便利なインジケータ AdamPriceReflection
ドル円15分足[/caption] AdamPriceReflect
-
-
[FX]フィボナッチをレンジ境界に使う自動売買プログラム
「フィボナッチをレンジ境界に使う自動売買プログラム」の意味がわからない? フィボナッチ・リトレ
-
-
ほったらかしでも月100万円儲かるFX自動売買 (2)
ほったらかしでも月100万円儲かるFX自動売買 posted with ama
-
-
VQ を使った自動売買ソフト
昔一世を風靡したインディケーターに VQ があります。 最近なぜか人気は下火になっていますが、
-
-
金持ち父さんの考え方
ロバート・キヨサキの「金持ち父さん 貧乏父さん」 ★★★☆☆ ロバート・キヨサキの「金持
-
-
アメリカ株投資 2021-11-19
以前の記事「アメリカ株投資 2021-10-18」の続きです。 今週終わって純益がはじ