FO:=OPEN;
FH:=HIGH;
FL:=LOW;
FC:=CLOSE;
<%
vo=ffl.vardata("fo")
vh=ffl.vardata("fh")
vl=ffl.vardata("fl")
vc=ffl.vardata("fc")
last=ubound(vc)
vc(0)=(vh(0)+vl(0)+2*vc(0))/4
for i=1 to last
vo(i)=(vo(i-1)+vc(i-1))/2
if vo(i)>vh(i) then vh(i)=vo(i) else vh(i)=vh(i)
if vo(i)<vl(i) then vl(i)=vo(i) else vl(i)=vl(i)
vc(i)=(2*vc(i)+vh(i)+vl(i))/4
next
ffl.vardata("fo")=vo
ffl.vardata("fh")=vh
ffl.vardata("fl")=vl
ffl.vardata("fc")=vc
%>
KK:=IF(FC>=FO AND (FC>=REF(FC,1) OR REF(FC,1)>=REF(FO,1)),1,IF(FC<FO AND (FC<REF(FO,1) OR REF(FC,1)<REF(FO,1)),-1,0));
STICKLINE(FC>FO,FH,FL,4,0),colorAA;
STICKLINE(FC>FO,FH,FL,3.5,0),color11BB;
STICKLINE(FC>FO,FH,FL,2.5,0),color22CC;
STICKLINE(FC>FO,FH,FL,1.5,0),color33DD;
STICKLINE(FC>FO,FH,FL,1,0),color44EE;
STICKLINE(FC>FO,FH,FL,0.5,0),color55FF;
STICKLINE(FO>FC,FH,FL,4,0),colorAA0000;
STICKLINE(FO>FC,FH,FL,3.5,0),colorBB0000;
STICKLINE(FO>FC,FH,FL,2.5,0),colorCC0000;
STICKLINE(FO>FC,FH,FL,1.5,0),colorDD0000;
STICKLINE(FO>FC,FH,FL,1,0),colorEE0000;
STICKLINE(FO>FC,FH,FL,0.5,0),colorFF0000;
STICKLINE(KK=1 AND FC>=FO,FO,FC,8,0),colorAA;
STICKLINE(KK=1 AND FC>=FO,FO,FC,7.5,0),color11BB;
STICKLINE(KK=1 AND FC>=FO,FO,FC,6.5,0),color22CC;
STICKLINE(KK=1 AND FC>=FO,FO,FC,5.5,0),color33DD;
STICKLINE(KK=1 AND FC>=FO,FO,FC,4,0),color44EE;
STICKLINE(KK=1 AND FC>=FO,FO,FC,3.5,0),color55FF;
STICKLINE(KK=1 AND FC<FO,FO,FC,8,0),colorAA;
STICKLINE(KK=1 AND FC<FO,FO,FC,7.5,0),color11BB;
STICKLINE(KK=1 AND FC<FO,FO,FC,6.5,0),color22CC;
STICKLINE(KK=1 AND FC<FO,FO,FC,5.5,0),color33DD;
STICKLINE(KK=1 AND FC<FO,FO,FC,4,0),color44EE;
STICKLINE(KK=1 AND FC<FO,FO,FC,3.5,0),color55FF;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,8,0),colorAA0000;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,7.5,0),colorBB0000;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,6.5,0),colorCC0000;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,5.5,0),colorDD0000;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,4,0),colorEE0000;
STICKLINE(KK=-1 AND FC>=FO,FO,FC,3.5,0),colorFF0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,8,0),colorAA0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,7.5,0),colorBB0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,6.5,0),colorCC0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,5.5,0),colorDD0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,4,0),colorEE0000;
STICKLINE(KK=-1 AND FC<FO,FO,FC,3.5,0),colorFF0000;
STICKLINE(KK=0 AND FC>=FO,FO,FC,8,0),colorAA;
STICKLINE(KK=0 AND FC>=FO,FO,FC,7.5,0),color11BB;
STICKLINE(KK=0 AND FC>=FO,FO,FC,6.5,0),color22CC;
STICKLINE(KK=0 AND FC>=FO,FO,FC,5.5,0),color33DD;
STICKLINE(KK=0 AND FC>=FO,FO,FC,4,0),color44EE;
STICKLINE(KK=0 AND FC>=FO,FO,FC,3.5,0),color55FF;
STICKLINE(KK=0 AND FC<FO,FO,FC,8,0),colorAA;
STICKLINE(KK=0 AND FC<FO,FO,FC,7.5,0),color11BB;
STICKLINE(KK=0 AND FC<FO,FO,FC,6.5,0),color22CC;
STICKLINE(KK=0 AND FC<FO,FO,FC,5.5,0),color33DD;
STICKLINE(KK=0 AND FC<FO,FO,FC,4,0),color44EE;
STICKLINE(KK=0 AND FC<FO,FO,FC,3.5,0),color55FF;
多空趋势线:(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,15)+MA(CLOSE,20))/4,colorFF;
PARTLINE(多空趋势线>=REF(多空趋势线,1),多空趋势线),LINETHICK3,colorFF;
PARTLINE(多空趋势线<REF(多空趋势线,1),多空趋势线),LINETHICK3,colorFF00;
A1:=BARSLAST(CROSS(FC,多空趋势线) AND 多空趋势线>=REF(多空趋势线,1) OR FC>多空趋势线 AND 多空趋势线>=REF(多空趋势线,1) AND REF(多空趋势线,1)<REF(多空趋势线,2));
A2:=BARSLAST(CROSS(多空趋势线,FC) AND 多空趋势线<REF(多空趋势线,1) OR FC<多空趋势线 AND 多空趋势线<REF(多空趋势线,1) AND REF(多空趋势线,1)>=REF(多空趋势线,2));
DRAWTEXT(CROSS(A2,A1),FL,’▲’),ALIGN0,PXDN20,colorFF;
DRAWTEXT(CROSS(A2,A1),FL,’买进讯号’),ALIGN0,PXDN60,colorFF;
DRAWTEXT(CROSS(A1,A2),FH,’▼’),ALIGN0,PXUP20,colorFF0000;
DRAWTEXT(CROSS(A1,A2),FH,’卖出讯号’),ALIGN0,PXUP60,colorFF0000;
EXPLAINICON(CLOSE,’xnkl’),ALIGN0;
EXPLAIN(CLOSE,STKNAME),colorFFFF;
EXPLAIN(REF(KK,1)<>1 AND KK=1,’多头加码讯号〔蓝K转红K〕’),colorFF;
EXPLAIN(REF(KK,1)<>-1 AND KK=-1,’空头加码讯号〔红K转蓝K〕’),colorFF00;
A01:=MA(CLOSE,20);
A02:=CLOSE>MA(CLOSE,5);
A03:=MA(CLOSE,5)>MA(CLOSE,10);
A04:=CLOSE>MA(CLOSE,10);
A05:=MA(CLOSE,5)>MA(CLOSE,20);
A06:=CLOSE>MA(CLOSE,20);
A07:=REF(A01,1);
A08:=A01>A07;
AVX:=IF(A02,10,-10)+IF(A03,10,-10)+IF(A04,10,-10)+IF(A05,10,-10)+IF(A06,10,-10)+IF(A08,10,-10);
DSLX:=CLOSE/INDEXC;
DSLX1:=MA(DSLX,5);
DSLX2:=MA(DSLX,10);
V1:=MA(VOL,5);
V2:=MA(VOL,10);
阻力位:=IF(CLOSE>200,CLOSE*1.01,CLOSE*1.07);
阻力位1:=IF(CLOSE<10,CLOSE*1.05,阻力位);
止损位:=IF(CLOSE>200,CLOSE*0.99,CLOSE*0.93);
止损位1:=IF(CLOSE<10,CLOSE*0.95,止损位);
情况1:=CROSS(AVX,1) AND V1>=V2 AND DSLX>=DSLX1;
情况2:=CROSS(AVX,1) AND V1<V2 AND DSLX>=DSLX1;
情况3:=CROSS(AVX,1) AND V1>V2 AND DSLX<DSLX1;
情况4:=CROSS(AVX,1) AND V1<=V2 AND DSLX<DSLX1;
情况5:=CROSS(1,AVX) AND V1>=V2 AND DSLX>=DSLX1;
情况6:=CROSS(1,AVX) AND V1<V2 AND DSLX>=DSLX1;
情况7:=CROSS(1,AVX) AND V1>=V2 AND DSLX<DSLX1;
情况8:=CROSS(1,AVX) AND V1<V2 AND DSLX<DSLX1;
情况9:=AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX>=DSLX1;
情况10:=AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX>=DSLX1;
情况11:=AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND DSLX<DSLX1;
情况12:=AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND DSLX<DSLX1;
情况13:=AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX>=DSLX1;
情况14:=AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX>=DSLX1;
情况15:=AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND DSLX<DSLX1;
情况16:=AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND DSLX<DSLX1;
大盘1:=CROSS(AVX,1) AND V1>=V2;
大盘2:=CROSS(AVX,1) AND V1<V2;
大盘3:=CROSS(1,AVX) AND V1>=V2;
大盘4:=CROSS(1,AVX) AND V1<V2;
大盘5:=AVX>=1 AND REF(AVX,1)>0 AND V1>=V2;
大盘6:=AVX>=1 AND REF(AVX,1)>0 AND V1<V2;
大盘7:=AVX<1 AND REF(AVX,1)<0 AND V1>=V2;
大盘8:=AVX<1 AND REF(AVX,1)<0 AND V1<V2;
EXPLAINICON(情况1 AND CLOSE<200,’q001′),ALIGN0;
EXPLAINEX(情况1 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(情况1 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(情况2 AND CLOSE<200,’q002′),ALIGN0;
EXPLAINEX(情况2 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(情况2 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(情况3 AND CLOSE<200,’q003′),ALIGN0;
EXPLAINEX(情况3 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(情况3 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(情况4 AND CLOSE<200,’q004′),ALIGN0;
EXPLAINEX(情况4 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(情况4 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(情况5 AND CLOSE<200,’q005′),ALIGN0;
EXPLAINEX(情况5 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(情况5 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(情况6 AND CLOSE<200,’q006′),ALIGN0;
EXPLAINEX(情况6 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(情况6 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(情况7 AND CLOSE<200,’q007′),ALIGN0;
EXPLAINEX(情况7 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(情况7 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(情况8 AND CLOSE<200,’q008′),ALIGN0;
EXPLAINEX(情况8 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(情况8 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(情况9 AND CLOSE<200,’q009′),ALIGN0;
EXPLAINEX(情况9 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(情况9 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(情况10 AND CLOSE<200,’q010′),ALIGN0;
EXPLAINEX(情况10 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(情况10 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(情况11 AND CLOSE<200,’q011′),ALIGN0;
EXPLAINEX(情况11 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(情况11 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(情况12 AND CLOSE<200,’q012′),ALIGN0;
EXPLAINEX(情况12 AND CLOSE<200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(情况12 AND CLOSE<200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(情况13 AND CLOSE<200,’q013′),ALIGN0;
EXPLAINEX(情况13 AND CLOSE<200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(情况13 AND CLOSE<200,’止损位:’,止损位1,2,1);
EXPLAINICON(情况14 AND CLOSE<200,’q014′),ALIGN0;
EXPLAINEX(情况14 AND CLOSE<200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(情况14 AND CLOSE<200,’止损位:’,止损位1,2,1);
EXPLAINICON(情况15 AND CLOSE<200,’q015′),ALIGN0;
EXPLAINEX(情况15 AND CLOSE<200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(情况15 AND CLOSE<200,’止损位:’,止损位1,2,1);
EXPLAINICON(情况16 AND CLOSE<200,’q016′),ALIGN0;
EXPLAINEX(情况16 AND CLOSE<200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(情况16 AND CLOSE<200,’止损位:’,止损位1,2,1);
EXPLAINICON(情况1 AND CLOSE>200,’q017′),ALIGN0;
EXPLAINEX(大盘1 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(大盘1 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(大盘2 AND CLOSE>200,’q018′),ALIGN0;
EXPLAINEX(大盘2 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFF;
EXPLAINEX(大盘2 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFF;
EXPLAINICON(大盘3 AND CLOSE>200,’q019′),ALIGN0;
EXPLAINEX(情况3 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(情况3 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(大盘4 AND CLOSE>200,’q020′),ALIGN0;
EXPLAINEX(大盘4 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFF00;
EXPLAINEX(大盘4 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFF00;
EXPLAINICON(大盘5 AND CLOSE>200,’q021′),ALIGN0;
EXPLAINEX(大盘5 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(大盘5 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(大盘6 AND CLOSE>200,’q022′),ALIGN0;
EXPLAINEX(大盘6 AND CLOSE>200,’阻力位:’,阻力位1,2,1),colorFFFF;
EXPLAINEX(大盘6 AND CLOSE>200,’止损位:’,止损位1,2,1),colorFFFF;
EXPLAINICON(大盘7 AND CLOSE>200,’q023′),ALIGN0;
EXPLAINEX(大盘7 AND CLOSE>200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(大盘7 AND CLOSE>200,’止损位:’,止损位1,2,1);
EXPLAINICON(大盘8 AND CLOSE>200,’q024′),ALIGN0;
EXPLAINEX(大盘8 AND CLOSE>200,’阻力位:’,阻力位1,2,1);
EXPLAINEX(大盘8 AND CLOSE>200,’止损位:’,止损位1,2,1);
A00:=MA(CLOSE,22);
A03:=(EMA(HIGH,5)+EMA(LOW,5)+EMA(CLOSE,5)*2)/4;
A04:=REF(A03,1);
A02:=FO>FC AND KK=0 AND FC<FO;
EXPLAINICON(REF(A02,1)=1 AND FC>=FO,’红阴十字K’),ALIGN0;
EXPLAINICON(REF(A02,1)=1 AND FC<FO,’红阴十字K’),ALIGN0;
EXPLAINICON(CLOSE,’TSJC’),ALIGN0;
SS:=30;
HhC:=HHV(h,SS);
LLc:=LLV(L,SS);
PARTLINE(BARPOS>=SYSPARAM(1)-SS,hHC[SYSPARAM(1)]),COLORFF88CC;
DRAWNUMBER(BARPOS=SYSPARAM(1)-SS,hHC[SYSPARAM(1)],hHC[SYSPARAM(1)],2),COLORFF88CC,PXUP25;
PARTLINE(BARPOS>=SYSPARAM(1)-SS,LLc[SYSPARAM(1)]),COLORFF88CC;
DRAWNUMBER(BARPOS=SYSPARAM(1)-SS,LLc[SYSPARAM(1)],LLc[SYSPARAM(1)],2),COLORFF88CC,PXUP25;
PARTLINE(BARPOS>=SYSPARAM(1)-SS,(hHC[SYSPARAM(1)]+LLc[SYSPARAM(1)])/2),COLORFF88CC;
DRAWNUMBER(BARPOS=SYSPARAM(1)-SS,(hHC[SYSPARAM(1)]+LLc[SYSPARAM(1)])/2,(hHC[SYSPARAM(1)]+LLc[SYSPARAM(1)])/2,2),COLORFF88CC,PXUP25;
PARTLINE(BARPOS>=SYSPARAM(1)-SS,(hHC[SYSPARAM(1)]*3+LLc[SYSPARAM(1)])/4),COLORFF88CC,POINTDOT;
PARTLINE(BARPOS>=SYSPARAM(1)-SS,(hHC[SYSPARAM(1)]+LLc[SYSPARAM(1)]*3)/4),COLORFF88CC,POINTDOT;
k1:zig(4,7);
k2:=filter(backset(cross(k1,ma(k1,2)),2),1);
k3:=filter(backset(cross(ma(k1,2),k1),2),1);
DRAWNUMBER(k2,k1,k1,2),coloryellow;
DRAWNUMBER(k3,k1*1.02,k1,2),coloryellow;
评论(0)