_SECTION_BEGIN( " Manoj Price" );
ShowVAP = ParamToggle( "Show VAP", "No|Yes" );
VPTF = ParamList( "VP Timeframe", "Hourly|Daily|Weekly|Monthly", 1 );
if( VPTF == "Monthly" ) segments = Month() != Ref( Month(), -1 );
else
if( VPTF == "Daily" ) segments = Day() != Ref( Day(), -1 );
else
if( VPTF == "Hourly" ) segments = Hour() != Ref( Hour(), -1 );
else segments = ( DayOfWeek() == 1 AND Ref( DayOfWeek(), -1 ) != 1 );
if( showVAP == True )
PlotVAPOverlayA( segments , Param( "Lines", 100, 100, 1000, 1 ), Param( "Width", 50, 1, 100, 1 ), ParamColor( "Color", ColorBlend(colorYellow, colorAqua,0.4) ), ParamToggle( "Side", "Right|Left" ) | 2 * ParamToggle( "Style", "Fill|Lines", 0 ) | 4 * ParamToggle( "Z-order", "On top|Behind", 1 ) );
range = Param( "ADX Period", 8, 2, 200, 1 );
di = Param( "DI Period", 13, 3, 200, 1 );
bull = PDI( di );
bear = MDI( di );
adxvalue = ADX( range );
color = IIf( bull > 25 AND bull > bear AND bear < 20 , ColorBlend(colorGreen, colorWhite, 0.4), IIf( bear > 25 AND bear > bull AND bull < 20 , ColorBlend(colorRed, colorGold,0.4), colorGold ) );
Plotohlc( O, H, L, C, "Close", IIf( adxvalue > 25 AND adxvalue > Ref( adxvalue, -2 ), color, IIf( adxvalue < 25, colorbluegrey, colorBlack ) ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() | styleNoLabel );
Title = EncodeColor( colorblack ) + StrFormat( " {{INTERVAL}} - {{DATE}} " ) + StrFormat( "" + EncodeColor( colordarkblue ) + " O = %g " + EncodeColor( colorseagreen ) + " H = %g " + EncodeColor( colorbrown ) + " L = %g " + EncodeColor( colorRed ) + " C = %g , {{VALUES}}", O, H, L, C ) ;