您现在的位置是:首页 > MultiCharts程序化 > MultiCharts策略MultiCharts策略
[转载]分形通道突破+考夫曼自适应移动均线+鳄鱼(金字塔)
龙听2021-06-07【MultiCharts策略】人已围观
简介分形通道突破
runmode:0;
sfx:=ref(high,1)ref(high,3);
xfx:= ref(low,1)>ref(low,2) and ref(low,2)
upperband:=valuewhen(sfx,ref(high,2));
lowerband:=valuewhen(xfx
分形通道突破
runmode:0;
sfx:=ref(high,1)ref(high,3);
xfx:= ref(low,1)>ref(low,2) and ref(low,2)
upperband:=valuewhen(sfx,ref(high,2));
lowerband:=valuewhen(xfx,ref(low,2));
exittime:=time>=150000;
if holding=0 then begin
if high>=upperband then
buy(1,1,limitr,max(open,upperband));
end
if holding=0 then begin
if low<=lowerband then
buyshort(1,1,limitr,min(open,lowerband));
end
if holding>0 then begin
if time>=150000 then
sell(1,holding,limitr,close);
end
if holding<0 then begin
if time>=150000 then
sellshort(1,holding,limitr,close);
end
盈亏:asset-50000,noaxis,colorred,linethick2;
--------------------------------
考夫曼自适应移动均线系统
runmode:0;
input:length1(10,5,60,5);
input:length2(5,5,60,5);
ama:=md(close,length1);
ama1:=ema(ama,length2);
entrylongcond:=ref(cross(ama,ama1),1);
entryshortcond:=ref(cross(ama1,ama),1);
if holding=0 then begin
if entrylongcond then
buy(1,1,limitr,open);
end
if holding=0 then begin
if entryshortcond then
buyshort(1,1,limitr,open);
end
if holding>0 then begin
if entryshortcond then begin
sell(1,holding,limitr,open);
buyshort(1,1,limitr,open);
end
end
if holding<0 then begin
if entrylongcond then begin
sellshort(1,holding,limitr,open);
buy(1,1,limitr,open);
end
end
盈亏:asset-50000,noaxis,colorred,linethick2;
--------------------------------
鳄鱼线与分形图
1 Y:=(H+L)/2;
2 AA:=REF((SMA(Y,5,1)),3);
3 BB:=REF((SMA(Y,8,1)),5);
4 CC:=REF((SMA(Y,13,1)),8);
5 MA1:=MA(CLOSE,5),COLORWHITE,LINETHICK3;
6 MA2:=MA(CLOSE,10),COLORYELLOW,LINETHICK3;
7 MA3:=MA(CLOSE,30),COLORDB7093,LINETHICK3;
8 鳄:CC,COLORFF6600;
9 齿:BB,COLORRED;
10 唇:AA,COLORGREEN;
11 R2:=REF(齿,5);
12 KU1:=IF(HIGH=HHV(HIGH,3),1,0);
13 KD1:=IF(LOW=LLV(LOW,3),1,0);
14 UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
15 DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
16 上分形:IF(HIGH>=R2,UL,REF(UL,BARSLAST(HIGH>R2))),POINTDOT,LINETHICK3,COLORMAGENTA;
17 下分形:IF(LOW<=R2,DL,REF(DL,BARSLAST(LOW<=R2))),POINTDOT,LINETHICK3,COLORYELLOW;
18
19 AO:=MA(Y,5)-MA(Y,34);
20 MAO:=MA(AO,5);
21 AC:=AO-MAO;
22 AC1:=REF(AC,1);
23 AO1:=REF(AO,1);
24 KAC:=IF(AC>AC1 AND AO>AO1,1,0);
25 KAO:=IF(AC<AC1 AND AO<AO1,-1,0);
26 STICKLINE(KAC=1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORRED;
27 STICKLINE(KAO=-1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORGREEN;
28 STICKLINE(KAO=0 AND KAC=0 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORDDDDDD;
29 STICKLINE(CLOSE>=OPEN,HIGH,CLOSE,0.0,1.0),COLORRED;
30 STICKLINE(CLOSE>=OPEN,OPEN,LOW,0.0,1),COLORRED;
31 STICKLINE(KAC=1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),COLORRED;
32 STICKLINE(KAO=-1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),COLORGREEN;
runmode:0;
sfx:=ref(high,1)ref(high,3);
xfx:= ref(low,1)>ref(low,2) and ref(low,2)
upperband:=valuewhen(sfx,ref(high,2));
lowerband:=valuewhen(xfx,ref(low,2));
exittime:=time>=150000;
if holding=0 then begin
if high>=upperband then
end
if holding=0 then begin
if low<=lowerband then
end
if holding>0 then begin
if time>=150000 then
end
if holding<0 then begin
if time>=150000 then
end
盈亏:asset-50000,noaxis,colorred,linethick2;
--------------------------------
考夫曼自适应移动均线系统
runmode:0;
input:length1(10,5,60,5);
input:length2(5,5,60,5);
ama:=md(close,length1);
ama1:=ema(ama,length2);
entrylongcond:=ref(cross(ama,ama1),1);
entryshortcond:=ref(cross(ama1,ama),1);
if holding=0 then begin
if entrylongcond then
end
if holding=0 then begin
if entryshortcond then
end
if holding>0 then begin
if entryshortcond then begin
end
end
if holding<0 then begin
if entrylongcond then begin
end
end
盈亏:asset-50000,noaxis,colorred,linethick2;
--------------------------------
鳄鱼线与分形图
1 Y:=(H+L)/2;
2 AA:=REF((SMA(Y,5,1)),3);
3 BB:=REF((SMA(Y,8,1)),5);
4 CC:=REF((SMA(Y,13,1)),8);
5 MA1:=MA(CLOSE,5),COLORWHITE,LINETHICK3;
6 MA2:=MA(CLOSE,10),COLORYELLOW,LINETHICK3;
7 MA3:=MA(CLOSE,30),COLORDB7093,LINETHICK3;
8 鳄:CC,COLORFF6600;
9 齿:BB,COLORRED;
10 唇:AA,COLORGREEN;
11 R2:=REF(齿,5);
12 KU1:=IF(HIGH=HHV(HIGH,3),1,0);
13 KD1:=IF(LOW=LLV(LOW,3),1,0);
14 UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
15 DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
16 上分形:IF(HIGH>=R2,UL,REF(UL,BARSLAST(HIGH>R2))),POINTDOT,LINETHICK3,COLORMAGENTA;
17 下分形:IF(LOW<=R2,DL,REF(DL,BARSLAST(LOW<=R2))),POINTDOT,LINETHICK3,COLORYELLOW;
18
19 AO:=MA(Y,5)-MA(Y,34);
20 MAO:=MA(AO,5);
21 AC:=AO-MAO;
22 AC1:=REF(AC,1);
23 AO1:=REF(AO,1);
24 KAC:=IF(AC>AC1 AND AO>AO1,1,0);
25 KAO:=IF(AC<AC1 AND AO<AO1,-1,0);
26 STICKLINE(KAC=1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORRED;
27 STICKLINE(KAO=-1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORGREEN;
28 STICKLINE(KAO=0 AND KAC=0 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORDDDDDD;
29 STICKLINE(CLOSE>=OPEN,HIGH,CLOSE,0.0,1.0),COLORRED;
30 STICKLINE(CLOSE>=OPEN,OPEN,LOW,0.0,1),COLORRED;
31 STICKLINE(KAC=1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),COLORRED;
32 STICKLINE(KAO=-1 AND CLOSE<OPEN,OPEN,CLOSE,3,0),COLORGREEN;
很赞哦! ()
上一篇:[转载]漫谈期货套利策略
随机图文
-
[转载]會換檔的交易系統_恆溫器Thermostat交易系統
海龟交易系统(文华用 技术指标 主图) 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, -
R-Breaker交易系统模型原理说明及示意图
R-Breaker是一种短线交易策略,它结合了趋势和反转两种交易方式。交易系统的基本原理如下: 1. 根据前一个交易日的收盘价、最高价和最低价数据通过一定方式计算出六个价位,从大 -
[转载]结合数学模型的网格交易法
上世纪四十年代的某一天,信息论之父申农在黑板上给大家演示:任何一个价位买进资金的50%,也就是说资金数量:股票市值=50%:50%。股票价格上涨一定幅度就卖出一部分股票,保持剩余的资 -
[转载]四周规则----最著名也最成功的技术(Z)
四周规则----最著名也最成功的技术 在我们设计跟踪趋势系统的时候,除了移动平均线外,也有别的选择。其中最著名也最成功的技术之一,称为周价格管道,或简称周规则。本方法也