通达信.大智慧 成本通道MCST主图加选股源码.附解释
用法和BOLL一样.这个取材与MCST成本线因为股市的一切买卖行动.不管是庄家还是股民统统是为赚而来.那么成本就决定买卖双方的意愿.谁也不想做赔本的买卖.可是主宰走向的那些胳膊粗力气大的庄家才不管散户的死活呢.所以成本也是跟着庄家走.庄家是用钱控盘的.所以现在我们用成本编制通道.成本和均线比.成本反应在先.而BOLL是以均线编辑的. 怎么用成本通道呢.原理和布林线相同.简单的说股价离开通道再进来就是买卖信号.
【A】上突破获利的人多必然回调.庄家已经大大的获利所以企图卖给那些看多的贪心的散户.也正是咱们高抛的机会.
【B】下跌破通道没人赚钱散户甩货惧怕越套越深.其实庄家正好是买便宜的时候.他不吃饱喝足是不会拉车上路的.什么时候股价回到通道内就是上升的开始
【C】成本通道的中线是对应股价的全体参与人员的市场成本.MCST:DMA(AMOUNT/(100*VOL),VOL/CAPITAL).CAPITAL是流通盘.有人说是未来函数.我不那么认为因为流通盘是会变的.那么股价K线就不会变吗.恐未来你也得有个范围吧.将来能变的都是未来吗?都可怕到不能用吗?
上线是这个成本获利10%.下线是这个成本亏损10%由此你可以想象一旦离开上下线.买卖的意愿该是多么强烈.这回你总可以清醒的认识到为什么的离开通道就是买卖信号的道理了吧.但是具体那天买卖.公式显示不了那一天.反正股价再次进入就是买卖信号.注意买卖还由你确定的.
【D】庄家成本;是用公式里的方法计算出来的.它不会高于市场成本的.但是股价可能低于庄家成本这是因为庄家也要摊薄成本卖到更低的筹码.但是我们必需清醒的认识到此类状态一定是暂时的.当然时间长短咱们不知道.那要看大趋势.要看庄家吃没吃饱来确定.但是一定是暂时的.也是散户难熬的阶段.
【E】成本通道给出了明确的买卖信号问题就看你的炒股理念如何看待信号了.我苦口婆心说没用.钱在你手里.你可以为所欲为.所差的就是能不能赚钱的区别了.
加一句我们编辑了各式各样的通道.哪个好我说不出来.因为就和找对象一样.只有你看好的就才是最好的.你拿他能赚钱的就是好的.货比三家.你用起来看.不就行了吗.
你必需看透这个解释再看公式.我以为说明比公式条文重要.这里边就是编辑公式的原原理.编辑人炒股经验的结合.吃透这个就是赚钱的钥匙.有了这把钥匙你才能打开股市这个聚宝盆.编辑公式就仅仅是给你了一把钥匙.能不能打开锁.还有一大段路要走那就看你的了.
通达信公式源码:-------------------------------------------------------------
{成本通道}
DRAWGBK(O>C,RGB(0,0,140),RGB(0,0,60),0,'01',0);
MCST:DMA(AMOUNT/(100*VOL),VOL/CAPITAL),COLORFF9900,DOTLINE;
DRAWTEXT(ISLASTBAR,MCST,'市场成本'),COLOR00FF00;
DRAWBAND(MCST*1.092,RGB(60,0,60),MCST,RGB(60,0,60));
DRAWBAND(MCST,RGB(0,60,0),MCST*0.908,RGB(0,60,0));
DMA(AMOUNT/(100*VOL),VOL/CAPITAL),COLORFF9900,DOTLINE;
MCST*1.092 ,COLOR0077FF;
MCST*0.908 ,COLOR00FF00;
{MA5}
MA5:WMA(C,5),COLOR00FF00,DOTLINE;
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLORRED,LINETHICK3;
{高抛.低吸}
RC:=(H+L+C*2)/4;
R2D:=WMA(RC,27);
R2E:=STD(RC,27);
R3F:=(RC-R2D)/R2E*100;
R40:=WMA(R3F,3);
R41:=WMA(R40,3);
JD:=WMA(R41,2);
AJ:=3*R41-2*JD;
DRAWTEXT(CROSS(AJ,JD) ,L-0.05,'←吸'),COLOR00FFFF,LINETHICK2;
DRAWTEXT(CROSS(JD,AJ) ,H+0.05,'←抛'),COLOR0044FF,LINETHICK2;
{K线}
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.0,0),COLORRED;
STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0.0,0),COLORCYAN;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
A:=SUMBARS(V,CAPITAL*1);{累计换手=100%的周期}
A1:=SUM(COST(10),A)/A;{在A周期里获利10%的平均价}
A2:=SUM(COST(20),A)/A;{在A周期里获利20%的平均价}
A3:=SUM(COST(30),A)/A;{在A周期里获利30%的平均价}
A4:=SUM(COST(40),A)/A;{在A周期里获利40%的平均价}
A5:=SUM(COST(50),A)/A;{在A周期里获利50%的平均价}
庄家成本:(5*A1+4*A2+3*A3+2*A4+A5)/15,COLORFF9900, CIRCLEDOT;{求出庄家成本};
DRAWTEXT(ISLASTBAR,庄家成本,'庄家成本'),COLORYELLOW;
大智慧公式源码:------------------------------------------------------------------------------------------------------
DRAWGBKlast(DATE>900101,strip(RGB(0,0,150),RGB(0,0,40),0));
{以下设置五彩立体K线}
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLORff5500;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORff7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORff9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000033;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
{成本通道}
MCST:DMA(AMOUNT/(100*VOL),VOL/CAPITAL),COLORFF9900,DOTLINE;
DRAWTEXT(DISPSTATUS=2,MCST,'【市场成本】'),COLOR00ff00,LINETHICK1,ALIGN1;
MCST*1.092 ,COLOR0077ff;
MCST*0.908 ,COLOR00ff00;;
FILLRGN(MCST*1.092,MCST,MCST*1.092>MCST,RGB(60,0,60)),LAYER7;
FILLRGN(MCST*0.908,MCST,MCST*0.908<MCST,RGB(0,60,0)),LAYER7;
{MA5}
MA5:WMA(C,5),Color00FF00,DOTLINE;
PARTLINE(MA5,MA5>REF(MA5,1),rgb(255,150,0)),LINETHICK3,LAYER0;
{高抛.低吸}
RC:=(H+L+C*2)/4;
R2D:=WMA(RC,27);
R2E:=STD(RC,27);
R3F:=(RC-R2D)/R2E*100;
R40:=WMA(R3F,3);
R41:=WMA(R40,3);
JD:=WMA(R41,2);
AJ:=3*R41-2*JD;
DRAWTEXT(CROSS(AJ,JD) ,L-0.05,'←吸'),COLOR00FFFF,LINETHICK2;
DRAWTEXT(CROSS(JD,AJ) ,H+0.05,'←抛'),COLOR0044FF,LINETHICK2;
A:=SUMBARS(V,CAPITAL*1);;{累计换手=100%的周期}
A1:=SUM(COST(10),A)/A;{在A周期里获利10%的平均价}
A2:=SUM(COST(20),A)/A;{在A周期里获利20%的平均价}
A3:=SUM(COST(30),A)/A;{在A周期里获利30%的平均价}
A4:=SUM(COST(40),A)/A;{在A周期里获利40%的平均价}
A5:=SUM(COST(50),A)/A;{在A周期里获利50%的平均价}
庄家成本:(5*A1+4*A2+3*A3+2*A4+A5)/15,COLORff9900, CIRCLEDOT;{求出庄家成本};
DRAWTEXT(DISPSTATUS=2,庄家成本,'【庄家成本】'),COLOR00ffFF,LINETHICK1,ALIGN1;
{E:=LLV(L,250)=L;}{一年中最低价的位置}
{E1:=BARSLAST(E);}{求得一年中最低价的位置到现在的周期}
{选股:IF(CROSS(C,庄家成本) AND E1>=40,1,0 );};{只要40天以上不创一年的新低的都有庄};
DRAWTEXTREL(5,10,'■现实获利盘比例: '+NUMTOSTRN(WINNER(CLOSE)*100,1)+' %'),Color00FFff,LINETHICK3;
选股公式源码:----------------------------------------------------------
{高抛.低吸}
RC:=(H+L+C*2)/4;
R2D:=WMA(RC,27);
R2E:=STD(RC,27);
R3F:=(RC-R2D)/R2E*100;
R40:=WMA(R3F,3);
R41:=WMA(R40,3);
JD:=WMA(R41,2);
AJ:=3*R41-2*JD;
XG:CROSS(AJ,JD) AND JD>REF(JD,1);