TTM Indicators for Amibroker

#1
Can someone please share the following indicator AFLs here


The TTM Squeeze Indicator

The TTM Squeeze indicator can be applied to the Stocks, Options, Futures and Forex markets. The TTM Squeeze Indicator works in conjunction with Tradestation, eSignal, Sierra Charts, and now it is also available for Ninja Trader!

The TTM Squeeze Indicator: A Few Key Points:

the TTM squeeze indicator was developed to keep from going cross eyed from looking at all of the line crosses. The TTM squeeze indicator visually represents what is happening with all of the lines.
The TTM Squeeze Indicator is very easy strategy to learn and works on all time frames. We like the Two Minute and Five Minute time frames the best.
The TTM Squeeze Indicator normal signal is red dots, no trade.
When green dots appears, it means that the TTM squeeze indicator is on.
When a green dots is followed by a red dot, it means that the TTM squeeze indicator has fired, volatility is expanding.
The histogram(the vertical lines) is a measure of momentum; If it is blue we go long, if it is red we go short

TTM Auto Pivots Indicator


The TTM Auto Pivots Indicator can be applied to the stock trading, options trading, futures trading and Forex trading markets. The TTM Auto Pivots Indicator works in conjunction with Tradestation, eSignal, Sierra Charts, and now Ninja Trader!

TTM Auto Pivots Indicator - A Few Key Points:

The good news about this day trading strategy, the auto pivots indicator, is that the day trades are clearly setup before the day begins.
With the TTM Auto Pivots Indicator the majority of the time is spent waiting for a particular price level to be reached in order to initiate a trade.
The TTM Auto Pivots Indicator very useful especially if your weakness as a trader is making "impulsive trades".


TTM Hourly Rolling Pivots Indicator

Note: You must have the TTM Auto Pivots Indicator for the TTM Hourly Rolling Pivots Indicator to work. This day trading indicator is compatible with Tradestation, Sierra Charts, and now Ninja Trader!

TTM Hourly Rolling Pivots Indicator - A Few Key Points:

TTM Hourly Rolling Pivots are great for Sideways Chop
TTM Hourly Rolling Pivots Indicator updates new pivots every hour

TTM Trend Indicator

The TTM Trend indicator can be applied to the stock trading, options trading, futures trading and Forex trading markets. The TTM Trend indicator works in conjunction with Tradestation, eSignal, Sierra Charts, and now Ninja Trader!

TTM Trend Indicator - A Few Key Points

TTM Trend indicator is a visual technique that eliminates irregularities from a normal chart
TTM Trend indicator offers a better picture of trends and consolidations

TTM Bricks Indicator

The TTM Bricks Indicator can be applied to the stock trading, options trading, futures trading and Forex trading markets. The TTM Bricks Indicator works in conjunction with Tradestation, eSignal, Sierra Charts, and now Ninja Trader!

TTM Bricks Indicator - A Few Key Points

TTM Bricks Indicator: 3 consecutive higher closes = up
TTM Bricks Indicator: 3 consecutive lower closes = down



TTM Indicators (Squeeze, AutoPivots, Hourly Pivots, Trend, Brick) for Amibroker

TTM Auto Pivots.afl
TTM Brick.afl
TTM Hourly Rolling Pivots.afl
TTM squeeze.afl
TTM Trend.afl
 
#2
I was able to find these 2.
Can senior members pls. comment on them!

###########################
TTM Trend Indicator
###########################


_SECTION_BEGIN("Price");

HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
barcolor = IIf(HaClose >= HaOpen, colorBlue, colorRed);

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", barcolor, styleNoTitle | styleCandle | GetPriceStyle() );
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));

_SECTION_END();

################
TTM Squeeze
################

_SECTION_BEGIN("Unnamed 6");
/*
BB Squeeze (conversion for TS code)


Instructions
Insert Linked to new chart pane
Periods can be selected in Param window

For swing trading:
I scan the EOD stock data using the ZigZag indicator for buy/sell signals and confirm the following for the buy decision:
. The close is just crossed the 8 day MA (or close to it) and 20 day MA is moving up direction (on a daily price chart)
. The stochastic indicator shows "oversold" condition is improving
. TTM Sqeeze shows up momentum.
*/

