// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); _SECTION_BEGIN("Time and Money"); // plot candlestick price chart Plot( Close, "Price", colorBlack, styleCandle ); GraphXSpace = 1; // define TAM chart period period = 25; // users of AB version 4.30 can use Param // period = Param( "TAM period", 25, 2, 100, 1 ); halfperiod = floor( period /2 ); // minor term average Arm = MA( Close, period ); Plot( Arm, "Minor term avg", colorRed ); // calculate volatility yom = 100 * ( C - Ref( Arm, halfperiod ))/Ref( Arm, halfperiod ); avyom = MA( yom, 2 * period ); varyom = MA( yom * yom, 2 * period ) - avyom * avyom; som = Ref( sqrt( varyom ), -halfperiod ); sigom = MA( som, period ); // plot reference price grid Plot( Arm * ( 1 + 0.01 * sigom ), "Ch+1", colorLightGrey ); Plot( Arm * ( 1 - 0.01 * sigom ), "Ch-1", colorLightGrey ); Plot( Arm * ( 1 + 0.02 * sigom ), "Ch+2", colorLightGrey ); Plot( Arm * ( 1 - 0.02 * sigom ), "Ch-2", colorLightGrey ); Plot( Arm * ( 1 + 0.03 * sigom ), "Ch+3", colorLightGrey ); Plot( Arm * ( 1 - 0.03 * sigom ), "Ch-3", colorLightGrey ); _SECTION_END();