外汇论坛 外兔财经

开启左侧

有谁能看懂这段程序------vt 的

[复制链接]
发表于 2005-12-17 16:05 | 显示全部楼层 |阅读模式
https://www.y2cn.com
有哪位大侠能指点,不胜感激!!!

一个很好交易系统,想做一下修改,但看不懂程序不知道命令怎么用?




VT-Fractal Trading System

以下是程序:

{Up and Down Level Fractal}

F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2));

F2:=ValueWhen(1,L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2));

{Cross Up and Down Level Fractal}

a:=Cross(H,F1);
b:=Cross(F2,L);

state:=BarsSince(a)<BarsSince(b);

{Signal Long and Short}

ShortSignal:= state < Ref(state,-1);
LongSignal:= state > Ref(state,-1);

{Trend Up and Down}

UpTrend:=state>0;
DownTrend:=state<1;

{OpenBuy and CloseBuy}

OpenBuy:=LongSignal and (eventCount('OpenBuy')= eventCount('CloseBuy'));
CloseBuy:= ShortSignal and (eventCount('OpenBuy')>eventCount('CloseBuy'));

{OpenSell and CloseSell}

OpenSell:=  ShortSignal and (eventCount('OpenSell')= eventCount('CloseSell'));
CloseSell:=  LongSignal and (eventCount('OpenSell')>eventCount('CloseSell'));
发表于 2005-12-18 12:29 | 显示全部楼层
呵呵,不懂也来关税

本版积分规则

QQ|手机版 Mobile Version|Archiver|关于我们 About Us|联系我们 Contact Us|Y2外汇论坛 外兔财经

GMT+8, 2025-4-20 14:50 , Processed in 0.047742 second(s), 23 queries .

Powered by Discuz! X7.2

Copyright © 2001-2021, Tencent Cloud.

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