易得程序化交易技术论坛

登录 | 注册

积分: 0 |用户组: 游客

搜索
查看: 1725|回复: 0

请教这个飞狐写法如何改成易得,谢谢!

[复制链接]

5

主题

15

帖子

411

积分

中级会员

Rank: 3Rank: 3

积分
411
发表于 2023-4-7 16:27:30 | 显示全部楼层 |阅读模式
本帖最后由 whckin 于 2023-4-7 16:35 编辑



EHH:=HIGH>REF(HIGH,1);
ELL:=LOW<REF(LOW,1);
ESARL:=(MA(LLV(LOW,4),2)+EMA(LOW,3)*1.5)/2.5;
ESARH:=(MA(HHV(HIGH,4),2)+EMA(HIGH,3)*1.5)/2.5;
ESART:=LOW;
FEC:=CLOSE;
FEH:=HIGH;
FEL:=LOW;
<%

vc=ffl.vardata("fec")
vh=ffl.vardata("feh")
vl=ffl.vardata("fel")
vhh=ffl.vardata("Ehh")
vll=ffl.vardata("Ell")

vsarh=ffl.vardata("Esarh")
vsarl=ffl.vardata("Esarl")
vsart=ffl.vardata("Esart")
vcc=ffl.vardata("Ehh")
vee=ffl.vardata("Ell")
last=ubound(vc)

vsart(1)=vsarl(1)
vcc(1)=0.02
vee(1)=0.02
vcc1=0
vee1=0

for i=2 to last
if vc(i-1)>= vsart(i-1) and vsarl(i) > vsart(i-1)  then
         vsart(i)=vsarl(i)
   elseif   vc(i-1) >= vsart(i-1) and vsarl(i) <= vsart(i-1)  then  vsart(i)=vsart(i-1)
   elseif   vc(i-1) <  vsart(i-1) and  vsarh(i) < vsart(i-1)  then vsart(i)=vsarh(i)
   elseif   vc(i-1) < vsart(i-1) and vsarh(i) >= vsart(i-1)  then vsart(i)=vsart(i-1)
end if




if  vc(i-1) >= vsart(i-1) and  vc(i) < vsart(i) then
                  vsart(i)=vh(i-1)

        else
                vcc1=1
        end if
if  vc(i-1) < vsart(i-1) and  vc(i) >= vsart(i) then
          vsart(i)=vl(i-1)
     else
           vee1=1
     end if

next


ffl.vardata("Esart")=vsart
%>
ESARTA:=ESART;
QWSARL:=(EMA(LOW,9)+EMA(LOW,8))/2;
QWSARH:=(EMA(HIGH,9)+EMA(HIGH,8))/2;
QWSART:=LOW;
FQWC:=CLOSE;
FQWH:=HIGH;
FQWL:=LOW;
<%

vc=ffl.vardata("fqwc")
vh=ffl.vardata("fqwh")
vl=ffl.vardata("fqwl")
vsarh=ffl.vardata("qwsarh")
vsarl=ffl.vardata("qwsarl")
vsart=ffl.vardata("qwsart")
vcc=ffl.vardata("fqwc")
vee=ffl.vardata("fqwc")
last=ubound(vc)


vsart(1)=vsarl(1)
vcc(1)=0.02
vee(1)=0.02
vcc1=0
vee1=0


for i=2 to last
if vcc1=0 then vcc(i)=0.020
if vcc1=1 then vcc(i)=vcc(i-1)+0.0170
if vcc1=2 then vcc(i)=vcc(i-1)
if  vcc(i)>0.150 then vcc(i)=0.15


if vee1=0 then vee(i)=0.020
if vee1=1 then vee(i)=vee(i-1)+0.0170
if vee1=2 then vee(i)=vee(i-1)
if  vee(i)>0.15 then vee(i)=0.15


if vc(i-1)>= vsart(i-1) and vh(i) > vh(i-1)  then
         vsart(i)=vsart(i-1)+(vl(i)-vsart(i-1))*vcc(i)*1.05

   elseif   vc(i-1) >= vsart(i-1) and vh(i) <= vh(i-1) then  vsart(i)=vsart(i-1)+(vh(i)-vsart(i-1))*vcc(i)*0.85
   elseif   vc(i-1) <  vsart(i-1) and  vl(i) < vl(i-1)  then vsart(i)=vsart(i-1)-abs(vh(i)-vsart(i-1))*vee(i)*1.05
   elseif   vc(i-1) < vsart(i-1) and vl(i) >= vl(i-1)  then vsart(i)=vsart(i-1)-abs(vl(i)-vsart(i-1))*vee(i)*0.85
end if


if  vc(i-1) >= vsart(i-1) and  vc(i) < vsart(i) then
                vcc1=0
                vee1=0
                vsart(i)=vsarh(i-1)
       elseif vc(i-1) >= vsart(i-1) and vh(i) <= vh(i-1) then vcc1=2
      else
               vcc1=1
      end if
if  vc(i-1) < vsart(i-1) and  vc(i) >= vsart(i) then
           vee1=0
           vcc1=0
           vsart(i)=vsarl(i-1)
      elseif vc(i-1) < vsart(i-1) and vl(i) >= vl(i-1) then vee1=2
     else
           vee1=1
     end if


next
ffl.vardata("qwsart")=vsart
%>
QWSARTA:=QWSART;
AB:=(QWSART+QWSART)/2;


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|易得程序化 ( 粤ICP备2022064048号 )

GMT+8, 2025-5-3 23:27 , Processed in 0.052834 second(s), 18 queries .

快速回复 返回顶部 返回列表