以前にリリースしたEAと同じものですが、今回はRSIとモメンタムのパラメータを設定できる追加コードが加わりました。たとえば、RSIの買い制限を70に設定すると、RSIが70を超える場合には買いの保留注文は行われません。
コードの修正はシンプルで、プログラミングの知識が限られている方でも、好きなインジケーターに変更できるほど簡単です。以下に新しい行を示します。
extern int RSI_Period = 14;
extern int RSI_Buy_Restrict = 1.;
extern int RSI_Sell_Restrict = 1.;
extern int Momentum_Period = 14; // 変数の追加行です
extern int Momentum_Buy_Restrict = 1.;
extern int Momentum_Sell_Restrict = 1.;
double d_RSI = iRSI(Symbol(),0,RSI_Period, PRICE_CLOSE, 1);
double d_Momentum=iMomentum(Symbol(),0,Momentum_Period,PRICE_CLOSE,1); // 注文送信の前にこの2行を追加
&& d_Momentum < Momentum_Buy_Restrict && d_RSI < RSI_Buy_Restrict)
&& d_Momentum > Momentum_Sell_Restrict && d_RSI > RSI_Sell_Restrict) // 注文送信時にこの2行を追加
extern int RSI_Buy_Restrict = 1.;
extern int RSI_Sell_Restrict = 1.;
extern int Momentum_Period = 14; // 変数の追加行です
extern int Momentum_Buy_Restrict = 1.;
extern int Momentum_Sell_Restrict = 1.;
double d_RSI = iRSI(Symbol(),0,RSI_Period, PRICE_CLOSE, 1);
double d_Momentum=iMomentum(Symbol(),0,Momentum_Period,PRICE_CLOSE,1); // 注文送信の前にこの2行を追加
&& d_Momentum < Momentum_Buy_Restrict && d_RSI < RSI_Buy_Restrict)
&& d_Momentum > Momentum_Sell_Restrict && d_RSI > RSI_Sell_Restrict) // 注文送信時にこの2行を追加