 | |  | | 有哪位大侠能指点,不胜感激!!!
一个很好交易系统,想做一下修改,但看不懂程序不知道命令怎么用?
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')); |  |  |  |  |
|