どんな新人の質問でも、フォーラムを乱雑にしないように。プロフェッショナルは、通り過ぎないでください。Nowhere without you - 6. - ページ 25 1...181920212223242526272829303132...1178 新しいコメント TarasBY 2013.07.06 08:34 #241 Цикл от самого "старого" бара к самому "свежему": for (int i = limit; i >= 0; i--); forexman77 2013.07.06 09:51 #242 インジケーターを若干修正。小数点以下まで正しくカウントされます。例えば、あるセクションでインジケーターが11のはずなのに、11.58と表示されています。何が問題なのでしょうか?vniz_1, vniz_2が0より大きくなるようにした。指標となる線に隙間を作りました。隙間をつないで色を変える方法、ただし、この隙間での指標は計算 しない。//+------------------------------------------------------------------+ //| сила.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red //--- input parameters extern int Period_MA_1=7; extern int Period_MA_2=7; extern int Period_MA_3=7; //--- buffers double ExtMapBuffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(), limit; double vniz_1, vniz_2, MA_1_t, MA_2_t, MA_3_t; if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0;i<limit;i++) { MA_1_t=iMA(NULL,0,Period_MA_1,0,MODE_EMA,PRICE_CLOSE,i+1); MA_2_t=iMA(NULL,0,Period_MA_2,0,MODE_EMA,PRICE_CLOSE,i+2); MA_3_t=iMA(NULL,0,Period_MA_3,0,MODE_EMA,PRICE_CLOSE,i+3); vniz_1=(MA_3_t-MA_2_t); vniz_2=(MA_2_t-MA_1_t); if (vniz_1>0&&vniz_2>0) { ExtMapBuffer1[i]=(vniz_1/vniz_2); } } return(0); } //+------------------------------------------------------------------+ Vladimir Pastushak 2013.07.07 09:34 #243 Forexman77:インジケーターを若干修正。小数点以下まで正しくカウントされます。例えば、あるセクションでインジケーターが11のはずなのに、11.58と表示されています。何が問題なのでしょうか?vniz_1, vniz_2が0より大きくなるようにした。指標となる線に隙間を作りました。隙間をつないで色を変える方法、ただし、この隙間での指標は計算しない。 MA_1_t=iMA(NULL,0,Period_MA_1,0,MODE_EMA,PRICE_CLOSE,i+1); MA_2_t=iMA(NULL,0,Period_MA_2,0,MODE_EMA,PRICE_CLOSE,i+2); MA_3_t=iMA(NULL,0,Period_MA_3,0,MODE_EMA,PRICE_CLOSE,i+3); 存在しないバーでインジケータを計算する ?・・・・・・? Vladimir Pastushak 2013.07.07 09:37 #244 if (vniz_1<0 || vniz_2<0) { ExtMapBuffer2[i]=(чему равны разрывы); } Dimka-novitsek 2013.07.07 11:19 #245 2013.07.07 16:06:21 2010.02.01 01:56 EURUSD,H1: Error in opening EURUSD sell orderArray index- out of range?!!?? atztek 2013.07.07 12:23 #246 以下は、すべてのバーに対して水平線を 引くシンプルなインジケーターのコードです。 最後の20バーだけ線を引くようにするにはどうしたらいいですか?#property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Chocolate #property indicator_width1 6 #property indicator_minimum -0.1 #property indicator_maximum 0.1 double ExtMapBuffer[]; int init() { IndicatorBuffers(1); IndicatorDigits( Digits+2); IndicatorShortName("H_LINE"); SetIndexLabel( 0, "H_LINE"); SetIndexDrawBegin(0, 0); SetIndexStyle( 0, DRAW_LINE); SetIndexBuffer( 0, ExtMapBuffer); SetIndexEmptyValue(0, EMPTY_VALUE); SetIndexShift( 0, 0); return(0); } int start() { int limit; int counted_bars=IndicatorCounted(); if(counted_bars>0) { counted_bars--; } limit=Bars-counted_bars; for(int i=0; i<limit; i++) { ExtMapBuffer[i] = 0; } return(0); } Victor Nikolaev 2013.07.07 13:04 #247 atztek: 以下は、すべてのバーに対して水平線を引くシンプルなインジケーターのコードです。 最後の20バーだけ線を引くようにするにはどうしたらいいですか? 線は何と同じにすればいいのでしょうか? atztek 2013.07.07 13:38 #248 Vinin: 線は何と同じにすればいいのでしょうか? この場合、Y軸の線のサイズは重要ではありません。これは、インジケータによる「描画」を特定の数のバーに 適切に制限する方法を理解するための例に過ぎません。 Victor Nikolaev 2013.07.07 13:39 #249 atztek: Y軸の線の大きさはこの場合問題ではありません。これは、インジケータによる「描画」を特定の数のバーに制限する方法を理解するための例に過ぎません。 。 インジケーターバッファと オブジェクトのどちらを使用するか? atztek 2013.07.07 13:44 #250 Vinin: インジケーターバッファとオブジェクトのどちらを使用するか? 将来的には直線だけでなく、移動平均線などにも利用できるようになるため、インジケーターバッファも 用意しました。 1...181920212223242526272829303132...1178 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
Цикл от самого "старого" бара к самому "свежему":
インジケーターを若干修正。小数点以下まで正しくカウントされます。例えば、あるセクションでインジケーターが11のはずなのに、11.58と表示されています。
何が問題なのでしょうか?
vniz_1, vniz_2が0より大きくなるようにした。指標となる線に隙間を作りました。隙間をつないで色を変える方法、ただし、この隙間での指標は計算 しない。
インジケーターを若干修正。小数点以下まで正しくカウントされます。例えば、あるセクションでインジケーターが11のはずなのに、11.58と表示されています。
何が問題なのでしょうか?
vniz_1, vniz_2が0より大きくなるようにした。指標となる線に隙間を作りました。隙間をつないで色を変える方法、ただし、この隙間での指標は計算しない。
存在しないバーでインジケータを計算する ?・・・・・・?
?!!??
最後の20バーだけ線を引くようにするにはどうしたらいいですか?
以下は、すべてのバーに対して水平線を引くシンプルなインジケーターのコードです。
最後の20バーだけ線を引くようにするにはどうしたらいいですか?
線は何と同じにすればいいのでしょうか?
線は何と同じにすればいいのでしょうか?
この場合、Y軸の線のサイズは重要ではありません。これは、インジケータによる「描画」を特定の数のバーに 適切に制限する方法を理解するための例に過ぎません。
Y軸の線の大きさはこの場合問題ではありません。これは、インジケータによる「描画」を特定の数のバーに制限する方法を理解するための例に過ぎません。
。
インジケーターバッファとオブジェクトのどちらを使用するか?
将来的には直線だけでなく、移動平均線などにも利用できるようになるため、インジケーターバッファも 用意しました。