飞狐天地人和主图指标公式

[复制链接]
查看107 | 回复0 | 2021-8-21 12:43:44 | 显示全部楼层 |阅读模式

N:=5;M:=3;
均价:=(2*C+(H-L)/2+L+o)/4;
变:=(eMA(均价,3)*7+eMA(均价,7)*3)/10;
参:=EMA((7*均价+6*REF(均价,1)+5*REF(均价,2)+4*REF(均价,3)+3*REF(均价,4)+2*REF(均价,5)+1*REF(均价,6))/28,1);
DRAWGBK(变=参,COLORRGB(30,30,30),COLORRGB(130,130,130),1);
DRAWGBK(变>参,COLORRGB(110,0,0),COLORRGB(0,0,0),0);
DRAWGBK(变<参,COLORRGB(0,110,0),COLORRGB(0,0,0),0);
YC:=REF(CLOSE,1);
止损价位:=(YC*1.0035*97+0.2)/99.65,COLORRED,LINETHICK0;
DRAWTEXTEX(1,0,15,20,'★ ======================'),COLORRED;
DRAWTEXTEX(1,0,15,30,'操 '),COLORRED;
DRAWTEXTEX(1,0,15,50,'盘 '),COLORRED;
DRAWTEXTEX(1,0,15,70,'铁'),COLORRED;
DRAWTEXTEX(1,0,15,89,'律'),COLORRED;
DRAWTEXTEX(1,0,15,105,'★ ======================'),COLORRED;
DRAWTEXTEX(1,0,15,41,' 买入条件 人 和'),colorYellow;
DRAWTEXTEX(1,0,15,57,' 买入时间 2:30以后' ),colorYellow;
DRAWTEXTEX(1,0,15,73,' 止损价位 '+NUMTOSTR(止损价位,2)+'元'),colorYellow;
DRAWTEXTEX(1,0,15,89,' 线上:工作 线下:休息'),color00FFFF;
明日阻力:=2*均价-LOW;
明日支撑:=2*均价-HIGH;
明日突破:=均价+(HIGH-LOW);
明日反转:=均价-(HIGH-LOW);
今日阻力:=REF(明日阻力,1);
今日支撑:=REF(明日支撑,1);
次日心理价:=(均价+明日突破+明日阻力+明日支撑+明日反转)/5,COLORWHITE,LINETHICK;
今日保护价:=(REF(均价,1)+REF(均价,2)+均价)/3,COLOR0099FF,LINETHICK;
DRAWTEXTEX(1,0,200,25,'今日阻力=:'+NUMTOSTR(今日阻力,2)),ColorFFFF00;
DRAWTEXTEX(1,0,200,41,'今日支撑=:'+NUMTOSTR(今日支撑,2)),Colorred;
DRAWTEXTEX(1,0,200,57,'明日突破=:'+NUMTOSTR(明日突破,2)),ColorFF00FF;
DRAWTEXTEX(1,0,200,73,'明日阻力=:'+NUMTOSTR(明日阻力,2)),ColorFFFF00;
DRAWTEXTEX(1,0,200,89,'明日支撑=:'+NUMTOSTR(明日支撑,2)),COLORRED;
DRAWTEXTEX(1,0,200,105,'明日反转=:'+NUMTOSTR(明日反转,2)),COLORYellow;
DRAWTEXTEX(1,0,200,121,'次日心理价=:'+NUMTOSTR(次日心理价,2)),COLORRED;
DRAWTEXTEX(1,0,200,137,'今日保护价=:'+NUMTOSTR(今日保护价,2)),COLORGREEN;
均价:=(2*C+(H-L)/2+L+o)/4;
价差:=SUM(均价-REF(均价,1),3)/3;
实价:=(均价+价差);
天:HHV(EMA(均价,7),N),COLOR7F00FF;
地:llV(EMA(均价,7),N),COLORGREEN;
人:EMA(实价,7),COLORMAGENTA;
和:HHV(EMA(均价,7),M),COLORWHITE;
FILLRGN(人>=和,人,和),COLOR00AA99;
FILLRGN(人>=天,人,天),COLORBROWN,LINETHICK2;
FILLRGN(人<地,人,地),COLORAAAA00;
界:(天+地)/2,COLORAAAA00;
A20:=WINNER(COST(100))-WINNER((COST(100)-COST(0))/20*20+COST(0));
A19:=WINNER((COST(100)-COST(0))/20*20+COST(0))-WINNER((COST(100)-COST(0))/20*19+COST(0));
A18:=WINNER((COST(100)-COST(0))/20*19+COST(0))-WINNER((COST(100)-COST(0))/20*18+COST(0));
A17:=WINNER((COST(100)-COST(0))/20*18+COST(0))-WINNER((COST(100)-COST(0))/20*17+COST(0));
A16:=WINNER((COST(100)-COST(0))/20*17+COST(0))-WINNER((COST(100)-COST(0))/20*16+COST(0));
A15:=WINNER((COST(100)-COST(0))/20*16+COST(0))-WINNER((COST(100)-COST(0))/20*15+COST(0));
A14:=WINNER((COST(100)-COST(0))/20*15+COST(0))-WINNER((COST(100)-COST(0))/20*14+COST(0));
A13:=WINNER((COST(100)-COST(0))/20*14+COST(0))-WINNER((COST(100)-COST(0))/20*13+COST(0));
A12:=WINNER((COST(100)-COST(0))/20*13+COST(0))-WINNER((COST(100)-COST(0))/20*12+COST(0));
A11:=WINNER((COST(100)-COST(0))/20*12+COST(0))-WINNER((COST(100)-COST(0))/20*11+COST(0));
A10:=WINNER((COST(100)-COST(0))/20*11+COST(0))-WINNER((COST(100)-COST(0))/20*10+COST(0));
A9:=WINNER((COST(100)-COST(0))/20*10+COST(0))-WINNER((COST(100)-COST(0))/20*9+COST(0));
A8:=WINNER((COST(100)-COST(0))/20*9+COST(0))-WINNER((COST(100)-COST(0))/20*8+COST(0));
A7:=WINNER((COST(100)-COST(0))/20*8+COST(0))-WINNER((COST(100)-COST(0))/20*7+COST(0));
A6:=WINNER((COST(100)-COST(0))/20*7+COST(0))-WINNER((COST(100)-COST(0))/20*6+COST(0));
A5:=WINNER((COST(100)-COST(0))/20*6+COST(0))-WINNER((COST(100)-COST(0))/20*5+COST(0));
A4:=WINNER((COST(100)-COST(0))/20*5+COST(0))-WINNER((COST(100)-COST(0))/20*4+COST(0));
A3:=WINNER((COST(100)-COST(0))/20*4+COST(0))-WINNER((COST(100)-COST(0))/20*3+COST(0));
A2:=WINNER((COST(100)-COST(0))/20*3+COST(0))-WINNER((COST(100)-COST(0))/20*2+COST(0));
A1:=WINNER((COST(100)-COST(0))/20*2+COST(0))-WINNER(COST(0));
MX:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(
MAX(A1,A2),A3),A4),A5),A6),A7),A8),A9),A10),A11),A12),
A13),A14),A15),A16),A17),A18),A19),A20);
筹峰价:IF(A20=MX,(COST(100)-COST(0))/20*20+COST(0),
IF(A19=MX,(COST(100)-COST(0))/20*19+COST(0),
IF(A18=MX,(COST(100)-COST(0))/20*18+COST(0),
IF(A17=MX,(COST(100)-COST(0))/20*17+COST(0),
IF(A16=MX,(COST(100)-COST(0))/20*16+COST(0),
IF(A15=MX,(COST(100)-COST(0))/20*15+COST(0),
IF(A14=MX,(COST(100)-COST(0))/20*14+COST(0),
IF(A13=MX,(COST(100)-COST(0))/20*13+COST(0),
IF(A12=MX,(COST(100)-COST(0))/20*12+COST(0),
IF(A11=MX,(COST(100)-COST(0))/20*11+COST(0),
IF(A10=MX,(COST(100)-COST(0))/20*10+COST(0),
IF(A9=MX,(COST(100)-COST(0))/20*9+COST(0),
IF(A8=MX,(COST(100)-COST(0))/20*8+COST(0),
IF(A7=MX,(COST(100)-COST(0))/20*7+COST(0),
IF(A6=MX,(COST(100)-COST(0))/20*6+COST(0),
IF(A5=MX,(COST(100)-COST(0))/20*5+COST(0),
IF(A4=MX,(COST(100)-COST(0))/20*4+COST(0),
IF(A3=MX,(COST(100)-COST(0))/20*3+COST(0),
IF(A2=MX,(COST(100)-COST(0))/20*2+COST(0),
IF(A1=MX,(COST(100)-COST(0))/20*1+COST(0),0)))))))))))))))))))),COLORRED,LINETHICK;
ajb:=IF(capital>50000000,capital*60/100,IF(capital>20000000,capital*33/100,IF(capital>15000000,capital*20/100,IF(capital<100000,capital*6/100,capital*12/100))));
日集中度:=(AMOUNT/筹峰价)/((capital-ajb)*100)*100;
集中度:=(SUM(日集中度,12));
YZ:=eMA(集中度,6),COLORYELLOW;
ZL:=eMA(集中度,36),COLORRED;
STICKLINE(集中度>=ZL,筹峰价*0.995,筹峰价*1.005,8,0),COLORRED;
STICKLINE(集中度>80,筹峰价*0.995,筹峰价*1.005,8,0),COLORBLUE,COLORAAAA00;
STICKLINE(集中度<YZ and 集中度>ZL,筹峰价*0.995,筹峰价*1.005,8,0),COLORWHITE;
STICKLINE(集中度<ZL AND 集中度>YZ,筹峰价*0.995,筹峰价*1.005,8,0),COLORYELLOW;
STICKLINE(集中度<ZL AND 集中度<YZ,筹峰价*0.995,筹峰价*1.005,8,0),COLOR00AA99;
{www.gupang.com 股旁网_飞狐股票指标公式}
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0.2,0),colorFFCC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,8,0),colorFF9F68;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,7,0),colorFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,6,0),colorFFAA11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,5,0),colorFFBB11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,4,0),colorFFCC22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),colorFFDD22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),colorFFEE33;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),colorFFFF33;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.2,0),colorFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),colorCC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0),color3300CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0),color33CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0),color6633CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0),color3333FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),color6633FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),color3366FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),color6666FF;
{K线卖提示}
Qc0:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,open,close,3,0),COLOR3366FF;
stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,H,L,0.5,0),COLOR3366FF;
{VAR11:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);{ZIG 有未来}
VAR123:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);}
KSD:=IF(O>C,O,C);
VAR12:=IF(TROUGHBARS(KSD,10,1)=1,1,0);
VAR1:=IF(PEAKBARS(KSD,10,1)=1,1,0);
STICKLINE(VAR1,C,O,10,0),COLORYELLOW,LINETHICK2;{高位黄色}
STICKLINE(VAR1,C,O,6,0),COLORGRAY,LINETHICK2;{高位黄色}
STICKLINE(VAR1,H,L,1,0),COLORYELLOW,LINETHICK2;{高位黄色}
STICKLINE(VAR12,C,O,10,0),COLOR9900FF,LINETHICK2;{底位红色}
STICKLINE(VAR12,C,O,6,0),COLORWHITE,LINETHICK2;{底位红色}
STICKLINE(VAR12,H,L,1,0),COLORRED,LINETHICK2;{底位红色}

202108211209.jpg

202108211209.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则