T3 price and Chart system for Amibroker
_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 ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist, colorGreen );
if( Sellalert ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist, 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);
第2張丟錯嘞^^ 本帖最後由 金双盈 於 10-6-11 05:04 PM 編輯
看起來很清楚
跌破均線就轉空方顏色加箭頭
可以拿來嘗試修改看看 {:4_164:}謝謝分享有符號喔
頁:
[1]