想詢問小編
已經爬過文 但找不到相關的問題
目前有一個估計量暴增的XS腳本 內容如下 想找出盤中估計量暴增的股票
value1 = GetField("估計量");
condition1 = value1 > (GetField("Volume", "D")[1] * 2);
condition2 = value1 > average(GetField("Volume", "D")[1], 5);
condition3 = value1 > average(GetField("Volume", "D")[1], 60);
if condition1 or condition2 or condition3 then ret = 1;
編譯都沒有問題~但沒辦法回測去測試 盤中也測試過幾次 但都沒有反應及通知 不知道我是哪部分有寫錯?
我目前有一個網友分享過的策略~我覺得很不錯滿好用的 突破高點的策略
input:HitTimes(3,"設定觸頂次數");
input:RangeRatio(1,"設定頭部區範圍寬度%");
input:Length(20,"計算期數");
settotalbar(Length + 3);
variable: theHigh(0);
theHigh = Highest(High[1],Length);
//找到過去其間的最高點
variable: HighLowerBound(0);
HighLowerBound = theHigh *(100-RangeRatio)/100;
// 設為瓶頸區間上界
variable: TouchRangeTimes(0);
//回算在此區間中 進去瓶頸區的次數
TouchRangeTimes = CountIF(High[1] > HighLowerBound, Length);
if TouchRangeTimes >= HitTimes and close > theHigh then ret=1;
想請問小編 我想要寫一個相反的策略(突破底部) 我修改過後盤中測試 跳出來的結果都不太對 想請小邊幫我看下是哪個部份寫錯了 如下圖 感謝
input:HitTimes(3,"設定觸頂次數");
input:RangeRatio(1,"設定頭部區範圍寬度%");
input:Length(20,"計算期數");
settotalbar(Length + 3);
variable: thelow(0);
theLow = lowest(low[1],Length);
variable: LowUpperBound(0);
LowUpperBound = theLow *(100+RangeRatio)/100;
variable: TouchRangeTimes(0);
TouchRangeTimes = CountIF(Low[1] > LowUpperBound, Length);
if TouchRangeTimes >= HitTimes and close > thelow then ret=1;
然後請問一下小編 想找尋當日盤中CDP指標 碰觸到賣出點 及買進點 的股票去進行通知 該如何去寫XS呢 因看板上沒人分享 想請問一下小編 感謝 麻煩了

4 評論