こんにちは、みんな、
誰かがこれで私を助けてくださいできますか?
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);
}
// ----------------------------------------------- -------------------