請協助策略雷達

  •   111 
  • 最後發表   阿狗QAZ  2022 九月 22
阿狗QAZ 發文於   2022/09/15

想用開盤大於前一天收盤且過五分低點及低於平盤價通知

使用上有些在盤中破平盤卻無通知,是哪沒寫好嗎?

請協助

 

IF  date<>date[1] then value1=0; //跨日清零

  IF Time=090000 then

   begin

     value1 = low; //取得當天0900~0905的最低價

     value2 = getfield("close","5")[1];

     value3 = getfield("開盤價","5");

     Value4 = GetQuote("成交");

   end;

IF  Time>=090500 and close < value1 

   and 

    value3 > value2 //開盤大於昨日收盤

   and

    value4 < value2  //成交價低過平盤

   then ret=1; 

排序方式: 標準 | 最新
musashi 發文於   2022/09/15

應該是這樣,先試試看吧

IF  date<>date[1] then value1=0; //跨日清零
IF  Time=090500 then value1=getfield("low","5")[1];
IF  Time>=090500 
and close < value1//成交價低於0900~0905的最低價
and close < getfield("參考價","D")//成交價低過平盤
and getfield("open","D") > getfield("參考價","D")//開盤大於昨日收盤
then ret=1;

  • 按讚來自於
  • qaz3115
XQ小幫手 發文於   2022/09/22

Hello 阿狗QAZ,

 

您可以參考 musashi 的回覆。

小幫手另外補充,GetField 可以取得不同頻率的資訊,所以可以用來取得日頻率的資料。

GetQuote是用來取得報價欄位,由於報價欄位不支援回測,所以建議您若有可替代的資料欄位的話,優先使用資料欄位。(ex. GetQuote("成交") = close)

 

感謝 musashi 的熱心回覆。

發表回覆
Close