*

Trend Intensity Index という指標

公開日: : 最終更新日:2015/02/24 マネー

Schaff Trend Cycle について調べていたら、似たような指標 Trend Intensity Index について書かれたブログを見つけました。

Trend Intensity IndexにAlert をつける。

早速、インディケーターの TII_RLH.mq4 をダウンロードさせていただき、自前の EA に組み込んでみました。

バックテストを行うと、これが過去最高の成績に。

USDJPY 1時間足 2014/1/1~2015/1/1

なんと、プロフィットファクター 2.97!

勝率も44%となかなかいい。

ドローダウンも低めで安心感があります。

ちょっと改良しがいがありそうです。

GBPJPY H4 も成績がいいです。

GBPJPY H4 2014/1/1-2015/1/1

Minor_period =7, Major_period = 20 に変更しています。

プロフィットファクター 3.06投資資金 3.8倍は魅力的。

 

 

しめしめと思ったら落とし穴が・・・

関連記事

プログラムソース(重大なバグあり使用不可)

//
//    yasciiTII01
//         動作にはTII_RLH.mq4 が必要

//マジックナンバーの定義
#define MAGIC  42235        

//パラメーターの設定//
extern double Lots = 1.0;     //取引ロット数
extern int Slip = 10;         //許容スリッページ数
extern string Comments =  "TII01"; //コメント

extern int Major_Period=18;
extern int Minor_Period=12;
int Major_MaMode=1; //0=sma, 1=ema, 2=smma, 3=lwma, 4=lsma
extern int Major_PriceMode=0;//0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4
color LevelColor=Silver;
extern int BuyLevel=35;
int MidLevel=50;
extern int SellLevel=75;

extern int Fast_period = 14 ;
extern double margin = 0.0 ;

extern double ILC = 100.0 ;
// extern double TP = 1100 ;

//変数の設定//
int Ticket_L = 0; //買い注文の結果をキャッチする変数
int Ticket_S = 0; //売り注文の結果をキャッチする変数
int Exit_L = 0;   //買いポジションの決済注文の結果をキャッチする変数
int Exit_S = 0;   //売りポジションの決済注文の結果をキャッチする変数
int OS1 ;
int OS2 ;
double   OOPL;
double   OOPS;

int start(){

    //暴落対策(始め)

   double FastHH1 = Close[iHighest(NULL, 0, MODE_CLOSE, Fast_period, 1)];
   double FastLL1 = Close[iLowest(NULL, 0, MODE_CLOSE, Fast_period, 1)];

   //買いポジションのエグジット
   OS1 = OrderSelect(Ticket_L, SELECT_BY_TICKET);  
   if( Bid < FastLL1-margin 
       && ( Ticket_L != 0 && Ticket_L != -1 ))
    {     
      Exit_L = OrderClose(Ticket_L,Lots,Bid,Slip,Red);
      if( Exit_L ==1 ) {Ticket_L = 0;}
    }    

   //売りポジションのエグジット
   OS2 = OrderSelect(Ticket_S, SELECT_BY_TICKET); 
   if( Ask> FastHH1+margin
       && ( Ticket_S != 0 && Ticket_S != -1 ))
    {     
      Exit_S = OrderClose(Ticket_S,Lots,Ask,Slip,Blue);
      if( Exit_S ==1 ) {Ticket_S = 0;} 
    }   

   //暴落対策(終わり)

    if (Volume[0]>1 || IsTradeAllowed() == false) return(0) ;

       double tii1 = iCustom(NULL, 0,"TII_RLH", Major_Period, Major_MaMode, Major_PriceMode, Minor_Period, LevelColor , BuyLevel, MidLevel , SellLevel, 0 , 1);
       double tii2 = iCustom(NULL, 0,"TII_RLH", Major_Period, Major_MaMode, Major_PriceMode, Minor_Period, LevelColor , BuyLevel, MidLevel , SellLevel, 0 , 2);
       double tii3 = iCustom(NULL, 0,"TII_RLH", Major_Period, Major_MaMode, Major_PriceMode, Minor_Period, LevelColor , BuyLevel, MidLevel , SellLevel, 0 , 3);       
       double tii4 = iCustom(NULL, 0,"TII_RLH", Major_Period, Major_MaMode, Major_PriceMode, Minor_Period, LevelColor , BuyLevel, MidLevel , SellLevel, 0 , 4);   
       double tiiSM1 = (tii1+tii2+tii3) / 3.0 ;
       double tiiSM2 = (tii4+tii2+tii3) / 3.0 ;

   double lc = ILC;
   if(( Digits ==3 ) ||(Digits ==5)) lc = lc*10.0 ;

   //買いポジションのエグジット
    OS1 = OrderSelect(Ticket_L, SELECT_BY_TICKET);  
    OOPL = OrderOpenPrice();
    if(    ((tii1 < SellLevel && tii2 > SellLevel) || ( OOPL - lc*Point >= Close[1] ) ) //|| ( OOPL+TP <= Close[1] ))
            && ( Ticket_L != 0 && Ticket_L != -1 ))
    {     
      Exit_L = OrderClose(Ticket_L,Lots,Bid,Slip,Red);
      if( Exit_L ==1 ) {Ticket_L = 0;}
    }    

   //売りポジションのエグジット
    OS2 = OrderSelect(Ticket_S, SELECT_BY_TICKET); 
    OOPS = OrderOpenPrice();
    if(    ((tii1 > BuyLevel && tii2 < BuyLevel )||( OOPS + lc*Point <= Close[1] ) ) //|| ( OrderOpenPrice()-TP >= Close[1] ))
          && ( Ticket_S != 0 && Ticket_S != -1 ))
    {     
      Exit_S = OrderClose(Ticket_S,Lots,Ask,Slip,Blue);
      if( Exit_S ==1 ) {Ticket_S = 0;} 
    }   

   //買いエントリー
   if( ((tii1 > BuyLevel && tii2 < BuyLevel) || (tii1 > tiiSM1 && tii2 < tiiSM2) )
       && ( Ticket_L == 0 || Ticket_L == -1 ) 
       && ( Ticket_S == 0 || Ticket_S == -1 ))
    {  
      Ticket_L = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slip,0,0,Comments,MAGIC,0,Red);
    }

   //売りエントリー
   if(( (tii1 < SellLevel && tii2 > SellLevel) || (tii1 < tiiSM1 && tii2 > tiiSM2))
       && ( Ticket_S == 0 || Ticket_S == -1 )
       && ( Ticket_L == 0 || Ticket_L == -1 ))
    {   
      Ticket_S = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slip,0,0,Comments,MAGIC,0,Blue);     
    } 

   return(0);

  }

 

