--Here is my question: why are they using LinearReg to smoothen a curve; I have no clue
Regards --- In [email protected], "chetan_gariki" <[EMAIL PROTECTED]> wrote: > > Thanks Guno. The Heikin ashi is good; but there is something fishy > with the other ttmsqueeze indicator. in any case, i kind of played > with it for a while (a few days :() and have a good version. There is > one problem though. Take a look at this picture > first:http://www.flickr.com/photos/[EMAIL PROTECTED]/406220699/ > > Now i pretty much have a good idea of entry point, but to get a good > exit point i need the histogram to be smoother. The way they actually > recommend it on Tradethemarket website is that they use a moving > average of the 12day-mmomentum but that is not correct (they use > something else); but they actually appear to have copied the idea > from the tradestation messageboard. on there they actually say that > they are plotting a delta of the difference between the Donchian mid > line and Price but here is the code written for Tradestation: > > {-- Plot delta of price from Donchian mid line ----------} > value2 = LinearRegValue(price-((Highest(H, Length)+Lowest(L, > Length))/2 + xAverage(c,Length))/2,Length,0); > > --Here is my question: why are they using LinearReg to smoothen a > curve; as far as i understand if we use linear regression to fit a > curve it will fit it into a straight line; so if i use some linear > regression to smoothen the histogram i will rather get some straight > line parallel to the zero line. Perhaps LinearRegValue function in > tradestation does something totally different than what it is named > after? > > does anyone know what this above line of code exactly does in > tradestation? > > -- Another question: what is the best way to smoothen some curve like > that with minimal lag and minimal zig-zagging. i am looking into > some adaptive moving averages etc; perhaps even a MACD kind of a > thing on the momentum will do. but any ideas as to the best way to > smoothen a curve? (i know this is a classical question; but probably > there is a good answer somewhere). > > Regards > Gariki. > > PS: Also here is the code for the histogram i am playing with > > //CODE START **************************************** > /* > Plots the delta between Price and Donichan midline. Also in second > plot i am plotting a modified version of this delta because this is > what the tradestation code seems to be doing. but in addition to this > the trade station code is calculating something using a function > LinRegressionValue() that i am not able to replicate. This code is > used in addition with the code to see if the squeeze is in effect > (Bollinger bands inside Keltner channel) to use as a momemtum play. > */ > > MomentumValues = ParamField( "Field" ) - Ref(ParamField ( "Field" ), - > 12); > Plot( MomentumValues, "myMomentum_12_Days", colorRed, styleLine); > > pds=20; > DonchianUpper =HHV(Ref(H,-1),pds); > DonchianLower = LLV(Ref(L,-1),pds); > DonchianMiddle = (DonchianUpper+DonchianLower)/2; > > deltaDonichanPrice = Close - DonchianMiddle; > > Plot(deltaDonichanPrice, "myBBSqueeze",colorBlack, styleHistogram | > styleThick ); > > value2 = (Close - (( DonchianMiddle + EMA(Close, 20) )/2) ); > > Plot(value2, "value2",colorRed, styleHistogram | styleThick ); > > _SECTION_BEGIN("EMA1"); > P = ParamField("Price field",-1); > Periods = Param("Periods", 15, 2, 200, 1, 10 ); > Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", > colorCycle ), ParamStyle("Style") ); > _SECTION_END(); > > > //CODE END **************************************** > > > --- In [email protected], "gunovanengel" <gunovanengel@> > wrote: > > > > Hi, > > Squeeze > > http://www.amibroker.com/library/detail.php?id=453 > > Heikin ashi = ttmTrend > > http://www.amibroker.com/members/traders/02-2004.html > > > > Regards > > Guno > > --- In [email protected], "chetan_gariki" <chetan_gariki@> > > wrote: > > > > > > Hello Everyone, > > > > > > I am new to AB and am just getting used to the program; i am > > interested > > > in Tradethemarket indicators (TTM Squeeze and TTM Trend). I am > > trying > > > to code these indicators but wanted to check if someone already > has > > a > > > good version of these indicators. > > > > > > References: > > > http://www.tradethemarkets.com/products/department2.cfm > > > > > > They have code available for tradestation here: > > > http://www.traderslaboratory.com/forums/46/heikin-ashi-trend- > > indicator- > > > 951-2.html > > > > > > > > > > > > Thank you > > > gariki > > > > > >
