至少要用30分钟周期的K线图:
逐K线模式,勾选仅刷最后K线
globalvariant:yestoday10C=0,today10C=0,BF;
if time()=100000 then
begin
yestoday10C:=today10C;
today10C:=close;
end;
if time()=140000 then
begin
BF:=(close-yestoday10C)*100.0/yestoday10C;//BF是波幅,1表示1%
end;
哦,那可能要更复杂一点了,可以用hhv,llv来获得一段周期内的最高和最低价,减下来获得波动区间,你需要通过time判断当前K线时间,在每天14点这个K线上计算波幅。
但提醒你注意,hhv和llv不要放到if里面,可以写在最前面