コーディングのヘルプ - ページ 91

 
k3rn3l:
mladen...エラーを修正できますか?

//+------------------------------------------------------------------+

//| MTF_RSI.mq4 |

//| Copyright © 2006, Keris2112 |

//| |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2006, Keris2112"

#property link "https://www.forex-tsd.com"

//----

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Red

#property indicator_color2 DodgerBlue

#property indicator_color3 White

#property indicator_level1 30

#property indicator_level2 70

#property indicator_minimum 0

#property indicator_maximum 100

//----

extern int TimeFrame=5;

extern int RSIperiod=33;

extern int applied_price=0;

extern int TimeFrame1=15;

extern int RSIperiod1=21;

extern int applied_price1=0;

extern int TimeFrame2=15;

extern int RSIperiod2=14;

extern int applied_price2=0;

//----

double ExtMapBuffer1[];

double ExtMapBuffer2[];

double ExtMapBuffer3[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicator line

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(1,ExtMapBuffer2);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(2,ExtMapBuffer3);

SetIndexStyle(2,DRAW_LINE);

//---- name for DataWindow and indicator subwindow label

switch(TimeFrame)

{

case 1 : string TimeFrameStr="Period_M1"; break;

case 5 : TimeFrameStr="Period_M5"; break;

case 15 : TimeFrameStr="Period_M15"; break;

case 30 : TimeFrameStr="Period_M30"; break;

case 60 : TimeFrameStr="Period_H1"; break;

case 240 : TimeFrameStr="Period_H4"; break;

case 1440 : TimeFrameStr="Period_D1"; break;

case 10080 : TimeFrameStr="Period_W1"; break;

case 43200 : TimeFrameStr="Period_MN1"; break;

default : TimeFrameStr="Current Timeframe";

}

IndicatorShortName("MTF_RSI("+RSIperiod+") ("+TimeFrameStr+")");

}

//----

return(0);

//+------------------------------------------------------------------+

//| MTF RSI |

//+------------------------------------------------------------------+

int start()

{

datetime TimeArray[];

int i,limit,y=0,counted_bars=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

limit=Bars-counted_bars;

for(i=0,y=0;i<limit;i++)

{

if (Time<TimeArray[y]) y++;

//----

ExtMapBuffer1=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y);

}

datetime TimeArray1[];

int ii,limiti,yi=0,counted_bars1=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1);

limiti=Bars-counted_bars1;

for(ii=0,yi=0;ii<limiti;ii++)

{

if (Time<TimeArray1[yi]) yi++;

//----

ExtMapBuffer2=iRSI(NULL,TimeFrame1,RSIperiod1,applied_price1,yi);

}

datetime TimeArray2[];

int iii,limitii,yii=0,counted_bars2=IndicatorCounted();

// Plot defined time frame on to current time frame

ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2);

limitii=Bars-counted_bars2;

for(iii=0,yii=0;iii<limitii;iii++)

{

if (Time<TimeArray2[yii]) yii++;

//----

ExtMapBuffer3=iRSI(NULL,TimeFrame2,RSIperiod2,applied_price2,yii);

}

//----

return(0);

}

//+------------------------------------------------------------------+

添付のものを試してみてください

ファイル:
 

こんにちは、Mladenです。

添付のインジケーターに "velo6 "を追加していただけませんか?

色と "true-false "の入力が必要なのですが...例えば画像を見てください。

いつもありがとうございます.......

ファイル:
euro.gif  32 kb
 

1)トレンドが発生しているときは、ボリンジャーバンドが広がって いく・・・その後、トレンドが止まり、レンジ相場となる。

これは、私のメタストックフォーミュラです...

幅:=。

((Mov(C,71,S)+(2*(Std(C,71))))-(Mov(C,71,S)-(2*(Std(C,71))))

(Mov(C,71,S)-(2*(Std(C,71))))です。)

MEDIA:=Mov(WIDTH,15,S)とする。

ST:=Stoch(5,3)。

TIME:=BarsSince(WIDTH=0 AND)

BarsSince(WIDTH<MEDIA)<=5.BarsSince(WIDTH<MEDIA))とする。

CONDBUY:=ST<=30 OR (Ref(ST<=30,-1) AND H<=Ref(H,-1)));

時刻とCONDBUY

EXPLANATION

1)私はボリンジャーバンド71と偏差値2を使用しています。

2)ボリンジャーバンドの幅に15単純移動平均を適用します。

3) ボリンジャーバンドがSMAを下回るとき、またその後5本のバーがあるとき、それは市場が取引範囲に入ったことを意味します。

