Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Belka Macd (Tiker, Cena) for Amibroker (AFL)
wasil
about 7 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker

Shows a label at the top of the chart with the ticker name and price. The label has different colors based on the current macd. See below:

Belka Macd-Color Lime (Macd Up).
Belka Macd-Color Orange (Macd Down).
Tiker Cena-Color Up Macd.
Tiker Cena-Color Down Macd.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN( "Belka-Ticker,Cena" );

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );

ml = MACD( r1, r2 );
sl = Signal( r1, r2, r3 );

{
    SK = sl;
    SD = ml;
}

{
    SK = ml;
    SD = sl;
}

Buy  = Cross( SK, SD );
Sell = Cross( SD,  SK );

for( i = 0; i < BarCount; i++ )
{
    if( Buy[i] )
    {
        GfxGradientRect( 550, 24, 558, 27, ParamColor( "1", colorLime ), ParamColor( "2", colorPaleGreen ) );
        GfxGradientRect( 550, 27, 558, 30, ParamColor( "3", colorPaleGreen ), ParamColor( "4", colorPaleGreen ) );
        GfxGradientRect( 550, 30, 558, 33, ParamColor( "5", colorPaleGreen ), ParamColor( "6", colorPaleGreen ) );
        GfxGradientRect( 550, 33, 558, 40, ParamColor( "7", colorPaleGreen ), ParamColor( "8", colorLime ) );
        GfxGradientRect( 550, 40, 558, 43, ParamColor( "9", colorLime ), ParamColor( "10", colorLime ) );
        GfxGradientRect( 550, 43, 558, 46, ParamColor( "11", colorLime ), ParamColor( "12", colorLime ) );
        GfxGradientRect( 550, 46, 558, 49, ParamColor( "13", colorLime ), ParamColor( "14", colorGreen ) );
        GfxGradientRect( 550, 49, 558, 52, ParamColor( "15", colorGreen ), ParamColor( "16", colorDarkOliveGreen ) );
    }

    if( Sell[i] )
    {
        GfxGradientRect( 550, 24, 558, 27, ParamColor( "x1", colorLightOrange ), ParamColor( "x2", colorGold ) );
        GfxGradientRect( 550, 27, 558, 30, ParamColor( "x3", colorGold ), ParamColor( "x4", colorGold ) );
        GfxGradientRect( 550, 30, 558, 33, ParamColor( "x5", colorGold ), ParamColor( "x6", colorLightOrange ) );
        GfxGradientRect( 550, 33, 558, 40, ParamColor( "x7", colorLightOrange ), ParamColor( "x8", colorOrange ) );
        GfxGradientRect( 550, 40, 558, 43, ParamColor( "x9", colorOrange ), ParamColor( "x10", colorOrange ) );
        GfxGradientRect( 550, 43, 558, 46, ParamColor( "x11", colorOrange ), ParamColor( "x12", colorOrange ) );
        GfxGradientRect( 550, 46, 558, 49, ParamColor( "x13", colorOrange ), ParamColor( "x14", colorOrange ) );
        GfxGradientRect( 550, 49, 558, 52, ParamColor( "x15", colorRed ), ParamColor( "x16", colorDarkRed ) );
    }
}

for( i = 0; i < BarCount; i++ )
{
    if( Buy[i] )
    {
        GfxGradientRect( 615, 24, 658, 27, ParamColor( "1", colorLime ), ParamColor( "2", colorPaleGreen ) );
        GfxGradientRect( 615, 27, 658, 30, ParamColor( "3", colorPaleGreen ), ParamColor( "4", colorPaleGreen ) );
        GfxGradientRect( 615, 30, 658, 33, ParamColor( "5", colorPaleGreen ), ParamColor( "6", colorPaleGreen ) );
        GfxGradientRect( 615, 33, 658, 40, ParamColor( "7", colorPaleGreen ), ParamColor( "8", colorLime ) );
        GfxGradientRect( 615, 40, 658, 43, ParamColor( "9", colorLime ), ParamColor( "10", colorLime ) );
        GfxGradientRect( 615, 43, 658, 46, ParamColor( "11", colorLime ), ParamColor( "12", colorLime ) );
        GfxGradientRect( 615, 46, 658, 49, ParamColor( "13", colorLime ), ParamColor( "14", colorGreen ) );
        GfxGradientRect( 615, 49, 658, 52, ParamColor( "15", colorGreen ), ParamColor( "16", colorDarkOliveGreen ) );
    }

    if( Sell[i] )
    {
        GfxGradientRect( 615, 24, 658, 27, ParamColor( "x1", colorLightOrange ), ParamColor( "x2", colorGold ) );
        GfxGradientRect( 615, 27, 658, 30, ParamColor( "x3", colorGold ), ParamColor( "x4", colorGold ) );
        GfxGradientRect( 615, 30, 658, 33, ParamColor( "x5", colorGold ), ParamColor( "x6", colorLightOrange ) );
        GfxGradientRect( 615, 33, 658, 40, ParamColor( "x7", colorLightOrange ), ParamColor( "x8", colorOrange ) );
        GfxGradientRect( 615, 40, 658, 43, ParamColor( "x9", colorOrange ), ParamColor( "x10", colorOrange ) );
        GfxGradientRect( 615, 43, 658, 46, ParamColor( "x11", colorOrange ), ParamColor( "x12", colorOrange ) );
        GfxGradientRect( 615, 46, 658, 49, ParamColor( "x13", colorOrange ), ParamColor( "x14", colorOrange ) );
        GfxGradientRect( 615, 49, 658, 52, ParamColor( "x15", colorRed ), ParamColor( "x16", colorDarkRed ) );

    }
}

