|
- _SECTION_BEGIN("Price");
- SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle);
- //_N(Title = StrFormat("{{NAME}} +" - {{Interval}} {{Date}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
- _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
- Plot( C, "", IIf(Close > Open, colorGreen, colorRed), styleBar + styleNoLabel);
- _SECTION_END();
- function T3(price,periods) //AMA-based
- {
- s = 0.618;
- periods = 2/(periods+1);
- e1=AMA(price,periods);
- e2=AMA(e1,Periods);
- e3=AMA(e2,Periods);
- e4=AMA(e3,Periods);
- e5=AMA(e4,Periods);
- e6=AMA(e5,Periods);
- c1=-s*s*s;
- c2=3*s*s+3*s*s*s;
- c3=-6*s*s-3*s-3*s*s*s;
- c4=1+3*s+s*s*s+3*s*s;
- Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
- return ti3;
- }
- //Ribbon
- //Ribbon
- uptrend=PDI()>MDI()AND Signal()<MACD();
- downtrend=MDI()>PDI()AND Signal()>MACD();
- Plot( 2, "",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
- Plot(T3(C,3),"T3",colorTan,styleThick);
- Plot(T3(C,5),"T5",colorLime);
- BuyAlert = Cross (T3(C,3), T3(C,5));
- SellAlert = Cross (T3(C,5), T3(C,3));
- shape = BuyAlert * shapeHollowUpArrow + SellAlert * shapeHollowDownArrow;
- PlotShapes( shape, IIf( BuyAlert ,ColorRGB(210,0,210), colorPink ),0, IIf( BuyAlert , Low, High ) );
- GraphXSpace = 5;
- dist = 0.70*ATR(7);
- for( i = 0; i < BarCount; i++ )
- {
- if( Buyalert[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
- if( Sellalert[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed ); }
- Buy = BuyAlert;
- Sell = SellAlert;
- Filter = Buy OR Sell;
- Filter = Volume > 50000;
- AddColumn(Buy, "Buy", 1);
- AddColumn(Sell, "Sell", 1);
- AddColumn(V, "Volume", 1);
- AddColumn(C, "Close", 1.2);
複製代碼
|
|