文华财经海龟交易系统

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

文华财经海龟交易系统模型源码[文华财经公式]

===============================================================

A:=REF(HHV(H,20),1);

B:=REF(LLV(L,20),1);

AA:=REF(HHV(H,10),1);

BB:=REF(LLV(L,10),1);

CROSS(H,A),BK;//突破20高点开多仓

CROSS(AA,H),SP;//跌破10低点平仓

CROSS(B,L),SK;//突破20低点开空仓

CROSS(BB,L),BP;//上传10高点平仓

C:=CLOSE;

O:=OPEN;

H:=HIGH;

L:=LOW;

STICKLINE(O>=C,C,O,COLORCYAN,0);

DRAWLINE(O>=C,H,O>=C,L,COLORCYAN);

STICKLINE(C>=O,C,O,COLORRED,1);

DRAWLINE(C>=O,C,C>=O,H,COLORRED);

DRAWLINE(C>=O,L,C>=O,O,COLORRED);

LC:=REF(CLOSE,1);

TR:=MAX((HIGH - LOW),MAX((HIGH - LC),(LC - LOW)));

ATR:=SMA(TR,20,1);

AA:=(HHV(HIGH,N1) - (2 * ATR));

BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));

SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);

BBB:=BARSLAST(BB)-1;

SSSB:=BARSLAST(SSS)-1;

B1:=((BBB = 0) && (REF(SSSB,1) < REF(BBB,1)));

B1B:=BARSLAST(B1);

B2:=((((BB = 1) && (B1B < SSSB)) && (B1B > 0)) && (COUNT(BB,SSSB) < 3)); B2B:=BARSLAST(B2);

B3:=((((BB = 1) && (B2B < B1B)) && (COUNT(BB,SSSB) < 4)) &&

(COUNT(BB,SSSB) > 2));

B3B:=BARSLAST(B3);

SS:=CROSS(MAX(AA,MA(CLOSE,13)),CLOSE);

SS1:=(((SS && ((B3B < B2B) || (B2B < B1B))) && (SSSB > B1B)) && (COUNT(SS,B2B) < 2));

SS1B:=BARSLAST(SS1);

SS2:=((((SS && (SS1B < SSSB)) && (B3B < B2B)) && (SS1B > 0)) && (COUNT(SS,B2B) < 3));

SSSS:=(SSS && (REF(SSSB,1) > REF(B1B,1)));

DRAWTEXT((B1 = 1),(LOW - 0.25),'买1/2');

DRAWTEXT((B2 = 1),(LOW - 0.25),'买2/3');

DRAWTEXT((B3 = 1),(LOW - 0.25),'买1/3');

DRAWTEXT((SS1 = 1),(HIGH + 0.25),' 卖100%');

DRAWTEXT((SS2 = 1),(HIGH + 0.25),' 卖100%');

DRAWTEXT((SSSS = 1),(HIGH + 0.25),' 卖100%');

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,COLORCYAN,0);

DRAWLINE(OPEN>=CLOSE,HIGH,OPEN>=CLOSE,LOW,COLORCYAN);

STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,COLORRED,1);

DRAWLINE(CLOSE>=OPEN,CLOSE,CLOSE>=OPEN,HIGH,COLORRED);

DRAWLINE(CLOSE>=OPEN,LOW,CLOSE>=OPEN,OPEN,COLORRED);

LC:=REF(CLOSE,1);

TR:=MAX((HIGH - LOW),MAX((HIGH - LC),(LC - LOW)));

ATR:=SMA(TR,20,1);

AA:=(HHV(HIGH,N1) - (2 * ATR));

BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));

SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);

BBB:=BARSLAST(BB)-1;

SSSB:=BARSLAST(SSS)-1;

B1:=((BBB = 0) && (REF(SSSB,1) < REF(BBB,1)));

B1B:=BARSLAST(B1);

B2:=((((BB = 1) && (B1B < SSSB)) && (B1B > 0)) && (COUNT(BB,SSSB) < 3)); B2B:=BARSLAST(B2); B3:=((((BB = 1) && (B2B < B1B)) && (COUNT(BB,SSSB) < 4)) && (COUNT(BB,SSSB) > 2));

B3B:=BARSLAST(B3);

SS:=CROSS(MAX(AA,MA(CLOSE,13)),CLOSE);

相关文档
最新文档