for( i = 0; i < BarCount; i++ )
{
    if( Buy[i] )
    {
        GfxGradientRect( 730, 24, 740, 27, ParamColor( "1", colorLime ), ParamColor( "2", colorPaleGreen ) );
        GfxGradientRect( 730, 27, 740, 30, ParamColor( "3", colorPaleGreen ), ParamColor( "4", colorPaleGreen ) );
        GfxGradientRect( 730, 30, 740, 33, ParamColor( "5", colorPaleGreen ), ParamColor( "6", colorPaleGreen ) );
        GfxGradientRect( 730, 33, 740, 40, ParamColor( "7", colorPaleGreen ), ParamColor( "8", colorLime ) );
        GfxGradientRect( 730, 40, 740, 43, ParamColor( "9", colorLime ), ParamColor( "10", colorLime ) );
        GfxGradientRect( 730, 43, 740, 46, ParamColor( "11", colorLime ), ParamColor( "12", colorLime ) );
        GfxGradientRect( 730, 46, 740, 49, ParamColor( "13", colorLime ), ParamColor( "14", colorGreen ) );
        GfxGradientRect( 658, 49, 740, 52, ParamColor( "15", colorGreen ), ParamColor( "16", colorDarkOliveGreen ) );

    }

    if( Sell[i] )
    {
        GfxGradientRect( 730, 24, 740, 27, ParamColor( "x1", colorLightOrange ), ParamColor( "x2", colorGold ) );
        GfxGradientRect( 730, 27, 740, 30, ParamColor( "x3", colorGold ), ParamColor( "x4", colorGold ) );
        GfxGradientRect( 730, 30, 740, 33, ParamColor( "x5", colorGold ), ParamColor( "x6", colorLightOrange ) );
        GfxGradientRect( 730, 33, 740, 40, ParamColor( "x7", colorLightOrange ), ParamColor( "x8", colorOrange ) );
        GfxGradientRect( 730, 40, 740, 43, ParamColor( "x9", colorOrange ), ParamColor( "x10", colorOrange ) );
        GfxGradientRect( 730, 43, 740, 46, ParamColor( "x11", colorOrange ), ParamColor( "x12", colorOrange ) );
        GfxGradientRect( 730, 46, 740, 49, ParamColor( "x13", colorOrange ), ParamColor( "x14", colorOrange ) );
        GfxGradientRect( 658, 49, 740, 52, ParamColor( "x15", colorRed ), ParamColor( "x16", colorDarkRed ) );

    }
}

for( i = 0; i < BarCount; i++ )
{
    if( Buy[i] )
    {
        GfxSetTextColor( ParamColor( "Color Up", colorGreen ) );
    }

    if( Sell[i] )
    {
        GfxSetTextColor( ParamColor( "Color Down", colorRed ) );
    }
}


FS = Param( "Font Size", 18, 11, 100, 1 );

GfxSelectFont( "Times New Roman", FS, 700, True );

Hor = Param( "Horizontal Position", 660, 1, 1200, 1 );

Ver = Param( "Vertical Position", 22, 1, 28, 1 );

GfxTextOut( "" + C, Hor , Ver );

_SECTION_END();


_SECTION_BEGIN( "Ticker" );

for( i = 0; i < BarCount; i++ )
{
    if( Buy[i] )
    {
        GfxSetTextColor( ParamColor( "Color Up", colorGreen ) );
    }

    if( Sell[i] )
    {
        GfxSetTextColor( ParamColor( "Color Down", colorRed ) );
    }
}


FS = Param( "Font Size", 18, 5, 100, 1 );

GfxSelectFont( "Times New Roman", FS, 700, True );

//GfxSetBkMode( colorWhite );

//GfxSetTextColor( ParamColor("Color",colorDarkOliveGreen) );

Hor = Param( "Horizontal Position", 560, 1, 1200, 1 );

Ver = Param( "Vertical Position", 24, 1, 100, 1 );

GfxTextOut( Name() , Hor , Ver );


_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back