コーディングのヘルプ - ページ 288 1...281282283284285286287288289290291292293294295...786 新しいコメント 削除済み 2014.06.05 08:34 #2871 こんにちは。 まず、これが間違った場所であった場合、お詫び申し上げます。 MT4では、日足、週足、月足=W1、D1、MN1がありますが しかし、年や四半期の関数はありますか? 例えば、添付のpivot indicatorで1年を取得する方法、12ヶ月のローリングか2013年の固定前年の例か(選択可能か)。また、四半期ごとのピボットを計算させるにはどうしたらよいのでしょうか。 また、四半期ごとのピボットを計算させる方法も教えてください。 オールピボット_月次.mq4 ありがとうございました。 Kevin ファイル: allpivots_monthly.mq4 6 kb AZRUL FYZEE AZMI 2014.06.05 08:47 #2872 mladen: このインジケータが何をするものなのか、私にはわかりません(他の「ポラン」インジケータと同様であれば、リペイントを行い、それがあなたの問題を引き起こす可能性がありますが、今はただ推測ゲームをしているだけです)。 MLADEN様 このインジケータ(#pollan indy)を他のインジケータに置き換えていただけないでしょうか... #VQ barsを呼び出すとか...というのも、添付 画像のようなインジケータ・バッファを読み取ることができるのですが、この「#pollan indy」をさらにテストするために、私のEAでiCustomを介して呼び出すことができなかったのです。 またすぐにご連絡いただけると幸いです。ありがとうございました。 本当にありがとうございます。 AZRUL ファイル: my_vq.jpg 48 kb Mladen Rakic 2014.06.05 09:02 #2873 12BPRO: MLADEN様へ・・・。このインジケータ(#pollan indy)を、あなたがお持ちの他のインジケータ(#VQ barを呼び出すなど)に置き換えていただけないでしょうか。しかし、この'#pollan indy'をさらにテストするために、私のEAでiCustomを介して呼び出すことができませんでした......。 またすぐにご連絡いただけると幸いです。ありがとうございました。 本当にありがとうございます。 AZRUL VQを#VQに置き換える必要はありません(すでにボラティリティクオリティを計算しています)。 通常の#VQで正常に動作するのであれば、"#pollan indy "に何か問題があるというのが唯一の論理的な結論です。 Hermo 2014.06.05 09:24 #2874 コーディングのヘルプ おはようございます こんにちは、mladenです。 私は最初のコードを作成しようとしています。 私の言語ではマニュアルMT4がないので、他のコードから学ぶことができます。 私は私のコードで笑わないように祈る。 それが動作するように私を助けることができるしてください。 それは童子の作成をマークする単純な指標である。 私はあなたの助けを請う。 事前に非常にありがとうございました。 よろしくお願いします。 ヘルモです。 PDです。コンパイルはうまくいくが、動作しない。 ファイル: candlestick_-_doji.mq4 8 kb Mladen Rakic 2014.06.05 10:10 #2875 Hermo: おはようございます。 こんにちは、mladenです。私は最初のコードを作成しようとしています。私の言語ではMT4のマニュアルがないので、他のコードから学びます。私は私のコードで笑わないように祈る。それが動作するように私を助けることができるしてください。それは童子の作成をマークする単純な指標である。私はあなたの助けを請う。事前に非常にありがとうございました。よろしくお願いします。Hermoです。 PDです。コンパイルはうまくいくが、動作しない。 Hermo Willcheck it ECBプレスカンファレンス待ちなう:):) Mladen Rakic 2014.06.05 11:23 #2876 12BPRO: 親愛なるMLADEN... もしかしたら、あなたの言うとおり「ポーラン・インディ」に何か問題があって、リペイントしたのかもしれませんね・・・。 私としては、このインジケーターで自分の理論を試してみたいだけなのですが...。 私のEAでは、このインジケータのバッファを呼び出すことができませんでした。おそらく、修正版の#VQが私のEAへのiCustomの呼び出しをブロックしていることが原因でしょう。 オリジナルの#VQでは問題なく動作し、私のEAを実行することができました...しかし、修正された#VQ(私のもの)では、私は超過することができませんでしたが、それでも前のスレッドに示されているように値が存在します... 私の修正した#VQのバージョンに問題があると思います...多分、構文エラーでしょう...もしお時間があれば、見ていただいて、それが正常に動作しているかどうか確認してください.... ありがとうございます...そして、否定的な意見で申し訳ありません.... 本当にありがとうございます。 アズールール AZRUL あなたの "pollan indy "で何が起こっているのか、コードを見ずに知ることはできません。 コーディングで推測することはとてもとても悪いことです。 最高の AZRUL FYZEE AZMI 2014.06.05 11:57 #2877 mladen: VQを#VQに置き換える必要はありません(すでにボラティリティの質を計算しています)通常の#VQでその通りに動作するなら、唯一の論理的結論は "#pollan indy" に何か問題があることです。 MLADENさんへ もしかしたら、あなたの言う通り、"pollan indy "に何か問題があって、それがリペイントされたのかもしれませんね・・・。 私としては、このインジケーターで自分の理論を試してみたいだけなのですが...。 私のEAでは、このインジケータのバッファを 呼び出すことができませんでした。おそらく、修正版の#VQが私のEAへのiCustomの呼び出しをブロックしていることが原因でしょう。 オリジナルの#VQでは問題なく動作し、私のEAを実行することができました...しかし、修正された#VQ(私のもの)では、私は超過することができませんでしたが、それでも前のスレッドに示されているように値が存在します... 私の修正した#VQのバージョンに問題があると思います...何か構文エラーかもしれません...。もし時間があれば、見てみて、その通りに動いているかどうか見てみてください......ただ、学習の目的のために......。 ありがとうございます...今、そのEAを動かしてテストしているのですが、もし結果を知りたければ、ポーランスレッドに投稿しますよ。 本当にありがとうございます。 AZRUL AZRUL FYZEE AZMI 2014.06.05 14:14 #2878 mladen: AZRULあなたの "pollan indy "で何が起こっているのか、コードを見ずに知ることはできないのです。 私にできることは推測することだけで、コーディングで推測することはとてもとても悪いことです。 最高 今、そのEAを動かしてテストしているのですが、もし結果を知りたいのであれば、ポーランスレッドに投稿します.... 私のバージョンの#vqがうまくいかなかったのです.... ありがとうございます... 本当にありがとうございました... AZRUL AZRUL FYZEE AZMI 2014.06.06 01:26 #2879 こんにちは、CODESGURUSです。 マルチタイムフレームについて一般的な質問があります。 最初の左側の画像は、5MのタイムフレームのRSIインジケータです。 2枚目は、5MのRSIマルチタイムフレームを15Mのタイムフレームに表示したものです。 問題は、なぜ赤丸で示されるように値に違いがあるのかということです.... どなたか、このRsiMA-MTFのコードを説明し、修正していただけませんか? #property indicator_separate_window #プロパティ indicator_buffers 6 #property indicator_color1 Lime (プロパティ インジケータカラー1 ライム) #property indicator_color2 Red(プロパティ インジケータカラー2 レッド #property indicator_color3 アクア #property indicator_color4 イエロー #property indicator_color5 ホワイト #property indicator_color6 マゼンタ #property インジケータ_width1 1 #property indicator_width2 1 (プロパティインジケータ幅2) #property インジケータ_width3 1 #property indicator_width4 1 (インジケータ幅4) #property indicator_width5 1 (プロパティインジケータ幅5) #property indicator_width6 1 //------------------------------------- //----- //extern string TimeFrames = "M15; M60"; extern bool TimeFrame1bool = true; extern int TimeFrame1 = 0; extern bool TimeFrame2bool = False; extern int TimeFrame2 = 0; extern int TimeFrame2 = 0; extern bool TimeFrame3bool = False; extern int TimeFrame2 = 0; extern bool TimeFrame3bool = False; extern int TimeFrame3 = 0; extern int TimeFrame3 = 0; //int period[]={1,5,15,30,60,240,1440,43200}; //string periodString[]={"M1","M5","M15","M30","H1","H4","D1",MN1"}; // インジケータ名の配列をもう1つ作成 //文字列 signalNameString[]={"MA"}; int ExtCountedBars=0; //--------------------- int TF; //バッファ double ExtMapBuffer1[]; double ExtMapBuffer2[]; //ダブルExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; double ExtMapBuffer5[]; double ExtMapBuffer6[]; //------- //+------------------------------------------------------------------+ int init() { SetIndexBuffer(0, ExtMapBuffer1); SetIndexBuffer(1, ExtMapBuffer2); SetIndexBuffer(2, ExtMapBuffer3); SetIndexBuffer(3, ExtMapBuffer4).SetIndexBuffer(3,ExtMapBuffer4)。 SetIndexBuffer(4, ExtMapBuffer5).SetIndexBuffer(4,ExtMapBuffer5)。 SetIndexBuffer(5, ExtMapBuffer6); //----- SetIndexStyle(0, DRAW_LINE)を設定します。 SetIndexStyle(1, DRAW_LINE).SetIndexStyle(1,DRAW_LINE)。 SetIndexStyle(2, DRAW_LINE)を設定します。 SetIndexStyle(3, DRAW_LINE).SetIndexStyle(3,DRAW_LINE)。 SetIndexStyle(4, DRAW_LINE).SetIndexStyle(4,DRAW_LINE)。 SetIndexStyle(5, DRAW_LINE)を設定します。 // SetIndexStyle(0,DRAW_LINE,EMPTY,1) を設定します。 // SetIndexBuffer(0,ExtMapBuffer1)を設定します。 //-------------------------------------------------------------+++ int M1 = PERIOD_M1; int M5 = PERIOD_M5; int M15 = PERIOD_M15; int M30 = PERIOD_M30; int H1 = PERIOD_H1; int H4 = PERIOD_H4; int D1 = PERIOD_D1; int WK1 = PERIOD_W1; int MN1 = PERIOD_M1; TF=Period()とする。 if (TF==PERIOD_M1) { TimeFrame1 = M1; TimeFrame2 = M1; TimeFrame3 = M1;}. else if (TF==PERIOD_M5) { TimeFrame1 = M1; TimeFrame2 = M5; TimeFrame3 = M15;}. else if (TF==PERIOD_M15) { TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1; }. else if (TF==PERIOD_M30) { TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1; } {TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1 else if (TF==PERIOD_H1) { TimeFrame1 = M15; TimeFrame2 = H1; TimeFrame3 = H4; }. else if (TF==PERIOD_H4) { TimeFrame1 = H4; TimeFrame2 = H4; TimeFrame3 = D1; }. else if (TF==PERIOD_D1) { TimeFrame1 = H4; TimeFrame2 = D1; TimeFrame3 = WK1;} } }。 else if (TF==PERIOD_W1) { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。 else if (TF==PERIOD_MN1) { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。 else { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。 //----- return(0); } //+------------------------------------------------------------------+ int start() { datetime TimeArray1[]; datetime TimeArray2[]; datetime TimeArray3[]; int limit, i,y=0; // int counted_bars = IndicatorCounted(); ExtCountedBars=IndicatorCounted(); if(ExtCountedBars < 0) return(-1); if(ExtCountedBars > 0) ExtCountedBars--; limit = Bars - ExtCountedBars; //----- ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1); ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2); ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2); ArrayCopySeries(TimeArray3,MODE_TIME,Symbol(),TimeFrame3); ArrayCopySeries(TimeArray3,MODE_TIME,Symbol(),TimeFrame3); for(i=0,y=0;i<limit;i++) { if(TimeFrame1bool) { if (Time<TimeArray1[y]) y++; { //ExtMapBuffer1(エクストマップバッファ1 ExtMapBuffer1 = iCustom(NULL,TimeFrame1 , "#RSI-MA",0, y).ExtMapBuffer2=iCustom(NULL)です。 ExtMapBuffer2 = iCustom(NULL,TimeFrame1 , "#RSI-MA",3, y); } } //----- if(TimeFrame2bool) { if (Time<TimeArray2[y]) y++; { //ExtMapBuffer1 ExtMapBuffer3 = iCustom(NULL,TimeFrame2 , "#RSI-MA",0,y); ExtMapBuffer4 = iCustom(NULL,TimeFrame2 , "#RSI-MA",3,y); //ExtMapBuffer2(NULL,TimeFrame2 , "#RSI-MA",3,y); } } //----- if(TimeFrame3bool) { if (Time<TimeArray3[y]) y++; { //ExtMapBuffer1 ExtMapBuffer5 = iCustom(NULL,TimeFrame3 , "#RSI-MA",0, y); ExtMapBuffer6 = iCustom(NULL,TimeFrame3 , "#RSI-MA",3, y)とします。 } } } //-----//--------------------------------------------------------------------------+ //======================================================= return(0); } //+--------------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ ファイル: rsi-mtf_diff.jpg 290 kb AZRUL FYZEE AZMI 2014.06.06 01:27 #2880 これはrsi-maのコピーです.........。 #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 LimeGreen #property indicator_color2 Red(インジケーターカラー2 レッド #property indicator_color3 イエロー #property indicator_color4 白 ///ダークグレー #property indicator_width1 3 (幅) #property indicator_width2 3 (幅) #property indicator_width3 3 (インジケータ幅3) #property indicator_width4 1 (インジケータ幅4 #property indicator_levelcolor Aqua(プロパティ インジケーターレベルカラー アクア extern string TimeFrame = "現在のタイムフレーム"; extern int RsiOma_Period = 13; extern int RsiOma_Price = 0; extern int RsiOma_Mode = MODE_LWMA; extern int MaPeriod = 8; extern int MaType = MODE_LWMA; extern double levelOb = 88; extern double levelOs = 13; extern int OB_RSI = 80; extern int OS_RSI = 15; extern string note = "turn on Alert = true; turn off = false"; extern bool alertsOn = true; ///false; extern bool alertsOnCurrent = true; extern bool alertsMessage = true; extern bool alertsSound = true; ///false; extern bool alertsEmail = false; extern string soundfile = "connect.wav"; ///"alert2.wav"; extern string SoundUp = "ok.wav"; extern string SoundDown = "stops.wav"; double rsi[]; double rsida[]; double rsidb[]; double ma[]; double mab[]; double trend[]; double slope[]; 文字列indicatorFileName; int Char, timeFrame; bool returnBars; bool calculateValue; //+------------------------------------------------------------------+ int init() { IndicatorBuffers(7); SetIndexBuffer(0,rsi)を設定します。 SetIndexBuffer(1,rsida)。 SetIndexBuffer(2,rsidb); SetIndexBuffer(2,rsidb); SetIndexBuffer(3,ma)を設定します。 SetIndexBuffer(4,mab)。 SetIndexBuffer(5,trend)。 SetIndexBuffer(6,slope)を設定します。 SetLevelValue(0,levelOs)を設定します。 SetLevelValue(1,levelOb)を設定します。 indicatorFileName = WindowExpertName(); calculateValue = (TimeFrame=="calculateValue"); if (calculateValue) return(0); returnBars = (TimeFrame=="returnBars"); if (returnBars) return(0); timeFrame = stringToTimeFrame(TimeFrame); IndicatorShortName(timeFrameToString(timeFrame)+" Rsi-Ma MaxMin ("+RsiOma_Period+", "+MaPeriod+")"); SetIndexLabel(0, "RSI").SetIndexLabel(0, "RSI")。 SetIndexLabel(1, "RSIDA"); SetIndexLabel(1, "RSIDA"); SetIndexLabel(2, "RSIDB")。 SetIndexLabel(3, "MA")。 return(0); } int deinit() { return(0); }. //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int i,limit; if(counted_bars<0)リターン(-1); if(counted_bars>0) counted_bars--; limit = MathMin(Bars-counted_bars,Bars-1); if (returnBars) { rsi[0] = limit+1; return(0); }. if (計算値 || timeFrame==Period()) { if (slope[limit] == -1) ClearPoint(limit,rsida,rsidb); for (i=limit; i >= 0; i--) mab = iMA(NULL,0,RsiOma_Period,0,RsiOma_Mode,RsiOma_Price,i); for (i=limit; i >= 0; i--) rsi = iRSIOnArray(mab,0,RsiOma_Period,i); for (i=limit; i >= 0; i--) { ma = iMAOnArray(rsi,0,MaPeriod,0,MaType,i)とする。 rsida = EMPTY_VALUE; rsidb = EMPTY_VALUE; slope = slope; trend = trend; if ((rsi > rsi) && (rsi > OB_RSI)) slope= 1; if ((rsi < rsi) && (rsi < OS_RSI)) slope=-1; if ((rsi > ma) && (rsi > OB_RSI)) trend= 1; if ((rsi < ma) && (rsi < OS_RSI)) trend=-1; if (傾き == -1) PlotPoint(i,rsida,rsidb,rsi); } manageAlerts(); return(0); } limit = MathMax(limit,MathMin(Bars-1,iCustom(NULL,timeFrame,indicatorFileName, "returnBars",0,0)*timeFrame/Period())).If (slope[limit]==-1) ClearPoint(i,rsida,ridb,rsi); if (slope[limit]==-1) ClearPoint(limit,rsida,rsidb); for (i=limit;i>=0; i--) { int y = iBarShift(NULL,timeFrame,Time).rsi = iCustom(NULL); rsi = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,0,y); iCustom(NULL,timeFrame,indicatorFileName,RsiOma_Price,RsiOma_Mode,MaType,0,y).RSI = NULL(NULL); rsida = EMPTY_VALUE; rsidb = EMPTY_VALUE; rsidb = EMPTY_VALUE; ma = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,3,y); rsidb = iCustom(NULL,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType.y,y); trend = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,5,y);RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaMeriod,MaType,5,y slope = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,6,y); } for (i=limit;i>=0;i--) if (slope==-1) PlotPoint(i,rsida,rsidb,rsi); manageAlerts(); return(0); } //+------------------------------------------------------------------ string sTfTable[] = {"M1", "M5", "M15", "M30", "H1", "H4", "D1", "W1", "MN"}; int iTfTable[] = {1,5,15,30,60,240,1440,10080,43200}; int stringToTimeFrame(string tfs) { tfs = stringUpperCase(tfs); for (int i=ArraySize(iTfTable)-1; i>=0; i--) if (tfs==sTfTable || tfs==""+iTfTable) return(MathMax(iTfTable,Period())); return(Period())。 } 文字列 timeFrameToString(int tf) { for (int i=ArraySize(iTfTable)-1; i>=0; i--) if (tf==iTfTable) return(sTfTable); return(""); } 文字列 stringUpperCase(string str) { 文字列 s = str; for (int length=StringLen(str)-1; length>=0; length--) { Char = StringGetChar(s, length); if((Char > 96 && Char 223 && Char < 256)) s = StringSetChar(s, length, Char - 32); else if(Char > -33 && Char < 0) s = StringSetChar(s, length, Char + 224); } return(s); } //+------------------------------------------------------------------+ void ClearPoint(int i,double& first[],double& second[]) { if ((second != EMPTY_VALUE) && (second != EMPTY_VALUE)) second = EMPTY_VALUE とする。 さもなくば if ((first != EMPTY_VALUE) && (first != EMPTY_VALUE) && (first == EMPTY_VALUE)) first = EMPTY_VALUE; } void PlotPoint(int i,double& first[],double& second[],double& from[]) { if (first == EMPTY_VALUE) { if (first == EMPTY_VALUE) { (first == EMPTY_VALUE) { first = from; first = from; second = EMPTY_VALUE; } さもなくば { second = from; second = from; first = EMPTY_VALUE; } } さもなくば { first = from; second = EMPTY_VALUE; } } void manageAlerts() { if (!calculateValue && alertsOn) { if (alertsOnCurrent) int whichBar = 0; else whichBar = 1; whichBar = iBarShift(NULL,0,iTime(NULL,timeFrame,whichBar)); if (トレンド[whichBar] != トレンド[whichBar+1]) { if (トレンド[whichBar] == 1) //doAlert(whichBar, "trend")。 doAlerts( whichBar, "UP RSI-MA "+Symbol()+" (tf: "+Period()+")",SoundUp); if (トレンド[whichBar] ==-1) //doAlert(whichBar, "トレンドなし"); doAlerts( whichBar, "DOWN RSI-MA "+Symbol()+" (tf: "+Period() +")",SoundDown); } } } void doAlerts(int forBar, string doWhat, string SoundFile) { { 静的文字列previousAlert="nothing",SoundDown 静的な文字列previousAlert="何もない"; static datetime previousTime; 文字列メッセージ if (previousAlert != doWhat || previousTime != Time[forBar]) { previousAlert = doWhat; previousTime = Time[forBar]; message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," - ",timeFrameToString(timeFrame)+" rsioma ",doWhat).If (alertsMessage); if (alertsMessage) アラート(メッセージ)を表示します。 if (alertsSound) PlaySound(SoundFile)。 if (alertsEmail) SendMail(StringConcatenate(Symbol()," rsioma "),message)を送信します。 } } //--------------------------------------------------------------------------------------------------- void doAlert(int forBar, string doWhat) { static string previousAlert="nothing"; static datetime previousTime; 文字列メッセージ if (previousAlert != doWhat || previousTime != Time[forBar]) { previousAlert = doWhat; previousTime = Time[forBar]; message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," - ",timeFrameToString(timeFrame)+" rsioma ",doWhat).If (alertsMessage); if (alertsMessage) Alert(message)。 if (alertsEmail) SendMail(StringConcatenate(Symbol()," rsioma "),message).を送信します。 if (alertsSound) PlaySound(サウンドファイル); } ありがとうございました。 よろしくお願いします。 azrul......。 PS.これらのFILESコードをここに添付するにはどうしたらいいのでしょうか?混乱させて申し訳ありません.... 1...281282283284285286287288289290291292293294295...786 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
こんにちは。
まず、これが間違った場所であった場合、お詫び申し上げます。
MT4では、日足、週足、月足=W1、D1、MN1がありますが
しかし、年や四半期の関数はありますか?
例えば、添付のpivot indicatorで1年を取得する方法、12ヶ月のローリングか2013年の固定前年の例か(選択可能か)。また、四半期ごとのピボットを計算させるにはどうしたらよいのでしょうか。
また、四半期ごとのピボットを計算させる方法も教えてください。
オールピボット_月次.mq4
ありがとうございました。
Kevin
このインジケータが何をするものなのか、私にはわかりません(他の「ポラン」インジケータと同様であれば、リペイントを行い、それがあなたの問題を引き起こす可能性がありますが、今はただ推測ゲームをしているだけです)。
MLADEN様
このインジケータ(#pollan indy)を他のインジケータに置き換えていただけないでしょうか... #VQ barsを呼び出すとか...というのも、添付 画像のようなインジケータ・バッファを読み取ることができるのですが、この「#pollan indy」をさらにテストするために、私のEAでiCustomを介して呼び出すことができなかったのです。
またすぐにご連絡いただけると幸いです。ありがとうございました。
本当にありがとうございます。
AZRUL
MLADEN様へ・・・。
このインジケータ(#pollan indy)を、あなたがお持ちの他のインジケータ(#VQ barを呼び出すなど)に置き換えていただけないでしょうか。しかし、この'#pollan indy'をさらにテストするために、私のEAでiCustomを介して呼び出すことができませんでした......。
またすぐにご連絡いただけると幸いです。ありがとうございました。
本当にありがとうございます。
AZRULVQを#VQに置き換える必要はありません(すでにボラティリティクオリティを計算しています)。
通常の#VQで正常に動作するのであれば、"#pollan indy "に何か問題があるというのが唯一の論理的な結論です。
コーディングのヘルプ
おはようございます
こんにちは、mladenです。
私は最初のコードを作成しようとしています。
私の言語ではマニュアルMT4がないので、他のコードから学ぶことができます。
私は私のコードで笑わないように祈る。![](https://c.mql5.com/forextsd/smiles/cry_smile.png)
それが動作するように私を助けることができるしてください。
それは童子の作成をマークする単純な指標である。
私はあなたの助けを請う。
事前に非常にありがとうございました。
よろしくお願いします。
ヘルモです。
PDです。コンパイルはうまくいくが、動作しない。
おはようございます。
こんにちは、mladenです。
私は最初のコードを作成しようとしています。
私の言語ではMT4のマニュアルがないので、他のコードから学びます。
私は私のコードで笑わないように祈る。![](https://c.mql5.com/forextsd/smiles/cry_smile.png)
それが動作するように私を助けることができるしてください。
それは童子の作成をマークする単純な指標である。
私はあなたの助けを請う。
事前に非常にありがとうございました。
よろしくお願いします。
Hermoです。
PDです。コンパイルはうまくいくが、動作しない。Hermo
Willcheck it
ECBプレスカンファレンス待ちなう
:):)
親愛なるMLADEN...
もしかしたら、あなたの言うとおり「ポーラン・インディ」に何か問題があって、リペイントしたのかもしれませんね・・・。
私としては、このインジケーターで自分の理論を試してみたいだけなのですが...。
私のEAでは、このインジケータのバッファを呼び出すことができませんでした。おそらく、修正版の#VQが私のEAへのiCustomの呼び出しをブロックしていることが原因でしょう。
オリジナルの#VQでは問題なく動作し、私のEAを実行することができました...しかし、修正された#VQ(私のもの)では、私は超過することができませんでしたが、それでも前のスレッドに示されているように値が存在します...
私の修正した#VQのバージョンに問題があると思います...多分、構文エラーでしょう...もしお時間があれば、見ていただいて、それが正常に動作しているかどうか確認してください....
ありがとうございます...そして、否定的な意見で申し訳ありません....
本当にありがとうございます。
アズールールAZRUL
あなたの "pollan indy "で何が起こっているのか、コードを見ずに知ることはできません。
コーディングで推測することはとてもとても悪いことです。
最高の
VQを#VQに置き換える必要はありません(すでにボラティリティの質を計算しています)通常の#VQでその通りに動作するなら、唯一の論理的結論は "#pollan indy" に何か問題があることです。
MLADENさんへ
もしかしたら、あなたの言う通り、"pollan indy "に何か問題があって、それがリペイントされたのかもしれませんね・・・。
私としては、このインジケーターで自分の理論を試してみたいだけなのですが...。
私のEAでは、このインジケータのバッファを 呼び出すことができませんでした。おそらく、修正版の#VQが私のEAへのiCustomの呼び出しをブロックしていることが原因でしょう。
オリジナルの#VQでは問題なく動作し、私のEAを実行することができました...しかし、修正された#VQ(私のもの)では、私は超過することができませんでしたが、それでも前のスレッドに示されているように値が存在します...
私の修正した#VQのバージョンに問題があると思います...何か構文エラーかもしれません...。もし時間があれば、見てみて、その通りに動いているかどうか見てみてください......ただ、学習の目的のために......。
ありがとうございます...今、そのEAを動かしてテストしているのですが、もし結果を知りたければ、ポーランスレッドに投稿しますよ。
本当にありがとうございます。
AZRUL
AZRUL
あなたの "pollan indy "で何が起こっているのか、コードを見ずに知ることはできないのです。
私にできることは推測することだけで、コーディングで推測することはとてもとても悪いことです。
最高今、そのEAを動かしてテストしているのですが、もし結果を知りたいのであれば、ポーランスレッドに投稿します....
私のバージョンの#vqがうまくいかなかったのです....
ありがとうございます...
本当にありがとうございました...
AZRUL
こんにちは、CODESGURUSです。
マルチタイムフレームについて一般的な質問があります。
最初の左側の画像は、5MのタイムフレームのRSIインジケータです。
2枚目は、5MのRSIマルチタイムフレームを15Mのタイムフレームに表示したものです。
問題は、なぜ赤丸で示されるように値に違いがあるのかということです....
どなたか、このRsiMA-MTFのコードを説明し、修正していただけませんか?
#property indicator_separate_window
#プロパティ indicator_buffers 6
#property indicator_color1 Lime (プロパティ インジケータカラー1 ライム)
#property indicator_color2 Red(プロパティ インジケータカラー2 レッド
#property indicator_color3 アクア
#property indicator_color4 イエロー
#property indicator_color5 ホワイト
#property indicator_color6 マゼンタ
#property インジケータ_width1 1
#property indicator_width2 1 (プロパティインジケータ幅2)
#property インジケータ_width3 1
#property indicator_width4 1 (インジケータ幅4)
#property indicator_width5 1 (プロパティインジケータ幅5)
#property indicator_width6 1
//-------------------------------------
//-----
//extern string TimeFrames = "M15; M60";
extern bool TimeFrame1bool = true;
extern int TimeFrame1 = 0;
extern bool TimeFrame2bool = False;
extern int TimeFrame2 = 0; extern int TimeFrame2 = 0;
extern bool TimeFrame3bool = False; extern int TimeFrame2 = 0; extern bool TimeFrame3bool = False;
extern int TimeFrame3 = 0; extern int TimeFrame3 = 0;
//int period[]={1,5,15,30,60,240,1440,43200};
//string periodString[]={"M1","M5","M15","M30","H1","H4","D1",MN1"};
// インジケータ名の配列をもう1つ作成
//文字列 signalNameString[]={"MA"};
int ExtCountedBars=0;
//---------------------
int TF;
//バッファ
double ExtMapBuffer1[];
double ExtMapBuffer2[]; //ダブルExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
//-------
//+------------------------------------------------------------------+
int init()
{
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexBuffer(2, ExtMapBuffer3);
SetIndexBuffer(3, ExtMapBuffer4).SetIndexBuffer(3,ExtMapBuffer4)。
SetIndexBuffer(4, ExtMapBuffer5).SetIndexBuffer(4,ExtMapBuffer5)。
SetIndexBuffer(5, ExtMapBuffer6);
//-----
SetIndexStyle(0, DRAW_LINE)を設定します。
SetIndexStyle(1, DRAW_LINE).SetIndexStyle(1,DRAW_LINE)。
SetIndexStyle(2, DRAW_LINE)を設定します。
SetIndexStyle(3, DRAW_LINE).SetIndexStyle(3,DRAW_LINE)。
SetIndexStyle(4, DRAW_LINE).SetIndexStyle(4,DRAW_LINE)。
SetIndexStyle(5, DRAW_LINE)を設定します。
// SetIndexStyle(0,DRAW_LINE,EMPTY,1) を設定します。
// SetIndexBuffer(0,ExtMapBuffer1)を設定します。
//-------------------------------------------------------------+++
int M1 = PERIOD_M1;
int M5 = PERIOD_M5;
int M15 = PERIOD_M15;
int M30 = PERIOD_M30;
int H1 = PERIOD_H1;
int H4 = PERIOD_H4;
int D1 = PERIOD_D1;
int WK1 = PERIOD_W1;
int MN1 = PERIOD_M1;
TF=Period()とする。
if (TF==PERIOD_M1) { TimeFrame1 = M1; TimeFrame2 = M1; TimeFrame3 = M1;}.
else if (TF==PERIOD_M5) { TimeFrame1 = M1; TimeFrame2 = M5; TimeFrame3 = M15;}.
else if (TF==PERIOD_M15) { TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1; }.
else if (TF==PERIOD_M30) { TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1; } {TimeFrame1 = M5; TimeFrame2 = M15; TimeFrame3 = H1
else if (TF==PERIOD_H1) { TimeFrame1 = M15; TimeFrame2 = H1; TimeFrame3 = H4; }.
else if (TF==PERIOD_H4) { TimeFrame1 = H4; TimeFrame2 = H4; TimeFrame3 = D1; }.
else if (TF==PERIOD_D1) { TimeFrame1 = H4; TimeFrame2 = D1; TimeFrame3 = WK1;} } }。
else if (TF==PERIOD_W1) { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。
else if (TF==PERIOD_MN1) { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。
else { TimeFrame1 = D1; TimeFrame2 = WK1; TimeFrame3 = MN1;}。
//-----
return(0);
}
//+------------------------------------------------------------------+
int start()
{
datetime TimeArray1[];
datetime TimeArray2[];
datetime TimeArray3[];
int limit, i,y=0;
// int counted_bars = IndicatorCounted();
ExtCountedBars=IndicatorCounted();
if(ExtCountedBars < 0) return(-1);
if(ExtCountedBars > 0) ExtCountedBars--;
limit = Bars - ExtCountedBars;
//-----
ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1);
ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2); ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2);
ArrayCopySeries(TimeArray3,MODE_TIME,Symbol(),TimeFrame3); ArrayCopySeries(TimeArray3,MODE_TIME,Symbol(),TimeFrame3);
for(i=0,y=0;i<limit;i++)
{
if(TimeFrame1bool)
{
if (Time<TimeArray1[y]) y++;
{
//ExtMapBuffer1(エクストマップバッファ1
ExtMapBuffer1 = iCustom(NULL,TimeFrame1 , "#RSI-MA",0, y).ExtMapBuffer2=iCustom(NULL)です。
ExtMapBuffer2 = iCustom(NULL,TimeFrame1 , "#RSI-MA",3, y);
}
}
//-----
if(TimeFrame2bool)
{
if (Time<TimeArray2[y]) y++;
{
//ExtMapBuffer1
ExtMapBuffer3 = iCustom(NULL,TimeFrame2 , "#RSI-MA",0,y);
ExtMapBuffer4 = iCustom(NULL,TimeFrame2 , "#RSI-MA",3,y); //ExtMapBuffer2(NULL,TimeFrame2 , "#RSI-MA",3,y);
}
}
//-----
if(TimeFrame3bool)
{
if (Time<TimeArray3[y]) y++;
{
//ExtMapBuffer1
ExtMapBuffer5 = iCustom(NULL,TimeFrame3 , "#RSI-MA",0, y);
ExtMapBuffer6 = iCustom(NULL,TimeFrame3 , "#RSI-MA",3, y)とします。
}
}
}
//-----//--------------------------------------------------------------------------+
//=======================================================
return(0);
}
//+--------------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
これはrsi-maのコピーです.........。
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 LimeGreen
#property indicator_color2 Red(インジケーターカラー2 レッド
#property indicator_color3 イエロー
#property indicator_color4 白 ///ダークグレー
#property indicator_width1 3 (幅)
#property indicator_width2 3 (幅)
#property indicator_width3 3 (インジケータ幅3)
#property indicator_width4 1 (インジケータ幅4
#property indicator_levelcolor Aqua(プロパティ インジケーターレベルカラー アクア
extern string TimeFrame = "現在のタイムフレーム";
extern int RsiOma_Period = 13;
extern int RsiOma_Price = 0;
extern int RsiOma_Mode = MODE_LWMA;
extern int MaPeriod = 8;
extern int MaType = MODE_LWMA;
extern double levelOb = 88;
extern double levelOs = 13;
extern int OB_RSI = 80;
extern int OS_RSI = 15;
extern string note = "turn on Alert = true; turn off = false";
extern bool alertsOn = true; ///false;
extern bool alertsOnCurrent = true;
extern bool alertsMessage = true;
extern bool alertsSound = true; ///false;
extern bool alertsEmail = false;
extern string soundfile = "connect.wav"; ///"alert2.wav";
extern string SoundUp = "ok.wav";
extern string SoundDown = "stops.wav";
double rsi[];
double rsida[];
double rsidb[];
double ma[];
double mab[];
double trend[];
double slope[];
文字列indicatorFileName;
int Char, timeFrame;
bool returnBars;
bool calculateValue;
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(7);
SetIndexBuffer(0,rsi)を設定します。
SetIndexBuffer(1,rsida)。
SetIndexBuffer(2,rsidb); SetIndexBuffer(2,rsidb);
SetIndexBuffer(3,ma)を設定します。
SetIndexBuffer(4,mab)。
SetIndexBuffer(5,trend)。
SetIndexBuffer(6,slope)を設定します。
SetLevelValue(0,levelOs)を設定します。
SetLevelValue(1,levelOb)を設定します。
indicatorFileName = WindowExpertName();
calculateValue = (TimeFrame=="calculateValue"); if (calculateValue) return(0);
returnBars = (TimeFrame=="returnBars"); if (returnBars) return(0);
timeFrame = stringToTimeFrame(TimeFrame);
IndicatorShortName(timeFrameToString(timeFrame)+" Rsi-Ma MaxMin ("+RsiOma_Period+", "+MaPeriod+")");
SetIndexLabel(0, "RSI").SetIndexLabel(0, "RSI")。
SetIndexLabel(1, "RSIDA"); SetIndexLabel(1, "RSIDA");
SetIndexLabel(2, "RSIDB")。
SetIndexLabel(3, "MA")。
return(0);
}
int deinit() { return(0); }.
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int i,limit;
if(counted_bars<0)リターン(-1);
if(counted_bars>0) counted_bars--;
limit = MathMin(Bars-counted_bars,Bars-1);
if (returnBars) { rsi[0] = limit+1; return(0); }.
if (計算値 || timeFrame==Period())
{
if (slope[limit] == -1) ClearPoint(limit,rsida,rsidb);
for (i=limit; i >= 0; i--) mab = iMA(NULL,0,RsiOma_Period,0,RsiOma_Mode,RsiOma_Price,i);
for (i=limit; i >= 0; i--) rsi = iRSIOnArray(mab,0,RsiOma_Period,i);
for (i=limit; i >= 0; i--)
{
ma = iMAOnArray(rsi,0,MaPeriod,0,MaType,i)とする。
rsida = EMPTY_VALUE;
rsidb = EMPTY_VALUE;
slope = slope;
trend = trend;
if ((rsi > rsi) && (rsi > OB_RSI))
slope= 1;
if ((rsi < rsi) && (rsi < OS_RSI))
slope=-1;
if ((rsi > ma) && (rsi > OB_RSI))
trend= 1;
if ((rsi < ma) && (rsi < OS_RSI))
trend=-1;
if (傾き == -1)
PlotPoint(i,rsida,rsidb,rsi);
}
manageAlerts();
return(0);
}
limit = MathMax(limit,MathMin(Bars-1,iCustom(NULL,timeFrame,indicatorFileName, "returnBars",0,0)*timeFrame/Period())).If (slope[limit]==-1) ClearPoint(i,rsida,ridb,rsi);
if (slope[limit]==-1) ClearPoint(limit,rsida,rsidb);
for (i=limit;i>=0; i--)
{
int y = iBarShift(NULL,timeFrame,Time).rsi = iCustom(NULL);
rsi = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,0,y); iCustom(NULL,timeFrame,indicatorFileName,RsiOma_Price,RsiOma_Mode,MaType,0,y).RSI = NULL(NULL);
rsida = EMPTY_VALUE;
rsidb = EMPTY_VALUE; rsidb = EMPTY_VALUE;
ma = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,3,y); rsidb = iCustom(NULL,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType.y,y);
trend = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,5,y);RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaMeriod,MaType,5,y
slope = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",RsiOma_Period,RsiOma_Price,RsiOma_Mode,MaPeriod,MaType,6,y);
}
for (i=limit;i>=0;i--) if (slope==-1) PlotPoint(i,rsida,rsidb,rsi);
manageAlerts();
return(0);
}
//+------------------------------------------------------------------
string sTfTable[] = {"M1", "M5", "M15", "M30", "H1", "H4", "D1", "W1", "MN"};
int iTfTable[] = {1,5,15,30,60,240,1440,10080,43200};
int stringToTimeFrame(string tfs)
{
tfs = stringUpperCase(tfs);
for (int i=ArraySize(iTfTable)-1; i>=0; i--)
if (tfs==sTfTable || tfs==""+iTfTable) return(MathMax(iTfTable,Period()));
return(Period())。
}
文字列 timeFrameToString(int tf)
{
for (int i=ArraySize(iTfTable)-1; i>=0; i--)
if (tf==iTfTable) return(sTfTable);
return("");
}
文字列 stringUpperCase(string str)
{
文字列 s = str;
for (int length=StringLen(str)-1; length>=0; length--)
{
Char = StringGetChar(s, length);
if((Char > 96 && Char 223 && Char < 256))
s = StringSetChar(s, length, Char - 32);
else if(Char > -33 && Char < 0)
s = StringSetChar(s, length, Char + 224);
}
return(s);
}
//+------------------------------------------------------------------+
void ClearPoint(int i,double& first[],double& second[])
{
if ((second != EMPTY_VALUE) && (second != EMPTY_VALUE))
second = EMPTY_VALUE とする。
さもなくば
if ((first != EMPTY_VALUE) && (first != EMPTY_VALUE) && (first == EMPTY_VALUE))
first = EMPTY_VALUE;
}
void PlotPoint(int i,double& first[],double& second[],double& from[])
{
if (first == EMPTY_VALUE)
{
if (first == EMPTY_VALUE) { (first == EMPTY_VALUE)
{
first = from;
first = from;
second = EMPTY_VALUE;
}
さもなくば
{
second = from;
second = from;
first = EMPTY_VALUE;
}
}
さもなくば
{
first = from;
second = EMPTY_VALUE;
}
}
void manageAlerts()
{
if (!calculateValue && alertsOn)
{
if (alertsOnCurrent)
int whichBar = 0;
else whichBar = 1; whichBar = iBarShift(NULL,0,iTime(NULL,timeFrame,whichBar));
if (トレンド[whichBar] != トレンド[whichBar+1])
{
if (トレンド[whichBar] == 1)
//doAlert(whichBar, "trend")。
doAlerts( whichBar, "UP RSI-MA "+Symbol()+" (tf: "+Period()+")",SoundUp);
if (トレンド[whichBar] ==-1)
//doAlert(whichBar, "トレンドなし");
doAlerts( whichBar, "DOWN RSI-MA "+Symbol()+" (tf: "+Period() +")",SoundDown);
}
}
}
void doAlerts(int forBar, string doWhat, string SoundFile) { { 静的文字列previousAlert="nothing",SoundDown
静的な文字列previousAlert="何もない";
static datetime previousTime;
文字列メッセージ
if (previousAlert != doWhat || previousTime != Time[forBar]) {
previousAlert = doWhat;
previousTime = Time[forBar];
message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," - ",timeFrameToString(timeFrame)+" rsioma ",doWhat).If (alertsMessage);
if (alertsMessage) アラート(メッセージ)を表示します。
if (alertsSound) PlaySound(SoundFile)。
if (alertsEmail) SendMail(StringConcatenate(Symbol()," rsioma "),message)を送信します。
}
}
//---------------------------------------------------------------------------------------------------
void doAlert(int forBar, string doWhat)
{
static string previousAlert="nothing";
static datetime previousTime;
文字列メッセージ
if (previousAlert != doWhat || previousTime != Time[forBar]) {
previousAlert = doWhat;
previousTime = Time[forBar];
message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," - ",timeFrameToString(timeFrame)+" rsioma ",doWhat).If (alertsMessage);
if (alertsMessage) Alert(message)。
if (alertsEmail) SendMail(StringConcatenate(Symbol()," rsioma "),message).を送信します。
if (alertsSound) PlaySound(サウンドファイル);
}
ありがとうございました。
よろしくお願いします。
azrul......。
PS.これらのFILESコードをここに添付するにはどうしたらいいのでしょうか?混乱させて申し訳ありません....