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

visual price levels for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
amibroker, template

This is NO INDICATOR! It should be pasted below your own indicator!

you should have criteria with your indicator for long/sell/short/cover
if that’s available, you put this code below.
It uses a profittarget en stoploss of 2.5% and here it uses also the opening of the next day to close.

Don’t forget to change the questionmark !

explained:
EL = entry long (green)
LE = long exit (blue)

ES = entry short (red)
SE = short exit (orange)

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 5 years ago
Advanced Elliott Waves
Submitted by MarcosEn almost 8 years ago
3_6Day GuaiLiLv
Submitted by motorfly almost 8 years ago
Williams Alligator System
Submitted by durgesh1712 almost 8 years ago
*Level Breakout system*
Submitted by Tinych almost 8 years ago
Horizontal Live Priceline Tool
Submitted by northstar almost 8 years ago

Indicator / Formula

Copy & Paste Friendly
// change the questionmarks the the value which is used to plot the indicator
base_array= ? ;


ExRem(Buy,Sell);
ExRem(Short,Cover);

PlotShapes( Buy * shapeUpTriangle, colorBrightGreen, 0); 
PlotShapes( Short * shapeDownTriangle, colorOrange, 0); 
PlotShapes( Sell * shapeSmallCircle, colorRed, 0,base_array,Offset=25); 
PlotShapes( Cover * shapeSmallCircle, colorDarkGreen, 0,base_array,Offset=-25); 

ApplyStop(stopTypeLoss, stopModePercent, Optimize( "stopTypeLoss", 2.5, 2.5, 2.5, 0.5 ) ,2, True );
ApplyStop(stopTypeProfit , stopModePercent, Optimize( "stopTypeProfit ", 2.5, 2.5, 2.5, 0.1 ) ,2, True );


////////////////////////////// HIGHLY IMPORTANT ////////////////////

//ACTIVATE STOPS IN SETTINGS
e = Equity(1,0);  /* Highly Important!!. "Removes all extra signals, evaluates 
						stops AND writes BACK signals to Sell/Cover arrays". As it should be!!*/

PlotShapes( Buy* shapeUpArrow , colorBlack, 0); 
PlotShapes( Short* shapeDownArrow , colorBlack, 0);

/*
1 - regular exit
2 - Max. loss
3 - profit target
4 - trailing
5 - ruin stop
6 - n-bar stop
*/

PlotShapes(IIf(Cover==2, shapeCircle, shapeNone),colorRed,0,base_array,0); //stoploss
PlotShapes(IIf(Cover==3, shapeCircle, shapeNone),colorGreen,0,base_array,0); //profit target

PlotShapes(IIf(Sell==2, shapeCircle, shapeNone),colorRed,0,base_array,0); //stoploss
PlotShapes(IIf(Sell==3, shapeCircle, shapeNone),colorGreen,0,base_array,0); //profit target

////////////////////////////////////////////////////////////////////////////////
OffsetBuy = Param("Offset_Buy (green)", -9, -25, 25, 1 );
OffsetSell = Param("Offset_Sell (blue)", 2, -25, 25, 1 );
OffsetShort = Param("Offset_Short (red)", 7, -25, 25, 1 );
OffsetCover = Param("Offset_Cover (orange)", -4, -25, 25, 1 );

OND=Ref(O,1); //OPEN NEXT DAY
base_arrayBUY=base_array+OffsetBuy ; //just for offset
base_arraySELL=base_array+OffsetSell ; //just for offset
base_arraySHORT=base_array+OffsetShort ; //just for offset
base_arrayCOVER=base_array+OffsetCover ; //just for offset

for( i = 0; i < BarCount; i++ ) 
{ 
if( Buy[i] ) PlotText( "EL " + OND[ i ], i, base_arrayBUY[ i ], colorGreen );
if( Sell[i] AND NOT Short[i] ) PlotText( "LE " + OND[ i ], i, base_arraySELL[ i ], colorBlue);
if( Short[i] ) PlotText( "ES " + OND[ i ], i, base_arraySHORT[ i ], colorRed); 
if( Cover[i] AND NOT Buy[i]  ) PlotText( "SE " + OND[ i ], i, base_arrayCOVER[ i ], colorOrange); 
}

////////////////////////////////////////////////////////////////////////////////

_SECTION_BEGIN("trending ribbon");
GraphXSpace=15;
uptrend=Buy;
downtrend=Short;
Plot( 2, "ribbon",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorLavender )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();

////////////////////////////////////////////////////////////////////////////////

5 comments

1. aashish51

showing error

2. rasfar

Please help me to change question mark. I DON’T KNOW What to write?
Please give an example.

3. Dryden

alright, put this above the code, and replace the questionmark with ks
it’s a basic system which creates the buy/sell criteria
this is just to show the entrylevels be plotted on the chart

_SECTION_BEGIN("Stochastic %D%K");

//indicator criteria
periods = Param( "Periods", 15, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
KsDs = StochD( periods , Ksmooth, DSmooth );
Plot( KsDs , _DEFAULT_NAME(), colorRed , ParamStyle("Style") );

periods = Param( "Periods", 15, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Ks = StochK( periods , Ksmooth);
Plot( Ks , _DEFAULT_NAME(), colorBlue, ParamStyle("Style") );

// criteria buy/short
up = Cross(Ks,KsDs);
down = Cross(KsDs,Ks);

Buy = Cover = up;
Short = Sell = down;
_SECTION_END();
4. rasfar

Dear Dryden
Thanks,It is very good.

5. mhmd22

Dear Dryden
Itry many ways Igot many mistakes
can you do the AFL whithout quistion marks
please Explain it for me
best regards

Leave Comment

Please login here to leave a comment.

Back