Q1:布林軌道選股策略- 收盤價小於上軌且大於中軌, BBand width 小於10% ,選完之後還是無法濾掉大於10%的股票 請問該如何修改程式碼?
input: BBandLength(12), UpperBand(2), LowerBand(2);
settotalbar(BBandLength + 10);
SetInputName(1, "期數");
SetInputName(2, "通道上緣");
SetInputName(3, "通道下緣");
Value4 = bollingerband(Close, BBandLength, UpperBand) - bollingerband(Close, BBandLength, LowerBand);
Value5 = 100 * (value4 / BBandLength) ; //BBand width
if close >= BBandLength and close < bollingerband(Close, BBandLength, UpperBand) and value5 < 10 then ret = 1;
4 評論