Monday, 9 September 2013

Amibroker AFL for positional trading


Today I am posting another AFL for the benefit of delivery based traders. This AFL can indicate or make sure you are on the safer side of the market. When this AFL is plotted one can observe colored dots appearing at the end of a trend. The white dot alerts us that new high or new lows are being formed. One can use this alert to exit with profit or enter short. The red dot signals a ongoing downtrend. Similarly a green dot tells us that the uptrend is intact.

There are two lines indicating MA High and Low. if these lines are plotted on a weekly chart one can have a better understanding of the stock in question. If the stock price moves down touching the Lower line and forms a green dot this is certainly a good buy for a medium term, say 2 or 3 weeks. when the stock price moves well above the upper line continues to give red dots as alerts, it safe to book your profits.

I am not the creator of this AFL, therefore the credit goes to the original creator of this trading system.

 /////////////////Copy the code below this line and past in the formula editor, name it and save it under the custom folder ////////////////////////////////////////////////////////

_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() );
mH    =    MA(H, 20);        mL    =    MA(L, 20);

Plot(mH ,"MA-H", IIf(mH > Ref(mH,-1), colorBlue,colorRed), styleThick);
Plot(mL ,"MA-L", IIf(mL > Ref(mL,-1), colorBlue,colorRed), styleThick);

Lx=LastValue(x=BarIndex());
pk=H>Ref(HHV(H,5),-1) AND Ref(HHV(H,5),5)<=H;
tr=L<Ref(LLV(L,5),-1) AND Ref(LLV(L,5),5)>=L;
PlotShapes(shapeSmallCircle*tr, IIf(Lx-ValueWhen(tr,x)>=5,colorBrightGreen,colorWhite),0,round(L*0.999),0);
PlotShapes(shapeSmallCircle*pk, IIf(Lx-ValueWhen(pk,x)>=5,colorOrange,colorWhite),0,round(H*1.001),0);
_SECTION_END();
 ////////////////////////////////////////////////////////
Happy trading !!

Saturday, 17 August 2013

Amibroker Afl for delivery based trading

This post is for those who love technical analysis of shares. Taking a decision based on technical analysis could be a better way of trading or it is like being on the right side of the market. 

For those who are familiar with Amibroker the following Afl could help them take a decision. This indicator when applied on a weekly charts gives some reliable buy signals. But these signals are meant for trading on a delivery basis. Please keep in mind when you buy a stock decide on the targets. Once the  targets are achieved sell the stock and wait for a another opportunity. You can even switch sectors, which is also a good thinking. This Afl was Developed and Conceptualised by Debdulal And Soumya for whom the credit belongs. Please copy the following code to the code editor in the Amibroker window and save in custom formula folder. You can name the code anyway you like. when you double click the newly created Afl you will see the charts. It is better to set the chart on weekly basis to have a meaningful buy or sell signal.

If you have any difficulty, or need clarification please mail me.

Good trading!!

_SECTION_BEGIN("debdulal");
//Title="Indicator Developed and Conceptualised by Debdulal And Soumya";
 SetChartOptions(0,chartShowArrows|chartShowDates);
_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 )) ));

// This part will plot the EMA value And type of user choice
 EMAstyle=ParamStyle("MAType",styleLine,maskAll );
LTEMAcolor=ParamColor("LT EMA Colour" ,colorRed);
STEMAcolor=ParamColor("ST EMA Colour",colorGreen);
LTEMAPeriod=Param("LTEMA Period",30);
STEMAPeriod=Param("STEMA Period",13);
Plot(EMA(Close,STEMAPeriod),"EMA of "+STEMAPeriod+" Days" , STEMAcolor, EMAstyle, Null, Null );
Plot(EMA(Close,LTEMAPeriod), "EMA of "+LTEMAPeriod+" Days", LTEMAcolor, EMAstyle, Null, Null );
//Plot(SAR(.02,.2),"SAR",colorBlue,maskAll,Null,Null);

// This part will plot Closing price with barstyle choosen by user
 ChartStyl=ParamStyle("Chart Type", styleBar,maskAll );
Chartcolor=ParamColor("Chart Colour",colorGreen);
Plot(Close,"Debdulal",Chartcolor,ChartStyl);

// This part will find the buy and sell point in the chart
 SellTRIGGER=MACD(12,26)<= Signal(12,26,9);
Buy=Cross(MACD(12,26),Signal(12,26,9));
Sell=(EMA(Close,LTEMAperiod)>EMA(Close,STEMAperiod)) AND SellTRIGGER;
 //Buy= MACD(12,26)>=Signal(12,26,9);
//Sell=MACD(12,26)<Signal(12,26,9);
//Sell=Cross(EMA(Open,Operiod),EMA(Close,Cperiod))AND MACD(12,26)<Signal(12,26,9);

