This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
This function implements Thomas DeMark's TD Sequential Indicator. There are many different versions of this indicator with different rules and many nuances. Not all are implemented here. For more detail you should add to the code.
This function accepts two arguments, a number and a string.
TDSequential(0,"") - Returns the count of the Setup phase. Returns 1 to 9 for a BuyCount and -1 to -9 for a SellCount. Returns "99" (or "-99") for a "perfected" "9".
TDSequential(1,"Sequential") - Returns the Sequential countdown after the setup is complete. Positive number for a Buy count, negative for a sell count. At count 18 (or -18) it resets and stops counting until the next setup.
TDSequential(1,"Combo") - Returns the Combo version countdown.
After you download the TD Sequential function you use it in an indicator formula to visualize it.
Here's an example (copy and paste to an indicator formula):
PlotSymbol(TDSetup>0 and TDSetup<10,TDSetup,2,1,Belowlow,colorBlue,colorBlue,PlotSymbolNone);
PlotSymbol(TDSetup<0 and TDSetup>-10,-TDSetup,2,1,AboveHigh,colorRed,colorRed,PlotSymbolNone);
PlotSymbol(TDSeq>0 and TDSeq!=ref(TDSeq,1),TDSeq,0,5,Belowlow,colorBlue,colorGreen,PlotSymbolNone);
PlotSymbol(TDSeq<0 and TDSeq!=ref(TDSeq,1),-TDSeq,1,5,AboveHigh,colorBlue,colorOrange,PlotSymbolNone);
PlotSymbol(TDSeq==13 and TDSeq!=ref(TDSeq,1),"13",4,2,Belowlow,colorGreen,colorGreen,PlotSymbolCircle);
PlotSymbol(TDSeq==-13 and TDSeq!=ref(TDSeq,1),"13",4,2,Abovehigh,colorred,colorred,PlotSymbolCircle);
//-------------end
If you are looking for just the Setup phase or the Demark's Support Resistance Lines,
HERE'S AN ALTERNATE CODING USING VECTOR LANGUAGE ONLY:
//--------------------start
PlotCandleStick("Quotes", colorBrown|255|colorViolet|255|0, StyleSymbolVdash);
dn=Iff( close < ref(close,4),1,0);
td9dn=BarsSince(barssince(dn));
PlotSymbol(td9dn>0 and td9dn<10,td9dn,2,1,Belowlow,colorBlue,colorBlue,PlotSymbolNone);
PlotSymbol(td9up>0 and td9up<10,td9up,2,1,AboveHigh,colorRed,colorRed,PlotSymbolNone);
TD4dn= Ref(Close,9)>=Ref(Close,13);
TD4up= Ref(Close,9)<=Ref(Close,13);
Perfbuy9=td9dn==9 AND TD4dn and LLV(Low,2) < Ref(Low,2) AND LLV(Low,2)< Low < Ref(Low,3);
Perfsell9=td9up==9 and TD4up and HHV(High,2) > Ref(High,2) AND HHV(High,2)> High < Ref(High,3);