1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
SetChartOptions( 0, chartShowDates ); _SECTION_BEGIN( "Price" ); _N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} \nOp %g, \nHi %g, \nLo %g, \nCl %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) ); Plot( C, "Close", ParamColor( "Color", colorBlack ), styleNoTitle | styleCandle | styleThick ); _SECTION_END(); _SECTION_BEGIN( "pivot" ); price = ParamToggle( "Plot Price", "Off|On", 1 ); num = Param( "trend", 4, 1, 10, 1 ); dist = 0.5 * ATR( 10 ); rightfig = Param( "rightfig ", 7, 1, 10, 1 ); xspace = Param( "GraphXSpace ", 10, 1, 20, 1 ); mHHV = HHV( H, num ); mLLV = LLV( L, num ); FirstVisibleBar = Status( "FirstVisibleBar" ); Lastvisiblebar = Status( "LastVisibleBar" ); for ( b = Firstvisiblebar + num; b <= Lastvisiblebar AND b < BarCount - num; b++ ) { i = num; ml = 0; mu = 0; while ( i > 0 ) { if ( L[b] < L[b+i] ) { ml++; } if ( H[b] > H[b+i] ) { mu++; } i--; } if ( ml == num AND L[B] == mLLV[B] ) { PlotText( "\n *\n", b, L[b], colorGreen ); if ( price == 1 ) { p = StrRight( NumToStr( L[b], 4.1 ), rightfig ); PlotText( "\n\n" + p, b - 2 , L[b] , colorGreen ); } } if ( mu == num AND H[B] == mHHV[B] ) { PlotText( " *\n", b, H[b], colorRed ); if ( price == 1 ) { p = StrRight( NumToStr( H[b], 4.1 ), rightfig ); PlotText( p , b - 2 , H[b] + dist[b] + 1, colorRed ); } } } _SECTION_END(); GraphXSpace = xspace; |
[ratings]
Was this helpful?
0 / 0