Loading...
2016年10月24日 星期一

Multicharts關鍵字說明:警示Alerts


專業服務請指定楊恭臨,multicharts,64位元程式交易,圖表交易,期貨手續費,選擇權手續費,高頻交易,智慧下單,手機開戶,線上開戶,網路開戶,multicharts函數,multicharts指標,multicharts訊號,fintech期貨機器人,multicharts程式交易,程式交易實戰班,esignal程式交易,機械化交易


Multicharts關鍵字:Alerts彈出警示視窗提示
用法:alert會在K棒收棒後判斷條件是否成立

範例
開啟桌面的Multicharts Powerlanguage,點選開新檔案>>指標>>鍵入範例程式碼:
If Close > Close[1] then alert;
當根K棒收盤價大於前根K棒的收盤價時,Multicharts右下角會彈出黃底的警報視窗;


Multicharts關鍵字:AlertEnabled忘記開啟警報時發出通知

用法
AlertEnabled

範例
開啟桌面的Multicharts Powerlanguage,點選開新檔案>>指標>>鍵入範例程式碼:
var: ID(-1);
If AlertEnabled=False And LastBarOnChart_S=True Then
ID = Text_New_S(Date, Time_S, Low, "Alerts are disabled. See Format Study > Properties > Alerts");



Multicharts關鍵字:Cancel Alert取消警報

用法
Cancel Alert

範例
開啟桌面的Multicharts Powerlanguage,點選開新檔案>>指標>>鍵入範例程式碼:
10:00pm之後,警報不會顯示,關閉所有警報。
If Close > Close[1] Then
Alert("Price is going up");
If Volume > Volume[1] Then
Alert("Volume is increasing");
If Volatility(5) > Volatility(5)[1] Then
Alert("Volatility is rising");
If OpenInt > OpenInt[1] Then
Alert("Open interest is growing");
If Time >= 1000 Then Cancel Alert;



Multicharts關鍵字:CheckAlert

用法
CheckAlert
如果指標設定啟用警報時,則CheckAlert返回 TrueTrue/False只在最後一根Bar返回。AlertEnabled CheckAlert的不同:AlertEnabled在每一個Bar都會執行, CheckAlert 只會在最後一根Bar執行。警報只在最後一根Bar產生。

範例
If CheckAlert Then Begin
If Volume >= 2 * Average(Volume, 10) Then
Alert ("Volume is going up");
End;


If CheckAlert Then Begin
If Volume >= 2 * Average(Volume, 10) Then
Alert ("Volume is going up");
End;


If Close > Close[1] Then
Alert("Price is going up");
If Volume > Volume[1] Then
Alert("Volume is increasing");
If Volatility(5) > Volatility(5)[1] Then
Alert("Volatility is rising");
If OpenInt > OpenInt[1] Then
Alert("Open interest is growing");
If Time >= 1000 Then Cancel Alert;


var: ID(-1);
If AlertEnabled=False And LastBarOnChart_S=True Then
ID = Text_New_S(Date, Time_S, Low, "Alerts are disabled. See Format Study > Properties > Alerts");



0 意見:

張貼留言

 
TOP