请问信号过滤可以限制只过滤今天的交易信号么
日内交易的话,只过滤当天的交易信号
怎么写只过滤当天的交易信号源码啊
比如:
if cross(uk,close) and time>092500 and time<150000 and filter(cross(uk,close),10) then begin
buyshort(holding>=0,1);
end
这里过滤10根,5分钟K线的,那有时候有可能10根K线以前是昨天的信号了,导致今天碰到同样的信号不开仓了,被过滤了,怎么使得交易信号过滤只对今天的K线有效
//只过滤今天的交易信号,加入以下红色部分
N:=barslast(date<>ref(date,1))+1;//当天有几根K线
if cross(uk,close) and time>092500 and time<150000 and filter(cross(uk,close),min(10,N)) then begin
buyshort(holding>=0,1);
end