value1 = nthhighest(1,high[1],5); //日線
condition1 = (o+close)/2 > value1 and close > average(close,100) ;
if condition1
then ret = 1;
value1 = nthhighest(1,high[1],5); //日線
condition1 = (o+close)/2 > value1 and close > average(close,100) ;
if condition1
then ret = 1;
Hello OOwen,
請問您是使用選股還是雷達,如果是選股的話無法盤中觸發。
雷達要改用分鐘頻率的話,您的腳本其實可以直接用在分鐘頻率上。
需要跨頻率的話,可以使用 GetField 來取用其他頻率的資訊。
舉例來說:
setbackbar(101, "D"); //設定夠長的引用筆數
value1 = getfield("High", "D")[1]; //前日最高
condition1 = (getfield("Open", "D") + close) / 2 > value1 and close > average(getfield("Close", "D"), 100);
if condition1 then ret = 1;
1 評論