һ��“K������ģʽ”ת����“�̶���ѯģʽ”����“���ģʽ”�ķ���
�Ա�Ѹ���ģ�ͷ���ͬһ������ڽ���ͼ��������
������
���߽���ģ�ͣ�K������ģ�ͣ���
runmode:0;
ma5:=ma(c,5);
ma20:=ma(c,20);
entertime:=time>100000 and time<144500;
if holding>0 and ma5<ma20 then sell(1,1,market);
if holding<0 and ma5>ma20 then sellshort(1,1,market);
if holding=0 and ma5>ma20 and entertime then buy(1,1,market);
if holding=0 and ma5<ma20 and entertime then buyshort(1,1,market);
if time>=150000 then begin
sell(1,1,market);
sellshort(1,1,market);
end
�ĸķ�����Ȼ�ǰѸ�������“��ȥ��”���磺ma5 ��Ϊ ref(ma(c,5),1);�����ַ����������͵ġ����ӵ�ģ��ʱ�����׳���
�ɲ������ַ�������holding��ȫ�ֱ���cc�滻��Ȼ������ɫ���ִ��룬��ɫ���ִ���Ҫ�����ź�����ǰ�棺
runmode:0;
variable:cc=0;
ma5:=ma(c,5);
ma20:=ma(c,20);
entertime:=time>100000 and time<144500;
if holding>0 and cc<=0 then sell(1,1,limitr,o);
if holding<0 and cc>=0 then sellshort(1,1,limitr,o);
if holding=0 and cc>0 then buy(1,1,limitr,o);
if holding=0 and cc<0 then buyshort(1,1,limitr,o);
if cc>0 and ma5<ma20 then cc:=0;
if cc<0 and ma5>ma20 then cc:=0;
if cc=0 and ma5>ma20 and entertime then cc:=1;
if cc=0 and ma5<ma20 and entertime then cc:=-1;
if time>=150000 then begin
cc:=0;
end
��ô������� K������ģʽ������ģʽ���棬��ô���أ�Ҳ��������“���̼��µ����”���������ɫ���ֵ�“�����µ����”������
���£�
runmode:0;
variable:zs=0,cc=0;
ma5:=ma(c,5);
ma20:=ma(c,20);
entertime:=time>100000 and time<144500;
if holding>0 and cc<=0 then sell(1,1,limitr,o);
if holding<0 and cc>=0 then sellshort(1,1,limitr,o);
if holding=0 and cc>0 then buy(1,1,limitr,o);
if holding=0 and cc<0 then buyshort(1,1,limitr,o);
if cc>0 and l<zs then begin
sell(1,1,limitr,min(o,zs-0.6));
cc:=0;
end
if cc<0 and h>zs then begin
sellshort(1,1,limitr,max(o,zs+0.6));
cc:=0;
end
if cc>0 and ma5<ma20 then cc:=0;
if cc<0 and ma5>ma20 then cc:=0;
if cc=0 and ma5>ma20 and entertime then begin
cc:=1;
zs:=c-10;
end
if cc=0 and ma5<ma20 and entertime then begin
cc:=-1;
zs:=c+10;
end
if time>=150000 then begin
cc:=0;
end
ps:�ö������������ʲô���� ��Ҳ����˵�������õĽ����� �������� 0��һ��ʽ�� ͨ���Ŷ���������ͼָ�� ��һ��ʽ��ͨ���ž���ʱT+0ָ���ʱ��ͼ ��ͼ��ʲô���⣿�����ǽ��������ö��������|�����Ƽ�|�������� ͨ����423ͨ���š����������ͼ/ѡ�� ���ɱض��ϴ�5 ����ǿ�ƹ� ��������ʦ��Ʒ Դ�� ��ͼ�������︱ͼ���������ָ���õ�COST��������ϲ���¡�ʹ�÷���˵�����������ж�ֱ��...2025-09-11�����������