請問專業幫手(7)策略雷達腳本問題

  •   106 
  • 最後發表   施先生  2022 八月 24
施先生 發文於   2022/08/19

請教策略雷達 盤中警示 程式如何撰寫?
觸發條件如下:
MACD 1分鐘
1. OSC連續3次增加
2. 且OSC當次>0

3.且估計量>10000張
4.且單量>10張

5.且分鐘收盤價>SMA5

以上麻煩您請指教!

 

排序方式: 標準 | 最新
XQ小幫手 發文於   2022/08/24

Hello 施先生,

 

您可以參考 TrueAll 函數。

簡單範例:

input: FastLength(12), SlowLength(26), MACDLength(9);

variable: difValue(0), macdValue(0), oscValue(0);

 

MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);

value1 = average(close, 5);

 

condition1 = trueall(oscValue > oscValue[1], 3);

condition2 = oscValue > 0;

condition3 = GetField("估計量") > 10000;

condition4 = GetField("Volume", "Tick") > 10;

condition5 = close > value1;

 

if condition1 and condition2 and condition3 and condition4 and condition5 then ret = 1;

 

小幫手建議您可以先看看網站上的教學區,裡面有XS語法的基礎和應用可以閱覽,應該可以解決您的問題。

施先生 發文於   2022/08/24

非常謝謝您!

 

發表回覆
Close