小幫手您好 以下是我的腳本
if barfreq <> "Min" or Barinterval <> 2 then RaiseRuntimeError("請設定頻率為2分鐘");
var:highfrequency(0);//紀錄當日兩分k上影次數
if issessionFirstBar then begin highfrequency = 0; end;//每日重置變數
if close <= high*0.994 and GetQuote("振幅") >= 2.5 and high[1] < high and
high[2] < high and
high >= GetField("收盤價", "D")[1]*1.02//紀錄上影線 且前兩根high必須小於當根high
then dhighfrequency += 1;
我腳本是希望寫出 頻率兩分鐘上影線 然後上影線前面必須至少要兩根k棒的high小於當根high
然後至少要有三根有這種條件的上影 可是我有問題的是 我想要這三根上影線的high 都在正負1%內
三根上影線的高點相差不能超過1% 可是問題來了 有辦法紀錄上影線 但我不知道要怎麼寫出
每根上影線high的數值
1 評論