Momentum Indicator For Trend Confirmation |
//www.aflcode.com 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 ****************************************
Sign up here with your email
ConversionConversion EmoticonEmoticon