以下是程序化交易的一段代码
IF ref(High,3)>ref(high,2) then
IF ref(High,3)>ref(high,4) then
begin
…………………………
IF ref(close,5)<ref(close,4) then
IF ref(close,4)<ref(close,3) then
IF ref(close,1)>ref(close,2) then
begin
buy(1,1,limit , open);
DRAWICON(1,High ,1,1); //开
end
end
………………
已经满足此条件,但不显示任何提示提示。运算模式为逐K线计算。图片我贴不上来,求哪位大侠给解释一下,是代码编写的问题还是其他什么原因。
以下为等价转换,既简单,条件又一目了然,楼主不妨一试
con1:ref(High,3)>ref(high,2) and ref(High,3)>ref(high,4),linethick0;
con2:ref(close,4)>ref(close,5) and ref(close,4)<ref(close,3) and ref(close,1)>ref(close,2),linethick0;
IF con1 and con2 then
begin
buy(1,1,limit,c);
DRAWICON(1,High ,1,1); //开
end
公式没错,条件不好满足而已,
CU12 11/24 14:50有信号
1分钟K线上信号多点
我试下
原来是这个样子,谢谢了!!!!