4) ストキャスティクスが30を下回ったら、レンジ相場が始まったと判断する。

ファイル:
 
carbonmimetic:
こんにちは、Mladenさん。

添付のインジケータに "velo6 "を追加していただけませんか?

色と "true-false "の入力が必要なのですが...例えば画像を見てください。

いつもありがとうございます......。

カーボンミメティック

はい、どうぞ

ファイル:
 

...さっきも言ったけど...ALWAYS THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

こんにちは、Mladen

お手数ですが、MT4のインジケーターにコードを入れていただけますか?

テストが楽しみです。

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

Kreangast

2013/5/25

 
Kreangast:
こんにちはMladen

お手数ですが、MT4のインジケーターにコードを入れていただけますか?

テストが楽しみです。

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

Kreangast

2013/5/25

申し訳ございません。

私はAmibrokerを使用していないので、そのコードをmetatrader 4に変換し、それが正しいことを100%確認することはできません(そして私はいくつかの間違ったコードの指標の責任を負うことは嫌です)。

 
mladen:
Amibrokerを使用していないので、そのコードをmetatrader 4に変換することはできませんし、それが正しいことを100%確認することはできません(そして、私はいくつかの間違ったコードの指標の責任を負うことは嫌です)。

Mladenさん、こんにちは。

申し訳ありません。AMI 問題が解決されたので。

MT4への置き換えをよろしくお願いします。

"-BarsSince(X)=BarsLate(X)" とします。

_SECTION_BEGIN("pfoot");

TimeFrameSet(inDaily);

TR=Max(Max((High-Low),abs(Ref(Close,-1)-High)),abs(Ref(Close,-1)-Low));

A=H-(TR*0.3);

A1=H-(TR*0.6)となります。

A2=H-(TR*0.8)。

A3=H-(TR*1.0)となります。

//

B= L+(TR*0.3);

B1=L+(TR*0.6)とする。

B2=L+(TR*0.8)とする。

B3=L+(TR*1.0)とする。

//

N=100;

H2=H==HV(H,N);// ・・・・・・・・・・・・。

L2=L==LLV(L,N);//

PPF=Ref(A,-BarsSince(H2));//-BarsSince=BarsLate

PPF1=Ref(A1,-BarsSine(H2));//。

PPF2=Ref(A2,-BarsSine(H2));//。

PPF3=Ref(A3,-BarsSine(H2));//。

//

PPFF=Ref(B,-BarsSince(L2));//です。

PPFF1=Ref(B1,-バーサイン(L2));//

PPFF2=Ref(B2,-BarSince(L2));//。

PPFF3=Ref(B3,-バーサインス(L2));//。

TimeFrameRestore();

// サポートレベルの 雲と線をプロットします。

Plot(TimeFrameExpand(PPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

Plot(TimeFrameExpand(PPF1,inDaily ,expandLast), "R2", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF2,inDaily ,expandLast), "R3", colorGreen,styleThick); Plot(TimeFrameExpand(PPF2,inDaily ,expandedLast), "R3", colorGreen,styleThick);

Plot(TimeFrameExpand(PPF3,inDaily ,expandLast), "R4", colorGreen,styleThick); Plot(TimeFrameExpand(PPF3,inDaily ,expandedLast), "R4", colorGreen,styleThick);

Plot(TimeFrameExpand(PPFF,inDaily ,expandLast), "S1", colorBlue, styleThick);

Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorBlue,styleThick); Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF2,inDaily ,expandLast), "S3", colorBlue,styleThick); Plot(TimeFrameExpand(PPFF2,inDaily ,expandedLast), "S3", colorBlue,styleThick);

Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast), "S4", colorBlue,styleThick); Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast),colorBlue,styleThick);

_section_end()です。

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

Kreangast

 

ここで質問を形にします。

チャート上でインジケータを表示するバーの 数を減らす方法は何でしょうか?

グラフMetatraderに表示されるバーの数を減らすことなく。

大量のインジケータに適用できるコードのいくつかの行があります?

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

 
Antonsan:
私はここで私の質問を定式化する。

チャート上でインジケータを表示するバーの本数を減らす方法を教えてください。

Metatraderのグラフに表示されるバーの数を減らすことなく。

大量のインジケータに適用できるコード行があるのでは?

あなたの注意をありがとうございました。

Antonsan

この記事をお読みください:https://www.mql5.com/en/forum/180284/page31。本質を繰り返すでしょう - あなたは、コード内のバーの制限を変更する必要があります。他の方法はありません。