###

関連記事

ふるさと納税6回目 / 柑橘類 室戸市(2)

「ふるさと納税6回目 / 柑橘類 室戸市 」で 10000円納税した室戸市より柑橘類の詰め合わせ

記事を読む

早起きは5pipsの得

iCustom(アイカスタム)で変幻自在のメタトレーダー (Modern Alc

記事を読む

2023-07-24 投資メモ

前回の記事「2023-06-27 投資メモ」から約1ヶ月。 楽天証券の分ですが、現在の資産は以

記事を読む

【FX】IS Lime という EA

IS シリーズの EA は IS Black, IS White, IS Red とデモトレードで検

記事を読む

【FX】ボリンジャーバンド順張り手法

逆張りで使う人が多いボリンジャーバンドですが、開発者のボリンジャーさんは順張りで使えとおっしゃってい

記事を読む

医療費39兆2千億円 過去最高

医療費高騰 厚生労働省は8日、2012年度に病気やけがの治療で全国の医療機関に支払われた医

記事を読む

ネクスト・ジェネレーションと世界のベスト 5月の配当

毎月配当の超高配当投資信託の「ネクスト・ジェネレーション」と「世界のベスト」の 5月の配当は、

記事を読む

超シンプルな自動売買プログラム(11) 前週の平均値と逆張り(2) 曜日属性

以前の記事「超シンプルな自動売買プログラム(11) 前週の平均値と逆張り」ですが、月曜日に買って

記事を読む

世界のベスト

「世界のベスト」といういかにもバクダンっぽい愛称の投資信託があります。 こういうものはたいていカス

記事を読む

ようやく米国株下落の終焉?

昨夜 2023/11/3 の米雇用統計の発表で、今年中の利上げはまずなくなりそうだという見込みが強く

記事を読む

Message

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Gemini で知識をまとめたウェブページを簡単につくる

どういう風に AI を使うか、人によって違います。 ちょこまか調

Meta という Meta の AI

Meta(旧名:Facebook)社の Meta という AI を試用

昆虫由来の食用色素

博物学が好きな人はご存じかもしれませんが、西洋ではコチニールカイガラム

Antigravity で遊ぶ

数日前から Google の AI エージント Antigravity

AXI Select のエッジスコアがついに 70に

一昨日、「プロップファームの AXI Select の なかなか上がら

→もっと見る

  • アクセスカウンター
PAGE TOP ↑