等级: 免费版
- 注册:
- 2021-11-18
- 曾用名:
|

楼主 |
发表于 2022-8-25 17:14
|
显示全部楼层
VARIABLE:up:=0,down:=0;
N:=60;
movavg:=ma(close,N);
len:= Intpart(N/3);
mark := 1;
maN:ma(c,N);
if c>maN then
begin
up:=up+1;
down:=0;
end
if c<maN then
begin
up:=0;
down:=down+1;
end
check_len:= N-len;
/
//黄色光标停在这里,说语句缺少分号,是for语句有问题吗?
FOR i = 1 to check_len DO
BEGIN
if ref(up,i)>=len or ref(down,i)>= len THEN
BEGIN
mark :=0
break;
END
END
补充内容 (2022-8-25 17:18):
我是按照版主的程序,然后想回溯当前的40根(里面用check_len表示),看看每根上面记录的数字,有没有大于20的,有的话,就设置mark=0.
那么结果就是mark=1时候,符合,mark=0时候,不符合
补充内容 (2022-8-25 17:49):
是 if ref(up,i)>=len or ref(down,i)>= len THEN 这里没有加括号
加上后就好了 |
|