請問如何表述連續10天低于10日均價
作者:開拓者 TB 來源:cxh99.com 發布時間:2022年06月20日
-
咨詢內容:
請問如何表述連續10天低于10日均價?在文華財經里有函數 Every(close,10)<Ma10,請問開拓者里怎么表述?不勝感激
?
?來源:CXH99.COM
-
TB技術人員:
使用countif就可以了
- Params
- ? ? ? ?
- Vars
- ? ? ? ? NumericSeries ma10;
- ? ? ? ? Numeric count;
- ? ? ? ? Bool isLow;
- Begin
- ? ? ? ? If(!CallAuctionFilter()) Return;
- ? ? ? ? ma10 = Average(Close,10);
- ? ? ? ? PlotNumeric("ma10",ma10);
- ? ? ? ? isLow = Close < ma10;
- ? ? ? ? If(isLow){
- ? ? ? ? ? ? ? ? PlotString("isLow","L",Low,Red);
- ? ? ? ? }
- ? ? ? ? count = CountIf(isLow,10);
- ? ? ? ? If(count == 10){
- ? ? ? ? ? ? ? ? PlotString("isOk","Y",High,Yellow);
- ? ? ? ? }
- End
復制代碼?
-
TB客服:
zbzdsk 發表于 2019-11-16 16:28
使用countif就可以了
謝謝啦,我以前用文華,現在用TB,以后多交流