蝴蝶形态-下跌形态源码编写,黄金分割公式预测高点!
<p data-track="1"><strong>蝴蝶形态-下跌形态源码编写,黄金分割公式预测高点!</strong></p><p class="pgc-img-caption">蝴蝶形态分为上涨形态和下跌形态2种</p><p data-track="2"><strong>具体而言,蝴蝶形态分为上涨形态和下跌形态2种,</strong></p><p class="pgc-img-caption">八戒蝴蝶形态主图</p><p data-track="3"><strong><span >源码</span>编写需要满足<span >条件</span>如下:</strong></p><blockquote><p data-track="4"><span >1、要想选定蝴蝶形态的X、A、B、C的位置,就需要先做出高低点</span></p><p data-track="5"><span >2、蝴蝶形态——上涨形态中X、A、B、C这4个点需要满足的条件是:A>C、B>X、C>B、0.382<XB<0.886</span></p><p data-track="6"><span >3、蝴蝶形态——下跌形态中X、A、B、C这4个点需要满足的条件是:X>B、C>A、B>C、0.382<XB<0.886</span></p></blockquote><p data-track="7"><strong>上期的文章基于蝴蝶形态编写了第1个和第2条件,本期按照第3个条件编写源码。</strong></p><p data-track="8"><br></p><p class="pgc-img-caption"></p><p data-track="9"><strong>1、我们要基于条件1找到4个点X-A-B-C,需要手动输入K线序号标注,<span >源码</span>如下:</strong></p><blockquote><p data-track="10">蝴蝶形态X:=243;{数值可调}</p><p data-track="24">蝴蝶形态A:=165;{数值可调}</p><p data-track="25">蝴蝶形态B:=138;{数值可调}</p><p data-track="26">蝴蝶形态C:=126;{数值可调}</p></blockquote><p class="pgc-img-caption"></p><p data-track="14"><strong>2、蝴蝶形态的下跌形态中X、A、B、C这4个点需要满足的条件是:X2>B2、C2>A2、B2>C2、0.382<XB2<0.886,<span >源码</span>如下:</strong></p><p data-track="22"><strong>3、找准蝴蝶形态的下跌形态中4个点X、A、B、C后,会自动生成绿色连接线和预测多个买点D1、D2、D3、D4(<span >没有找准4个点就不会自动生成红色连接线和预测买点</span>),<span >源码</span>如下:</strong></p><pdata-track="23"><strong><span >4、完整的蝴蝶形态——下跌形态模型源码分享:(请先把源码复制到WORD文档排序,再从WORD文档中复制源码):</span></strong></p><blockquote><p data-track="28">蝴蝶形态X:=243;{数值可调}</p><p data-track="29">蝴蝶形态A:=165;{数值可调}</p><p data-track="30">蝴蝶形态B:=138;{数值可调}</p><p data-track="31">蝴蝶形态C:=126;{数值可调}</p><p data-track="32">八戒趋势:=1;</p><p data-track="33">AR1:=BARSCOUNT(C);</p><p data-track="34">AR2:=CONST(AR1);</p><p data-track="35">AR3:=AR2-AR1;</p><p data-track="36">K线根数:AR3+1,NODRAW,COLORYELLOW;</p><p data-track="37">AAG111:=REF(H,3)=HHV(H,2*6+1);</p><p data-track="38">AB111:=FILTER(AAG111,3);</p><p data-track="39">AC111:=BACKSET(AB111,3+1);</p><p data-track="40">AD111:=FILTER(AC111,3+1);</p><p data-track="41">AA112:=REF(L,3)=LLV(L,2*6+1);</p><p data-track="42">AB112:=FILTER(AA112,3+1);</p><p data-track="43">AC112:=BACKSET(AB112,3+1);</p><p data-track="44">AD112:=FILTER(AC112,3);</p><p data-track="45">AE111:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2;</p><p data-track="46">AE112:=(H+L)/2;</p><p data-track="47">AH111:=(AD111 AND NOT(AD112 AND AE111>=AE112)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p data-track="48">AL111:=(AD112 AND NOT(AD111 AND AE111<AE112));</p><p data-track="49">AH112:=AD111 AND NOT(AD112 AND AE111>=AE112);</p><p data-track="50">AX111:=REF(BARSLAST(AH111),1)+1;</p><p data-track="51">AF111:=BACKSET(AH111 AND COUNT(AL111,AX111)>0,LLVBARS(IF(AL111,LOW,10000),AX111));</p><p data-track="52">AG111:=AF111>REF(AF111,1);</p><p data-track="53">AI111:=BACKSET(AG111,2);</p><p data-track="54">ALD:=AI111>REF(AI111,1);</p><p data-track="55">AL112:=ALD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p data-track="56">AX112:=REF(BARSLAST(AL112),1)+1;</p><p data-track="57">AF112:=BACKSET(AL112 AND COUNT(AH112,AX112)>0,HHVBARS(IF(AH112,HIGH,0),AX112));</p><p data-track="58">AG112:=AF112>REF(AF112,1);</p><p data-track="59">AI112:=BACKSET(AG112,2);</p><p data-track="60">AHD:=AI112>REF(AI112,1);</p><p data-track="61">IF(八戒趋势=1,DRAWLINE(ALD,L,AHD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR0000FF;</p><p data-track="62">IF(八戒趋势=1,DRAWLINE(AHD,H,ALD,L,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR00FF00;</p><p data-track="63">J111:=BACKSET(BARSTATUS=2 ,MIN(BARSLAST(AHD),BARSLAST(ALD))+1);</p><p data-track="64">J112:=J111>REF(J111,1);</p><p data-track="65">DRAWTEXT_FIX(1,0.95,0.01,1,'【伀|衆|号】游资八戒:“要想选定蝴蝶形态的X、A、B、C的位置,就需要先做出高低点,八戒做的“K线序号”主图可看到各高低点的K线序号值,由蓝色和咖啡色数字标注'),COLORYELLOW;</p><p data-track="66">DRAWTEXT_FIX(1,0.75,0.04,1,'然后按ALT+F键,弹出参数调整窗,将各个点的K线根数值填进相应的【蝴蝶形态X-A-B-C栏】,填好后点关闭窗口即可。'),COLORYELLOW;</p><p data-track="67">DRAWTEXT_FIX(1,0.55,0.07,1,'选点的要求: 反弹后的看跌形态符合X2>B2、C2>A2、B2>C2、0.382<XB2<0.886。'),COLORYELLOW;</p><p data-track="68">预测走势:IF(八戒趋势=1,DRAWLINE(J112,IF(AHD,H,L),BARSTATUS=2,IF(BARSLAST(AHD)>BARSLAST(ALD),H,L),0),DRAWNULL),COLORYELLOW,DOTLINE;</p><p data-track="69">K:=CURRBARSCOUNT,NODRAW;</p><p data-track="70">DRAWNUMBER(八戒趋势=1 AND AHD,H,K),COLORLIRED,DRAWABOVE;</p><p data-track="71">DRAWNUMBER(八戒趋势=1 AND ALD,L,K),COLORFFFF00;</p><p data-track="72">QG2:=REF(H,蝴蝶形态X-1);</p><p data-track="73">QL2:=REF(L,蝴蝶形态A-1);</p><p data-track="74">HG2:=REF(H,蝴蝶形态B-1);</p><p data-track="75">HL2:=REF(L,蝴蝶形态C-1);</p><p data-track="76">XB2:(HG2-QL2)/(QG2-QL2),COLORYELLOW,NODRAW;</p><p data-track="77">VVH5:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.886,QG2,DRAWNULL),NODRAW;</p><p data-track="78">VVH6:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.886,QL2,DRAWNULL),NODRAW;</p><p data-track="79">VVH7:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.886,HG2,DRAWNULL),NODRAW;</p><p data-track="80">VVH8:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.886,HL2,DRAWNULL),NODRAW;</p><p data-track="81">CL2:=VVH5 AND VVH6 AND VVH7 AND VVH8,NODRAW;</p><p data-track="82">卖出成立:CL2,COLORGREEN,NODRAW;</p><p data-track="83">QG2A:=IFC(CL2,QG2,DRAWNULL);</p><p data-track="84">HG2A:=IFC(CL2,HG2,DRAWNULL);</p><p data-track="85">QL2A:=IFC(CL2,QL2,DRAWNULL);</p><p data-track="86">HL2A:=IFC(CL2,HL2,DRAWNULL);</p><p data-track="87">VARB:=(HG2A-HL2A),NODRAW;</p><p data-track="88">VAR5:=HL2A+(VARB*1.618),NODRAW;</p><p data-track="89">VAR6:=HL2A+(VARB*2.000),NODRAW;</p><p data-track="90">VAR7:=HL2A+(VARB*2.240),NODRAW;</p><p data-track="91">VAR8:=HL2A+(VARB*2.618),NODRAW;</p><p data-track="92">卖D1:DRAWLINE(CURRBARSCOUNT=(蝴蝶形态C), CONST(VAR5), CURRBARSCOUNT=1,CONST(VAR5),1),COLORGREEN,DOTLINE;</p><p data-track="93">卖D2:DRAWLINE(CURRBARSCOUNT=(蝴蝶形态C), CONST(VAR6), CURRBARSCOUNT=1,CONST(VAR6),1),COLORGREEN,DOTLINE;</p><p data-track="94">卖D3:DRAWLINE(CURRBARSCOUNT=(蝴蝶形态C), CONST(VAR7), CURRBARSCOUNT=1,CONST(VAR7),1),COLORGREEN,DOTLINE;</p><p data-track="95">卖D4:DRAWLINE(CURRBARSCOUNT=(蝴蝶形态C), CONST(VAR8), CURRBARSCOUNT=1,CONST(VAR8),1),COLORGREEN,DOTLINE;</p><p data-track="96">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态C,卖D1,VARCAT('卖D1=',VAR2STR(卖D1,3))),COLORYELLOW;</p><p data-track="97">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态C,卖D2,VARCAT('卖D2=',VAR2STR(卖D2,3))),COLORYELLOW;</p><p data-track="98">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态C,卖D3,VARCAT('卖D3=',VAR2STR(卖D3,3))),COLORYELLOW;</p><p data-track="99">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态C,卖D4,VARCAT('卖D4=',VAR2STR(卖D4,3))),COLORYELLOW;</p><p data-track="100">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态X,H,VARCAT('前高X2【XB2】=',VAR2STR(CONST(XB2),3))),COLORRED;</p><p data-track="101">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态A,L,VARCAT('前低【A2】',VAR2STR(L,2))),COLORGREEN;</p><p data-track="102">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态B,H,VARCAT('后高【B2】',VAR2STR(H,2))),COLORMAGENTA;</p><p data-track="103">DRAWTEXT(CURRBARSCOUNT=蝴蝶形态C,L,VARCAT('后低【C2】',VAR2STR(L,2))),COLORFF8800;</p><p data-track="104">IFC(CL2,DRAWLINE(CURRBARSCOUNT=(蝴蝶形态X),H,CURRBARSCOUNT=(蝴蝶形态A),L,0),DRAWNULL)COLORGREEN,LINETHICK3;</p><p data-track="105">IFC(CL2,DRAWLINE(CURRBARSCOUNT=(蝴蝶形态A),L,CURRBARSCOUNT=(蝴蝶形态B),H,0),DRAWNULL)COLORGREEN,LINETHICK3;</p><p data-track="106">IFC(CL2,DRAWLINE(CURRBARSCOUNT=(蝴蝶形态B),H,CURRBARSCOUNT=(蝴蝶形态C),L,0),DRAWNULL)COLORGREEN,LINETHICK3;</p><p data-track="107">IFC(CL2,DRAWLINE(CURRBARSCOUNT=(蝴蝶形态X),H,CURRBARSCOUNT=(蝴蝶形态B),H,0),DRAWNULL)COLORMAGENTA,DOTLINE;</p><p data-track="108">IFC(CL2,DRAWLINE(CURRBARSCOUNT=(蝴蝶形态C),L,CURRBARSCOUNT=(蝴蝶形态C-8),卖D4,0),DRAWNULL)COLORMAGENTA,DOTLINE;</p><p data-track="109">DRAWLINE(CURRBARSCOUNT=(蝴蝶形态B),H,CURRBARSCOUNT=(蝴蝶形态C),(卖D4),0),COLORMAGENTA,DOTLINE;</p><p data-track="110">STICKLINE(CURRBARSCOUNT=(蝴蝶形态C),L,CONST(VAR8),0,-1),COLORMAGENTA;</p><p data-track="111">DRAWICON(CURRBARSCOUNT=蝴蝶形态X,H,39);</p><p data-track="112">DRAWICON(CURRBARSCOUNT=蝴蝶形态A,L,38);</p><p data-track="113">DRAWICON(CURRBARSCOUNT=蝴蝶形态B,H,39);</p><p data-track="114">DRAWICON(CURRBARSCOUNT=蝴蝶形态C,L,38);</p></blockquote> 只为积分!感谢! 我是为了获得花花! 太棒了吧,真的很好 my god!好东西! 尝试一下
页:
[1]