红灯停 绿灯行 短线中线长线改进版 就这么简单 大道至简

经过实盘操作,本人总结了几句这两个公式的用法,红绿灯中间方向线变红为上升趋势,方向线变红,下有绿灯可以买入并持股,出现红灯可以考虑卖出,经实盘测试,比BS效果好,还有几句总结一并写入公式了,望大家细加体会!

{方向红绿灯源码}


DRAWTEXT_FIX(1,0.36,0.00,0,'股行如人生    看清红绿灯'),COLORRED;
DRAWTEXT_FIX(1,0.36,0.06,0,'人生要微笑    选择好方向'),COLORLIBLUE;
DRAWTEXT_FIX(1,0.36,0.12,0,'行走过了线    方向要改变'),COLORRED;
DRAWTEXT_FIX(1,0.36,0.18,0,'位置选择好    不要买错了'),COLORLIBLUE;
DRAWTEXT_FIX(1,0.83,0.80,0,'方向位置买    绿行之上买'),COLORYELLOW;
DRAWTEXT_FIX(1,0.83,0.90,0,'出现红停卖    绝不赔钱卖'),COLORYELLOW;
DRAWTEXT_FIX(1,0.80,0.85,0,'买错损时又折兵  小心 ! 切记 ! 切记 !'),COLORRED;
{方向}
AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
方向向下:(DMA((2*CLOSE+LOW+HIGH)/4,AA)),COLORBLUE,LINETHICK3;
方向向上:IF(方向向下>REF(方向向下,1),方向向下,DRAWNULL),LINETHICK3,COLORRED;
二轮:(HHV(H,250)-LLV(L,250))/LLV(L,250)*100,COLORYELLOW,NODRAW;
{红绿灯}
绿灯行:IF(CLOSE>SAR(4,6,20),SAR(4,6,20),DRAWNULL),CIRCLEDOT,COLORGREEN;
红灯停:IF(CLOSE<SAR(4,6,20),SAR(4,6,20),DRAWNULL),CIRCLEDOT,COLORRED;
变1:=REF(C<红灯停,6) AND REF(C<红灯停,5) AND REF(C<红灯停,4) AND REF(C<红灯停,3) AND REF(C<红灯停,2) AND REF(C<红灯停,1) AND REF(C>绿灯行,0),NODRAW;
绿灯:=IF(变1=1,绿灯行,DRAWNULL),CIRCLEDOT,COLORGREEN;
DRAWTEXT(变1=1,绿灯行-绿灯行*0.03,'绿行'),COLORGREEN;
变无效:=IF(变1=1,0,1);
变2:=变无效 AND REF(C<红灯停,1) AND REF(C>绿灯行,0);
黄灯:=IF(变2=1,绿灯行,DRAWNULL),CIRCLEDOT,COLORYELLOW;
DRAWTEXT(变2=1,绿灯行-绿灯行*0.03,'绿灯'),COLORGREEN;
变3:=REF(C>绿灯行,1) AND REF(C<红灯停,0);
红灯:=IF(变3=1,红灯停,DRAWNULL),CIRCLEDOT,COLORRED;
DRAWTEXT(变3=1,红灯停+红灯停*0.03,'红停'),COLORRED;


{短线中线长线源码}
DRAWTEXT_FIX(1,0.56,0.00,0,'人生有轨迹    鲜血灌梦想'),COLORRED;
DRAWTEXT_FIX(1,0.56,0.06,0,'长短宽度窄    方向要改变'),COLORRED;
DRAWTEXT_FIX(1,0.56,0.12,0,'长短向上走    股价要启动'),COLORRED;
DRAWTEXT_FIX(1,0.56,0.18,0,'起落是常态    短涨还能买'),COLORRED;
DRAWTEXT_FIX(1>0,0,0.05,0,'每股收益:'),COLORLIBLUE;
DRAWNUMBER_FIX(1>0,0,0.16,0,FINANCE(38)),COLORLIBLUE;
DRAWTEXT_FIX(1>0,0.08,0.05,0,'收入同比'),COLORLIBLUE;
DRAWNUMBER_FIX(1>0,0.08,0.16,0,FINANCE(44)),COLORLIBLUE;
DRAWTEXT_FIX(1>0,0.16,0.05,0,'利润同比'),COLORLIBLUE;
DRAWNUMBER_FIX(1>0,0.16,0.16,0,FINANCE(43)),COLORLIBLUE;
DRAWTEXT_FIX(1>0,0.24,0.05,0,'市净率'),COLORLIBLUE;
DRAWNUMBER_FIX(1>0,0.24,0.16,0,C/FINANCE(34)),COLORLIBLUE;
DRAWTEXT_FIX(1>0,0.32,0.05,0,'市盈率'),COLORLIBLUE;
DRAWNUMBER_FIX(1>0,0.32,0.16,0,DYNAINFO(39)),COLORLIBLUE;
短线:COST(95),COLORGREEN,DOTLINE;
中线:(COST(95)+COST(5))/2,COLORCYAN,DOTLINE;
长线:COST(5),COLORGRAY,DOTLINE;
NOTEXT短涨:IF(短线>REF(短线,1),短线,DRAWNULL),LINETHICK2,COLORRED;
NOTEXT中涨:IF(中线>REF(中线,1),中线,DRAWNULL),LINETHICK2,COLORRED;
NOTEXT长涨:IF(长线>=REF(长线,1),长线,DRAWNULL),LINETHICK2,COLORRED;
长短宽度:(COST(95)/COST(5))*100,COLORMAGENTA,NODRAW;
二百五均线向上:=EVERY(MA(C,250)>=REF(MA(C,250),1),3);
亮剑:=(C>MA(C,233) AND 二百五均线向上 AND REF(C<O,2) AND REF(C<O,1) AND C>O AND C>长线 AND C<中线 AND 长线=NOTEXT长涨 AND 中线=NOTEXT中涨) OR (二百五均线向上 AND 中线=NOTEXT中涨 AND EVERY(中线=NOTEXT中涨,5) AND 长线=NOTEXT长涨 AND REF((O>长线 AND C<长线),1) AND L<长线 AND C>长线),NODRAW;
DRAWTEXT(亮剑=1,L-L*0.08,'亮剑'),COLORYELLOW;
DRAWICON(亮剑=1,L-L*0.03,1);
启动:=C>MA(C,233) AND 二百五均线向上 AND 短线=NOTEXT短涨 AND REF(短线!=NOTEXT短涨,1) AND 长短宽度<122;
DRAWTEXT(启动=1,H+H*0.06,'启动'),COLORYELLOW;
DRAWICON(启动=1,L-L*0.01,1);
落下:=短线!=NOTEXT短涨 AND REF(短线=NOTEXT短涨,1);
DRAWTEXT(落下=1,短线+短线*0.03,'落'),COLORGREEN;
DRAWICON(落下=1,短线+短线*0.01,2);




未来函数检测结果如下:
该公式包含未来函数:COST
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图