学习参考TD序列上升计数,当出现计数D时,可以考虑卖出,或者结合紧下来出现的神奇下跌九转和上升九转,综合考虑卖出。 // TD buy setup
TDBSFlipUp:=CLOSE>=REF(CLOSE,4);
TDBSFlipDwn:=CLOSE<REF(CLOSE,4);
TDBSBar1:=TDBSFlipDwn AND BARSLAST(TDBSFlipUp)==1;
TDBSBar2:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,2)==2 AND BARSLAST(TDBSFlipUp)==2;
TDBSBar3:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,3)==3 AND BARSLAST(TDBSFlipUp)==3;
TDBSBar4:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,4)==4 AND BARSLAST(TDBSFlipUp)==4;
TDBSBar5:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,5)==5 AND BARSLAST(TDBSFlipUp)==5;
TDBSBar6:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,6)==6 AND BARSLAST(TDBSFlipUp)==6;
TDBSBar7:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,7)==7 AND BARSLAST(TDBSFlipUp)==7;
TDBSBar8:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,8)==8 AND BARSLAST(TDBSFlipUp)==8;
TDBSBar9:=TDBSFlipDwn AND COUNT(TDBSFlipDwn,9)==9 AND BARSLAST(TDBSFlipUp)==9;
// Print TD buy setup bars
//www.fxjgsw.com
TextPos:=HIGH*1.3;
DRAWTEXT(TDBSBar1,TextPos,'a'),colorgreen;
DRAWTEXT(TDBSBar2,TextPos,'b'),colorgreen;
DRAWTEXT(TDBSBar3,TextPos,'c'),colorgreen;
DRAWTEXT(TDBSBar4,TextPos,'d'),colorgreen;
DRAWTEXT(TDBSBar5,TextPos,'e'),colorgreen;
DRAWTEXT(TDBSBar6,TextPos,'f'),colorgreen;
DRAWTEXT(TDBSBar7,TextPos,'g'),colorgreen;
DRAWTEXT(TDBSBar8,TextPos,'h'),colorgreen;
DRAWTEXT(TDBSBar9,TextPos,'i'),colorgreen;
// TD Sell setup
TDSSFlipDwn:=CLOSE<=REF(CLOSE,4);
TDSSFlipUp:=CLOSE>REF(CLOSE,4);
TDSSBar1:=TDSSFlipUp AND BARSLAST(TDSSFlipDwn)==1;
TDSSBar2:=TDSSFlipUp AND COUNT(TDSSFlipUp,2)==2 AND BARSLAST(TDSSFlipDwn)==2;
TDSSBar3:=TDSSFlipUp AND COUNT(TDSSFlipUp,3)==3 AND BARSLAST(TDSSFlipDwn)==3;
TDSSBar4:=TDSSFlipUp AND COUNT(TDSSFlipUp,4)==4 AND BARSLAST(TDSSFlipDwn)==4;
TDSSBar5:=TDSSFlipUp AND COUNT(TDSSFlipUp,5)==5 AND BARSLAST(TDSSFlipDwn)==5;
TDSSBar6:=TDSSFlipUp AND COUNT(TDSSFlipUp,6)==6 AND BARSLAST(TDSSFlipDwn)==6;
TDSSBar7:=TDSSFlipUp AND COUNT(TDSSFlipUp,7)==7 AND BARSLAST(TDSSFlipDwn)==7;
TDSSBar8:=TDSSFlipUp AND COUNT(TDSSFlipUp,8)==8 AND BARSLAST(TDSSFlipDwn)==8;
TDSSBar9:=TDSSFlipUp AND COUNT(TDSSFlipUp,9)==9 AND BARSLAST(TDSSFlipDwn)==9;
// Print TD Sell setup
DRAWTEXT(TDSSBar1,TextPos,'1'),colorlired;
DRAWTEXT(TDSSBar2,TextPos,'2'),colorlired;
DRAWTEXT(TDSSBar3,TextPos,'3'),colorlired;
DRAWTEXT(TDSSBar4,TextPos,'4'),colorlired;
DRAWTEXT(TDSSBar5,TextPos,'5'),colorlired;
DRAWTEXT(TDSSBar6,TextPos,'6'),colorlired;
DRAWTEXT(TDSSBar7,TextPos,'7'),colorlired;
DRAWTEXT(TDSSBar8,TextPos,'8'),colorlired;
DRAWTEXT(TDSSBar9,TextPos,'9'),colorlired;
// TD Sell Countdown
CntDwnH:=CLOSE>=REF(HIGH,2); // TD sequential sell count down
CntDwnL:=HIGH<=REF(HIGH,2); // TD aggressive sell sequential count down
CntDwnWay:=CntDwnH;
// Seek the current sell countdown
CalBars:=0;
CntDwnNum:=0;
CmpPrice:=0;
CntPrice:=0;
Next:=0;
// TD sell countdown cancel 1: a TD buy setup is generated
CntCancel1:=IF((BARSLAST(TDSSBar9)>0 AND BARSLAST(TDBSBar9)>0 AND COUNT(TDBSBar9,BARSLAST(TDSSBar9))>0),0,1);
IF(CntDwnWay==1)
{
CalBars=SUMBARS(TDSSBar9,1);
CntDwnNum=IF(TDSSBar9 OR BARSLAST(TDSSBar9)>0,COUNT(CntDwnWay,CalBars),0);
}
CNTDWN1:=IF(CntDwnNum==1,CntCancel1,0);
CNTDWN2:=IF(CntDwnNum==2,CntCancel1,0);
CNTDWN3:=IF(CntDwnNum==3,CntCancel1,0);
CNTDWN4:=IF(CntDwnNum==4,CntCancel1,0);
CNTDWN5:=IF(CntDwnNum==5,CntCancel1,0);
CNTDWN6:=IF(CntDwnNum==6,CntCancel1,0);
CNTDWN7:=IF(CntDwnNum==7,CntCancel1,0);
CNTDWN8:=IF(CntDwnNum==8,CntCancel1,0);
CNTDWN9:=IF(CntDwnNum==9,CntCancel1,0);
CNTDWN10:=IF(CntDwnNum==10,CntCancel1,0);
CNTDWN11:=IF(CntDwnNum==11,CntCancel1,0);
CNTDWN12:=IF(CntDwnNum==12,CntCancel1,0);
CNTDWN13:=0;
SETPLUS:=0;
// The high of countdown13 is great than or equanl to the close of countdown8
IF(CntDwnNum > 12)
{
CntPrice = REF(CLOSE,BARSLAST(CntDwnWay,CntDwnNum-8)); // Get the close of countdown8
Next = CntDwnNum-12;
WHILE(Next > 0)
{
IF(Next > 1)
CmpPrice = REF(HIGH, BARSLAST(CntDwnWay,Next-1)); // Get the high of current countdown
ELSE
CmpPrice = HIGH;
IF(CmpPrice >= CntPrice)
{
BREAK;
}
Next = Next - 1;
}
IF(Next == 1 AND CntCancel1)
{
CNTDWN13 = 1;
}
ELSE IF(Next == 0 AND CntCancel1)
{
SETPLUS = 1; // Flag '+' when the low of countdown13 is not less than or equal to the close of countdown8
}
}
// Print the current sell countdown number
TextPos=HIGH*1.2;
DRAWTEXT(CNTDWN1,TextPos,'1'),colorligray;
DRAWTEXT(CNTDWN2,TextPos,'2'),colorligray;
DRAWTEXT(CNTDWN3,TextPos,'3'),colorligray;
DRAWTEXT(CNTDWN4,TextPos,'4'),colorligray;
DRAWTEXT(CNTDWN5,TextPos,'5'),colorligray;
DRAWTEXT(CNTDWN6,TextPos,'6'),colorligray;
DRAWTEXT(CNTDWN7,TextPos,'7'),colorligray;
DRAWTEXT(CNTDWN8,TextPos,'8'),colorligray;
DRAWTEXT(CNTDWN9,TextPos,'9'),colorligray;
DRAWTEXT(CNTDWN10,TextPos,'A'),colorligray;
DRAWTEXT(CNTDWN11,TextPos,'B'),colorligray;
DRAWTEXT(CNTDWN12,TextPos,'C'),colorligray;
DRAWTEXT(SETPLUS,TextPos,'+'),colorligray;
DRAWTEXT(CNTDWN13,TextPos,'D'),colorligray;
// Seek the last sell countdown
CntDwnNum = 0;
SellSetupNum:=IF(TDSSBar9 OR BARSLAST(TDSSBar9)>0, COUNT(TDSSBar9,BARSSINCE(TDSSBar9)), 0);
IF(sellSetupNum>1 AND CntDwnWay)
{
CalBars = SUMBARS(TDSSBar9,2);
CntDwnNum = COUNT(CntDwnWay, CalBars);
}
// A buy setup is generated after the last sell setup
CalBars = SUMBARS(TDSSBar9,2);
CntCancel1=IF(SellSetupNum>1 AND COUNT(TDBSBar9,CalBars)>0,0,1);
CNTDWN1=IF(CntDwnNum==1,CntCancel1,0);
CNTDWN2=IF(CntDwnNum==2,CntCancel1,0);
CNTDWN3=IF(CntDwnNum==3,CntCancel1,0);
CNTDWN4=IF(CntDwnNum==4,CntCancel1,0);
CNTDWN5=IF(CntDwnNum==5,CntCancel1,0);
CNTDWN6=IF(CntDwnNum==6,CntCancel1,0);
CNTDWN7=IF(CntDwnNum==7,CntCancel1,0);
CNTDWN8=IF(CntDwnNum==8,CntCancel1,0);
CNTDWN9=IF(CntDwnNum==9,CntCancel1,0);
CNTDWN10=IF(CntDwnNum==10,CntCancel1,0);
CNTDWN11=IF(CntDwnNum==11,CntCancel1,0);
CNTDWN12=IF(CntDwnNum==12,CntCancel1,0);
CNTDWN13=0;
SETPLUS =0;
// The high of countdown13 is great than or equal to the close of countdown8
IF(SellSetupNum>1 AND CntDwnNum>12 AND CntDwnWay==1)
{
CntPrice = REF(CLOSE,BARSLAST(CntDwnWay,CntDwnNum-8)); // Get the close of countdown8
Next = CntDwnNum-12;
//DRAWNUMBER(1,LOW*0.6,CntPrice);
WHILE(Next > 0)
{
IF(Next > 1)
CmpPrice = REF(HIGH, BARSLAST |
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!