Price = Close;
Length = Param("Length",20,2,100,1); // { Length for Average True
//Range (ATR)}
Lenght1 = Param("Length1",20,2,100,1); // { Std. Deviation (SD)
//Calcs }

nK = Param("Channel ATRs",1.5,0.1,2,0.1); //{ Keltner Channel ATRs
//from Average }
nBB = Param("BB Std Devs",2,0.1,3,0.1); // { Bollinger Band Std.
//Devs. from Average }
AlertLine = Param("AlertLine",1,0,3,1); //{ BBS_Index level at which
//to issue alerts }

NormalColor = colorRed; //{ Normal color for BBS_Ind }
AlertlColor = colorBlue; //{ Color for BBS_Ind below alert line }


LHMult = Nz(PointValue/TickSize);

//{-- Calculate BB Squeeze Indicator ----------------------}
AvgTrueRange = ATR(Length);
SDev = StDev(Price, Length);

Denom = nK*AvgTrueRange;
BBS_Ind = Nz((nBB * SDev) /Denom);

SetPlotColor = IIf( BBS_Ind < Alertline, NormalColor, AlertlColor);
BBcrossDown = Cross(AlertLine,BBS_Ind);
BBcrossUp = Cross(BBS_Ind,AlertLine);

SetChartOptions( 0, chartShowDates|chartWrapTitle );
GraphXSpace=10;
//_N(Title = "{{NAME}} - {{INTERVAL}} {{DATE}} "+_DEFAULT_NAME()+" :
//{{OHLCX}} {{VALUES}}");
//+"\nALERT: "+WriteIf(BBcrossDown,"BB Squeeze Alert",WriteIf
//(BBcrossUp,"BB Squeeze Is Over","")) );


//{-- Plot the Index & Alert Line -------------------------}
Plot(0, "BBS_Ind", SetPlotColor, styleDots );

//{-- Plot delta of price from Donchian mid line ----------}
value2 = LinearReg( price-((HHV(H, Lenght1)+LLV(L, Lenght1))/2+ MA
(C,Lenght1))/2, Lenght1);
color = IIf( value2 > 0, IIf( value2 > Ref(value2,-1), colorGreen,
colorDarkGreen),
IIf( value2 < 0, IIf( value2 < Ref(value2,-1), colorRed,
colorDarkRed ), colorYellow ));

Plot(value2*LHMult, "NickmNxtMove", color, styleArea );
Plot(value2,"BB Squeeze",color, styleArea );
//{-- Issue Alert when the Squeeze is On ------------------}
//"ALERT";
//Write alerts to Interpretation window
//Ticker = Name();
//WriteIf(BBcrossDown,Ticker + " " + "BB Squeeze Alert" ,WriteIf
//(BBcrossUp,Ticker + " " + "BB Squeeze Is Over",""));

//Write alerts to Alert Output window
AlertIf(BBcrossDown,"","BB Squeeze Alert",0);
AlertIf(BBcrossUp,"","BB Squeeze Is Over",0);

//Sound alerts
//AlertIf( BBcrossDown, "SOUND
//C:\\Windows\\Media\\RINGIN.WAV", "Audio alert", 2 );
//AlertIf( BBcrossUp, "SOUND C:\\Windows\\Media\\RINGIN.WAV", "Audio
//alert", 2 );


//Write text to screen
/*
for(i=1;i<BarCount;i++)
{
if(BBcrossDown)
{
PlotText("BB Squeeze Alert",i,-6,colorWhite);
}
if(BBcrossUp)
{
PlotText("BB Squeeze Is Over",i,-3,colorWhite);
}
}
*/
PlotShapes(shapeUpArrow*BBcrossDown,colorBrightGre en,0,0);
PlotShapes(shapeDownArrow*BBcrossup,colorBrightGre en,0,0);

