誰かがこのコードで私を助けてくれますか? 。 。 。
Results 1 to 5 of 5

Thread: 誰かがこのコードで私を助けてくれますか? 。 。 。

  1. #1
    こんにちは、みんな、

    誰かがこれで私を助けてくださいできますか?

    Alertがポップアップする条件が満たされると、バーの期間中、数秒ごとにポップアップが維持されます。これを1時間のチャートで実行しますが、アラートウィンドウを強制的にポップアップ表示し続けます。

    また、私はそれをポップアップ(私は一度だけ通知されている)を停止することができますので、条件が真である場合、3バー時間でトリガされている場合は、アラートをリセットします。

    もし誰かが私を助けてくれればそれを感謝します。

    よろしく
    スティーブ



    // ----------------------------------------------- -------------------
    //| My_First_Indior.mq4 |
    //|
    http://www.forex-tsd.com|
    // ----------------------------------------------- -------------------
    #property copyright Steve Dawson
    #property indior_separate_window
    #property indior_buffers 2
    #property indior_color1赤
    #property indior_color2緑
    //----バッファ
    double ExtMapBuffer1 [];
    double ExtMapBuffer2 [];
    bool buf_alert_already_triggered;
    // ----------------------------------------------- -------------------
    //|カスタムインジケータ初期化関数|
    // ----------------------------------------------- -------------------
    int init()
    {
    //----インジケータ
    SetIndexStyle(0、DRAW_HISTOGRAM、EMPTY、3);
    SetIndexBuffer(0、ExtMapBuffer1);
    SetIndexStyle(1、DRAW_HISTOGRAM、EMPTY、3);
    SetIndexBuffer(1、ExtMapBuffer2);
    文字列short_name = MAX - アラート付きOBOSヒストグラム!
    IndiorShortName(short_name);
    return(1);
    }
    // ----------------------------------------------- -------------------
    //|カスターインジケータの初期化解除機能|
    // ----------------------------------------------- -------------------
    int deinit()
    {
    //----
    //----
    return(0);
    }
    // ----------------------------------------------- -------------------
    //|カスタムインジケータ反復関数|
    // ----------------------------------------------- -------------------
    int start()
    {
    int counted_bars = IndiorCounted();
    //----可能なエラーをチェックする
    if(counted_barslt; 0)は、(-1)を返します。
    //----最後にカウントされたバーが再計算されます
    if(counted_barsgt; 0)counted_bars--;
    int pos = Bars-counted_bars;
    double dVal、dLow、dResult、value;
    コメント(こんにちは、私はメインのチャートウィンドウにいます!);
    //---- ArrayBsearchをロードするためのメイン計算ループ
    一方、(posgt; = 0)
    {
    dVal = iCustom(NULL、0、J_TPO、13,0、pos);
    if(dVal gt; 0)
    {
    dResult = 1;
    }
    else
    {
    dResult = -1;
    }

    //これは色が設定されている場所です
    if(dResult == 1)
    {
    ExtMapBuffer2 [pos] = dResult;
    }
    else
    {
    ExtMapBuffer1 [pos] = dResult;
    }



    //ExtMapBuffer1 [pos] = dResult;
    pos = pos-1;
    }
    //----バッファがロードされました

    //今すぐ警告する
    if((ExtMapBuffer1 [0] == 1)||(ExtMapBuffer2 [0] == 1))((ExtMapBuffer1 [1] == -1)||(ExtMapBuffer2 [1] == -1))) (buf_alert_already_triggered == 0))
    {
    アラート(Symbol()、on、Period()、チャートの購入可能);
    buf_alert_already_triggered = 1;
    } else
    {
    buf_alert_already_triggered = 0;
    }

    if(((ExtMapBuffer1 [0] == -1)||(ExtMapBuffer2 [0] == -1))((ExtMapBuffer1 [1] == 1))||(ExtMapBuffer2 [1] == 1)) (buf_alert_already_triggered == 0))
    {
    アラート(可能な、シンボル()、オン、期間()、チャートのためのSELL);
    buf_alert_already_triggered = 1;
    } else
    {
    buf_alert_already_triggered = 0;
    }
    //----
    return(0);
    }
    // ----------------------------------------------- -------------------

  2. #2
    KEN'ICHI
    Guest
    この部分はそれを0に戻しています} else {buf_alert_already_triggered = 0; }あなたはそれを変更する必要があります

  3. #3
    おかげでトムは今、素晴らしい作品です。あなたが気にしないならもう1つの質問。たとえば10バーでアラートが発生した場合、再びトリガーされるはずです。次のバーで変数がリセットされるか、プラットフォームを再起動するまでアラートは再び機能しませんか?ありがとうスティーブ

  4. #4
    KEN'ICHI
    Guest
    あなたはそれを0に戻す何らかの方法が必要です

  5. #5
    #プロパティーインジケータ_チャート_ウインドウ#プロパティーインジケータ_バッファー#プロパティーインジケータ_カラー1マゼンタ#プロパティーインジケータ_カラー2アクア#プロパティーインジケータ_カラー3マゼンタ#プロパティーインジケータ_カラー4アクア#プロパティーインジケータ_カラー5マゼンタ#プロパティーインジケータ_カラー6アクア#プロパティーインジケータ_カラー6マゼンタ#特性_インジケータ_カラー8アクア//----入力パラメータextern double stoch_period = 9; extern double stoch_max = 53; extern double stoch_min = 47; extern double atr_current_norm_factor = 0.435; extern double atr_before_norm_factor = 1.5; extern double atr_period = 7; extern int atr_before_step = 1; extern int NumBars = 10000;/すべてのインジケータ値を表示する場合は、これを0に設定します。原因のメモリをもっと使用します//---- buffers double sell_stop_dot_buf [];ダブルbuy_stop_dot_buf [];ダブルsell_stop_line_buf [];ダブルbuy_stop_line_buf [];ダブルsell_signal_buf [];ダブルbuy_signal_buf []; double down_buf [];ダブルup_buf []; int init(){SetIndexStyle(0、DRAW_ARROW); SetIndexArrow(0,115); SetIndexBuffer(0、sell_stop_dot_buf); SetIndexLabel(0、sell_stop_dot); SetIndexEmptyValue(0、EMPTY_VALUE); SetIndexStyle(1、DRAW_ARROW); SetIndexArrow(1,115); SetIndexBuffer(1、buy_stop_dot_buf); SetIndexLabel(1、buy_stop_dot); SetIndexEmptyValue(1、EMPTY_VALUE); SetIndexStyle(2、DRAW_LINE); SetIndexBuffer(2、sell_stop_line_buf); SetIndexLabel(2、sell_stop_line); SetIndexEmptyValue(2、EMPTY_VALUE); SetIndexStyle(3、DRAW_LINE); SetIndexBuffer(3、buy_stop_line_buf); SetIndexLabel(3、buy_stop_line); SetIndexEmptyValue(3、EMPTY_VALUE); SetIndexStyle(4、DRAW_ARROW); SetIndexArrow(4,108); SetIndexBuffer(4、sell_signal_buf); SetIndexLabel(4、sell_signal); SetIndexEmptyValue(4、EMPTY_VALUE); SetIndexStyle(5、DRAW_ARROW); SetIndexArrow(5,108); SetIndexBuffer(5、buy_signal_buf); SetIndexLabel(5、buy_signal); SetIndexEmptyValue(5、EMPTY_VALUE); SetIndexStyle(6、DRAW_HISTOGRAM); SetIndexBuffer(6、down_buf); SetIndexLabel(6、down_trend); SetIndexStyle(7、DRAW_HISTOGRAM); SetIndexBuffer(7、up_buf); SetIndexLabel(7、up_trend); } int start(){double stoch_current、atr_current_normalised、atr_before_normalised; double value3、value4、value5、val1、val2、close_diff、r; int flag1、flag2;/ペアがすぐに落ちると、flags = 1になります。 Stochはstoch_minより下で、Closesのdiffはatr_current_normalisedを超えています。/ペアがすぐに上がるとフラグ= 2になります。 Stochはstoch_maxより大きく、Closesのdiffはatr_current_normalisedを超えています。 if(NumBars == 0)intシフト=バー - MathMax(stoch_period、atr_period); else shift = MathMax(バー、NumBars) - MathMax(stoch_period、atr_period); while(shiftgt; = 0){atr_current_normalised = iATR(NULL、0、atr_period、shift)* atr_current_norm_factor; atr_before_normalised = atr_before_norm_factor * iATR(NULL、0、atr_period atr_before_step、shift);stoch_current = iSchchastic(NULL、0、stoch_period、stoch_period、1,0,0,0、shift); val1 = 0; val2 = 0; value4 =高い[shift] atr_before_normalised;値5 =ロー[シフト] - atr_before_normalised; close_diff = MathAbs(閉じる[シフト] - 閉じる[シフト 2]);/処理が急激に低下する(close_diff gt; atr_current_normalised)if(stoch_current lt; stoch_min flag1!= 1)//ペアが急速に降下する{value3 = High [shift] atr_before_normalised4;フラグ1 = 1; val1 = value3; r = value3; sell_signal_buf [シフト] =値3; sell_stop_line_buf [シフト] =値3; }} else if(stoch_current gt; stoch_max flag1!= 2)//ペアはすぐに上がる{value3 = Low [shift] - atr_before_normalised4;フラグ1 = 2; val2 = value3; r = value3; buy_signal_buf [シフト] =値3; buy_stop_line_buf [シフト] =値3; }/小さな小滴を処理する(val1 == 0 val2 == 0)//switch(flag1){case1:if(value4 lt; r){r = value4; } sell_stop_dot_buf [shift] = r; sell_stop_line_buf [シフト] = r;ブレーク;ケース2:if(value5 gt; r){r = value5; } buy_stop_dot_buf [shift] = r; buy_stop_line_buf [シフト] = r;ブレーク; } if(close_diff gt; atr_current_normalised){if(stoch_current lt; stoch_min); flag2 = 1; else if(stoch_current gt; stoch_max)flag2 = 2; } {if(close_diff gt; atr_current_normalised){down_buf [shift] = High [shift];}} {if_status_min_flag} up_buf [shift] =ロー[shift]; }} else if((stoch_current gt; stoch_max flag2 == 2)||(stoch_current gt; stoch_max flag2 == 0)){up_buf [shift] = High [shift]; down_buf [shift] =ロー[shift]; }/------------------------------------------シフト - ; }}

投稿権限

  • 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.