Buy     = ExRem(Buy, Sell);
Sell    = ExRem(Sell, Buy);
Signalshape=Buy*shapeUpArrow + Sell*shapeDownArrow;
PlotShapes( Signalshape, IIf( Buy, colorBrightGreen, colorRed ),0, IIf( Buy, Low, High ) );
pos = 1.3*ATR(15);
for( i = 0; i < BarCount; i++ ) {
       if( Buy[i] ) PlotText( "Buy\n@" + Close[i], i, Low[i] - pos[i], colorBrightGreen );
       if( Sell[i] ) PlotText( "sell\n@" + Close[i], i, Low[i] + pos[i], colorBlue );
    }
_SECTION_END();

Wednesday, 17 July 2013

Investment Ideas - Britannia Industries Limited



 Britannia Industries Limited one of the most respected player in the Indian Foods market.  The trade name Britannia is a household name in India. It has a wide range of product like Tiger, Marie Gold, Good Day, 50:50,Treat and many more

The Company was formed in the year 1918 as a public limited company. The company has manufacturing facilities at Kolkata, Chennai, Mumbai and Uttarakhand. Its production facilities are well equipped with modern ovens and other amenities. The company relied on quality and value. Soon the company built up a brand name that carried the blessings of the Indian consumers. The company has a unique credit of supplying service biscuits to the armed forces, which speaks volume of its commitment to quality and value.

The expansion of the company actually began in the year 1924 with a new facility at Mumbai. In 1952 the Kolkatta facility was relocated at a larger complex, Taratola Road. Two years back the company went on modernizing the factories with automatic machines.  In 1965, the company started making Bread at a mew bakery in Delhi. It was in 1976 the company expanded its Bread business to Calcutta and Chennai. 

The year 1978 was an important milestone for Britannia. After its Public issue, the company changed its name to Britannia Industries Limited (BIL), which came into effect from 3rd October, 1979

In the year 1980 a collaboration arrangement was announced with Nebico Ltd, a Nepal based company for technical know how for the production of biscuits. 

 During the year 1990,  new brands of biscuits were launched. They are  Elaichi Cream and and Petit Beurre ,variant of the brand Milk Bikis. These brands were well received by the Indian consumers. The company also expanded its bread business with  the launch of Milk Bread and Brown Bread  and fruit Bread from its Bakery in Delhi.

In 1993 the Wadia group became equal partner in BIL in this year trhe company entered into  the dairy products market. The company started  marketing  cakes filled with cream in two variants, chocolate-vanilla and vanilla-orange. The Company also brought out  flavored milk under the brand Zip-Sip. The company  launched Britannia Milkman Butter,  under the Milkman brand. 

BIL  entered into  agreement to acquire 49 per cent of Kwality Biscuits in the year 2001.in the year  2002, the company  announced a  joint venture with the Fonterra Cooperative Group, New Zealand's biggest diary co-operative group. With this  Britannia New Zealand Foods Pvt. Ltd was born.

 During the year 2004, Britannia added more variants to its existing brands with great success.  In the year 200 BIL had forged an  alliance with CCD Daily Bread Pvt Ltd, This was a Bangalore based Company engaged in manufacturing and retailing of bakery products.In the year 2007, Britannia industries reported a joint venture with the Khimji Ramdas Group and acquired a 70 percent  stake in the Dubai-based Strategic Foods International Co. LLC and 65.4% in the Oman-based Al Sallan Food Industries Co. SAOG.

The respected Business Today ranked this company  and gave the 27th rank  which speaks volume of the company.

In the year September 1999 the company announced a bonus at the ratio of 1:2. In the year 2010 March another bonus at the ratio of 1:1 was offered. In September 2010 the face value was split from Rs.10 to Rs.2.

According to available data the gross sales for the period  ending March 13 was 5564 Cr. The total reported income was 5671 Cr.  Total expenditure of the company stood at 5244 Cr.  The reported profit after tax was 234 Cr. The EPS  it at 19.6 the dividend for the year ending March 13 was 425%. The face value of the stock is Rs. 2/-

Some of the prominent Mutual Funds that hold this stock in their portfolio are HDFC Tax Saver Fund  (65.99Cr.), Birla Sun Life Frontline Plan A(G) , (22.52Cr.), Birla Sun Life Midcap Fund Plan A(G), 22.64Cr.) HDFC Long Term Advantage Fund (G) (17.38 Cr.) Reliance Long Term Equity Fund (G) (17.2 Cr.)

At the time of writing this review the company’s shares were trading at Rs.679. in the recent months many investors have parked their money in this counter. The BIL has not let them down. The manner in which the company conducts its business amid stiff competition has earned a good name for investment. Short term and long term investors can consider this company for adding to their portfolio. This share is most suitable for long term investment.