_SECTION_END();
_SECTION_END
 
#3
I find that they are shown here, but I don't have account to get them. http://w w w. f r iendlytraders.com/forum/2807_59/ttm-indicators-squeeze-autopivots-hourly-pivots-trend-brick-for-amibroker.html
 
#4
I've found this one. Hope it help.

//~~~~~~~~~~~~~~~~~~~~~ John Carter's TTM Squeeze Indicator~~~~~~~~~~~~~~~~~~~~~
// Description: Bollinger Bands AND Keltner Channel define the market
// conditions, i.e. when BB is narrower than KC then we have
// a market squeeze. When BB break Outside the KC then trade
// in the direction of the smoothed Momentum(12).
// Parameters:
// * chanPeriod - Bollinger Bands AND Keltner Channel length
// * bolBandStdDev - width of the Bollinger Bands
// * keltStdDev - width of the Keltner Bands
// * momPeriod - # of bars for Momentum indicator
// * momEMA - EMA of the Momentum indicator
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Source : John Carter, www.TradeTheMarkets.com
// Interpretation : Kris Tokarzewski, Johannesburg, 15-Dec-2006
// AmiBroker Conversion: Levent Pancuk, 22 Feb-2008
// [email protected]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_SECTION_BEGIN("TTM Squeeze");

function Momentum( array, period )
{
return array - Ref( array, -period );
}



chanPeriod = Param("Channel Period", 20);
bolBandStdDev = Param("Bollinger Band StdDev",2);
keltStdDev = Param("Keltner Band StdDev",1.5);
momPeriod = Param("Momemtum Period", 12 );
momEMA = Param("Momentum EMA Period", 5);

highBBChl = BBandTop( C, chanPeriod, bolBandStdDev);
lowBBChl = BBandBot( C, chanPeriod, bolBandStdDev);

centerLine = MA( C, chanPeriod );
highKeltn = centerLine + keltStdDev * ATR(chanPeriod);
lowKeltn = centerLine - keltStdDev * ATR(chanPeriod);

momHist = EMA(Momentum(C, momPeriod),momEMA);

BBUp = IIf(highBBChl > highKeltn AND momHist > 0, momHist, 0);
BBDo = IIf(lowBBChl < lowKeltn AND momHist < 0, momHist, 0);
BBMid = IIf(BBUp == 0 AND BBDo == 0, momHist, 0);


Buy = BBUp;
Sell = BBDo;

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

Plot(BBUp, "TTM Squeeze - Momentum Up", colorBlue,styleHistogram | styleThick);
Plot(BBDo, "Momentum Down", colorOrange, styleHistogram | styleThick);
Plot(BBMid, "Momentum Mid", IIf(BBMid > 0, colorLightBlue, colorBrown), styleHistogram | styleThick);

PlotShapes( shapeSmallCircle*Buy, colorGreen,0, 0, 0);
PlotShapes( shapeSmallCircle*Sell, colorRed,0, 0, 0);

_SECTION_END();
 

S S

Well-Known Member
#5
I was able to find these 2.
Can senior members pls. comment on them!

###########################
TTM Trend Indicator
###########################


_SECTION_BEGIN("Price");......
……..
_SECTION_END();

The afl “Gordon Rose” by Gordon Rose himself is lot better.


################
TTM Squeeze
################

_SECTION_BEGIN("Unnamed 6");
/*
BB Squeeze (conversion for TS code)
…………………….
…………………….

PlotShapes(shapeUpArrow*BBcrossDown, colorBrightGreen,0,0);

PlotShapes(shapeDownArrow*BBcrossup, colorBrightGreen,0,0);

_SECTION_END();
_SECTION_END ();

The syntax errors in last 4 lines have been corrected. The chart looks ugly. Better to Plot Histogram than Area.

The afl posted by strade is from amibroker afl forum, and therefore, more reliable.

Cheers!
 

Similar threads