各位版上大神大家好
我有撰寫一則語法
if date <> date[1] then value1 = volume;
if volume > value1 then value1 = volume;
Input: Length(20), LowerBand(3);
settotalbar(Length + 3);
SetInputName(1, "期數");
SetInputName(2, "通道下緣");
value2=bollingerband(getfield("Close","5"),Length,1 * LowerBand);
value3=bollingerband(getfield("Close","5"),Length,-1 * LowerBand);
condition1 = time >=093000 and value1 > value1[1]; //0930以後且創新高。
condition2=close cross over value2 and GetQuote("漲跌幅")<7; //突破上軌且當前漲幅不超過7%
condition3=close cross under value3 and GetQuote("漲跌幅")>-7;//跌破下軌且當前跌幅不超過7%
condition4=GetSymbolInfo("買賣現沖")=true;//標的僅限當日可買賣現沖
condition5=c>100 and c<200;//目前股價位於100-200間
if condition1 and condition2 or condition3 and condition4 and condition5
then begin
ret=1;
end;
構想是在0930後若於盤中爆大量,且突破布林上軌且漲幅小於7%或跌破布林下軌且跌幅小於7%,且個股可買賣現沖時、股價位於100-200間即警示
但回測時卻跑不出東西,請問是有哪邊我沒注意到的嗎,謝謝大家~
2 評論