ジグザグ
Results 1 to 2 of 2

Thread: ジグザグ

  1. #1
    こんにちは、

    誰でも私を言うことができます、なぜStoploss(_low [shift])は働かないのですか?
    私はそれをインジケータとして作ってみると、高シフトと低シフトはうまくいくが、専門家ではない...そしてもし(ビッドgt; = _high [i])ドン `t正しい

    どうも

    挿入されたコード// --------------------------------------------- --------------------- /| .mq4 |/|著作権©2005-2007、MetaQuotes Software Corp. |/| http://www.metaquotes.net/|/ ----------------------------------------------- ------------------- #property著作権©2007、MetaQuotes Software Corp.#プロパティー・リンクhttp://www.metaquotes.net/extern double Lots = 0.1; extern double TrailingStop = 30;/----インジケータパラメータextern int ExtDepth = 12; extern int ExtDeviation = 5; extern int ExtBackstep = 3;/----インジケータバッファdouble buffer#91;#93 ;; double HighMapBuffer#91;#93 ;;ダブルLowMapBuffer#91;#93 ;;ダブル_high#91;#93 ;;ダブル_low#91;#93 ;;ダブルラスキー;ダブルラストロー; int level = 3;/recountingの深さbool downloadhistory = false;/ ----------------------------------------------- ------------------- /|カスタムインジケータ初期化関数|/ ----------------------------------------------- ------------------- int init(){IndiorBuffers(7);/----描画設定//SetIndexStyle(0、DRAW_SECTION);/SetIndexStyle(3、DRAW_LINE);/----インジケータバッファマッピングSetIndexBuffer(0、Buffer); SetIndexBuffer(1、HighMapBuffer); SetIndexBuffer(2、LowMapBuffer); SetIndexBuffer(3、lasthigh); SetIndexBuffer(4、lastlow); SetIndexBuffer(5、_high); SetIndexBuffer(6、_low); SetIndexEmptyValue(0,0.0);/----インジケータショートネームIndiorShortName(ジグザグ( ExtDepth 、 ExtDeviation 、 ExtBackstep ));/----初期化が完了したreturn(0); }/ ---------------------------------------------- -------------------- /| |/ ----------------------------------------------- ------------------- int start(){int i、counted_bars = IndiorCounted(); int limit、counterZ、whatlookfor; int shift、back、lasthighpos、lastlowpos;ダブルval、res;ダブルcurlow、curhigh; int cnt、チケット、合計; if(counted_bars == 0* downloadhistory *)//履歴がダウンロードされた{ArrayInitialize(Buffer、0.0); ArrayInitialize(HighMapBuffer、0.0); ArrayInitialize(LowMapBuffer、0.0); } if(counted_bars == 0){limit = Bars-ExtDepth; downloadhistory = true; } if(counted_barsgt; 0){while(counterZlt; level ilt; 100){res =バッファ#91; i#93 ;; if(res!= 0)counterZ ;私は ; } 私 - ;限界= i; if(LowMapBuffer#91; i#93;!= 0){curlow = LowMapBuffer#91; i#93 ;; whatlookfor = 1; } else {curhigh = HighMapBuffer#91; i#93 ;; whatlookfor = -1; }(i =限界-1; igt; = 0; i--){バッファ#91; i#93; = 0.0; LowMapBuffer#91; i#93; = 0.0; HighMapBuffer#91; i#93; = 0.0; }} for(shift = limit; shiftgt; = 0; shift--){val = Low#91; iLowest(NULL、0、MODE_LOW、ExtDepth、shift)#93 ;;もし(val == lastlow)val = 0.0; else {lastlow = val; if((Low#91; shift#93; - val)gt;(ExtDeviation * Point))val = 0.0; else {for(back = 1; backlt; = ExtBackstep;バック ){res = LowMapBuffer#91; shift back#93 ;;もし、((res!= 0)(resgt; val))LowMapBuffer#91; shift back#93; = 0.0; (Low#91; shift#93; == val)LowMapBuffer#91;シフト#93; = val;そうでなければLowMapBuffer#91;シフト#93; = 0.0;/ハイバリュー=ハイ#91; iHighest(NULL、0、MODE_HIGH、ExtDepth、shift)#93 ;; if(val == lasthigh)val = 0.0; else {lasthigh = val; if((val-High#91; shift#93;)gt;(ExtDeviation * Point))val = 0.0; else {for(back = 1; backlt; = ExtBackstep;バック ){res = HighMapBuffer#91; shift back#93 ;; if((res!= 0)(reslt; val))HighMapBuffer#91; shift back#93; = 0.0; (ハイ#91;シフト#93; ==バリュー)HighMapBuffer#91;シフト#93; = val; else HighMapBuffer#91; shift#93; = 0.0; }/最終的な切断if(whatlookfor == 0){lastlow = 0;ラスティ= 0; } else {lastlow = curlow; lasthigh = curhigh; } for(shift = limit; shiftgt; = 0; shift--){res = 0.0; (ハイ・マップバッファー#91;シフト#93;!= 0){lasthigh = High#91; shift# 93; lasthighpos = shift; whatlookfor = -1;バッファー#91;シフト#93; =ラスジー; res = 1; }(LowMapBuffer#91; shift#93;!= 0){lastlow = Low#91; shift#93 ;; lastlowpos = shift; whatlookfor = 1;バッファ#91;シフト#93; = lastlow; res = 1; }}ブレーク; case#1://LowmapBuffer#91; shift#93;!= 0.0 LowMapBuffer#91; shift#93; lt; lastlow HighMapBuffer#91; shift#93; == 0.0){buffer#91; lastlowpos #93; = 0.0; lastlowpos = shift; lastlow = LowMapBuffer#91;シフト#93 ;;バッファ#91;シフト#93; = lastlow; res = 1; }(ハイマップバッファ#91;シフト#93;!= 0.0ローマップバッファ#91;シフト#93; == 0.0){lasthigh = HighMapBuffer#91; shift#93 ;; lasthighpos = shift;バッファー#91;シフト#93; =ラスジー; whatlookfor = -1; res = 1; }ブレーク; (HighMapBuffer#91; shift#93;!= 0.0 HighMapBuffer#91; shift#93; gt; lasthigh LowMapBuffer#91; shift#93; == 0.0){緩衝液#91;塩基代謝#93; = 0.0; lasthighpos = shift; lasthigh = HighMapBuffer#91; shift#93 ;;バッファー#91;シフト#93; =ラスジー; }(lowMapBuffer#91; shift#93;!= 0.0 HighMapBuffer#91; shift#93; == 0.0){lastlow = LowMapBuffer#91; shift#93 ;; lastlowpos = shift;バッファ#91;シフト#93; = lastlow; whatlookfor = 1; }ブレーク;デフォルト:return; }/switch(whatlookfor)}/for(shift = limit; shiftgt; = 0; shift--)total = OrdersTotal(); if(totallt; 1){_high#91; i#93; = lasthigh; _low#91; i#93; = lastlow; OrderSend(Symbol()、OP_BUY、Lots、Ask、3、_low#91; i#93;、0、Long、1,0、Green);それ以外の場合は、OrderSend(Symbol()、OP_SELL、Lots、Bid、3,0,0、Short、1,0、Red); if(Bid lt; =#91; shift#93; } return(0); }/ ---------------------------------------------- --------------------

  2. #2
    誰でもMT 4のインジケータにジグザグを入れる方法を教えてください。感謝します?ありがとう。

投稿権限

  • Youma新しいスレッドを投稿しない
  • Youmaは返信しない
  • あなたは添付ファイルを投稿しないかもしれない
  • Youma Notedityourposts
  •  
  • スマイリーはオンです
  • スマイリーはオンです
  • [IMG]コードがオンです
  • [VIDEO]コードがオンです
  • HTMLコードがオフです
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.