Monday, 15 September 2014

50 50 Trading System By TradersZone for Amibroker (AFL)


50 50 Trading System By TradersZone for Amibroker (AFL)


_N(Title = StrFormat(EncodeColor( colorGold) + "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
    SetChartOptions(0,chartShowArrows|chartShowDates);

   
    SetChartBkColor(ColorRGB(23,23,23));

 
    priceStyle = IIf( (Interval(0) == -900), styleLine, styleBar);

   
    if (BeginValue(BarIndex()) != 0 AND EndValue(BarIndex()) != BarCount-1) {
    range = EndValue(BarIndex())-BeginValue(BarIndex());
    Title += StrFormat("\nRange Bars: %g", range);
    }

    CandleBorder = ParamColor("Candle Border Color", colorBlack );
    UpCandleColor = ParamColor("Up Candle Color", colorGreen );
    DownCandleColor = ParamColor("Down Candle Color", colorRed );


    Graph0BarColor = IIf( C > O,UpCandleColor ,DownCandleColor);

    Plot( C, "Close", CandleBorder, styleNoTitle | ParamStyle("Style") | priceStyle );





x = TEMA(Close,12);
y = TEMA(Close,20);
Z= TEMA(Close,50);
Buy=Cross(x,y );
Sell=Cross(y, x);

SUPERBUY=Cross(Y,Z);
SUPERSELL=Cross(Z,Y);
PlotShapes( SUPERBUY * shapeHollowCircle, colorWhite, 0);
PlotShapes( SUPERSELL * shapeHollowCircle, colorBlue, 0);
PlotShapes( Buy * shapeUpTriangle, colorBrightGreen, 0);
PlotShapes( Sell * shapeDownTriangle, colorRed, 0);



dist = 1.9*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed, colorYellow );
if( SUPERBUY[i] ) PlotText( "SUPERSELL\n@" + C[ i ], i, L[ i ]-dist[i], colorWhite );
if( SUPERSELL[i] ) PlotText( "SUPERBUY\n@" + C[ i ], i, H[ i ]+dist[i], colorBlue, colorYellow );

}

No comments:

Post a Comment

Thanks