Tuesday, May 28, 2013

Heidelberg Cement formed Cup and Handle pattern

As a part of our learning - Cup and Handle pattern, Support-Resistance and Pullback, today we will discuss the chart of Heidelberg Cement (HEIDELBCEM). Before start please see the below chart first:

Heidelberg Cement (HEIDELBCEM), May 28,  2013
Heidelberg Cement (HEIDELBCEM), May 28,  2013

Heidelberg Cement has formed a Cup and Handle chart pattern, indicated as A. We have drawn a Resistance line, indicated as Line - R. We have also drawn a average volume line, indicated as V. 

After forming a successful Cup and Handle pattern, usually, price goes to up. The cup has already formed. Now, the handle is forming. Low volume is also giving a support to form a successful Handle. If everything goes fine, then there is a strong chance for uptrend and price may hit the resistance level at 290. 

Sometimes handle formation takes long time. Price fall with large volume during handle formation time, it's a broken handle. I have drawn a blue line which is our support line. It will help us to identify the broken handle. Handle is another type of Pullback.

The bottom line is - Volume is the king. Present low volume is positive for handle formation. But large volume will be required when it breaks the top of the cup.

DSE General Index finds its support line.

As a part of our Breakout, Support-Resistance and Trend Line learning, today we will discuss the chart of Dhaka Stock Exchange (DSEGEN Index). Before start please see the below chart first:
DSE General Index, May 27, 2013
DSE General Index, May 27, 2013

After forming a double bottom, indicated as Oval, the DSE General Index broke its first resistance with large volume, indicated as R1. Then DSEGEN Index also broke the second resistance with large volume, indicated as R2. 

After forming a bearish candle, (pls. see the last apex candle), DSE General Index has stated to fall. We've got a green candle after consecutive 3 red candles. I have drawn a resistance line, indicated as Line R and a support line, indicated as Line S. Last green candle helps us to draw this support line.

I have also drawn a average volume line, indicated a Line V that indicated a very poor volume.

The  bottom line is - Market needs some fresh money to hold this sell pressure. We are near the ending point of Support and Resistance. So, any time we can see a Breakout or a Breakdown.


Square Pharma is testing its resistance.

As a part of our Breakout, Trend Line and Relation between volume and price learning, today we will discuss the chart of Square Pharma (SQURPHARMA). Before start please see the below chart first:

Stock chart of Square Pharma, May 27, 2013
Square Pharma, May 27, 2013

Recently, Square Pharma broke its initial resistance with large volume, indicated as Line A. Now, it's testing its another resistance line, indicated as Line B. Line B is a very strong resistance. It may test again and again as previous. To analyse a share, it's a good side we identify its resistance and support.

Now, we need to find the support line. We know that after a resistance breakout, it creates a support. In simple word, when a resistance breaks, it acts as a support. Now the Line A is our support line. I have also drawn another trend line as Support, indicated as Line C. The end point of Line A and Line C is our support zone, indicated as oval.

Our last and the most important indication is Volume. The volume is still below our average line, indicated as D.

The bottom line is - It's not necessary that the resistance line B will be tested again and again and price will come to our support zone, oval, to make our analysis 100% right. Resistance line B may break with good volume or the support line C may break down. Please keep in mind that Support or Resistance is create to break itself.

Monday, May 27, 2013

Chart Reading : Lesson - 4 (Part : 2): Pullback

In our last lesson, we discussed regarding the Breakout trading system. No trading system is 100% accurate. To follow the Breakout, sometimes you may caught by the Fake-out. How can we overcome this. We can overcome this by Pullback trading system.
Buy at 1st Pullback after a breakout.
Okay, Let's see the chart.
Pullback
Pullback
After a breakout, if you find a Higher Low (HL), yes, it's a Pullback. Buy at 1st Pullback after a breakout. Always try to catch the 1st Pullback. If you miss the first one then you may get more breakouts as well as pullbacks but you may compromise with profit.
Please keep in mind that Lower Low (LL) is not a pullback. If a Higher Low (HL) can not resist, then you will see a break down.
Which trading system should follow? Breakout? or Pullback? Ask it to your money management policy. It's not a bad idea if you use the both policy. Some money for Breakout and some money for Pullback and Some money for...... I will share you later.

Saturday, May 25, 2013

AFL Code Writing : Lesson 3 (Part 4)

Returned from the hibernation.

In our last tutorials we show you how to add simple moving average in your chart. We also learnt that how to make the moving average more dynamic for our user. Today, I will show you how to write moving average crossover.

Now, we will recall our last simple moving average code:

_SECTION_BEGIN("Moving Average");
//Below code will display 50 days simple moving average line
Plot (MA(Close, Param("Periods", 50, 2, 300)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));
_SECTION_END();

Today, we will see a moving average crossover between 10 days moving average and 30 days moving average. We already have code for moving average. We will use it. I have just copied the above moving average code 2 times as follows:

_SECTION_BEGIN("MA 30");
//Below code will display 30 days simple moving average line
Plot (MA(Close, Param("Periods", 30, 2, 300)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));
_SECTION_END();

_SECTION_BEGIN("MA 10");
//Below code will display 10 days simple moving average line
Plot (MA(Close, Param("Periods", 10, 2, 300)), "MA", ParamColor("Color", colorBlue), ParamStyle("Style", styleThick));
_SECTION_END();


I have made the following changes on our above two moving averages:
  • I have given separate names for our two moving averages. One is MA 30 and another one is MA 10. MA stands for Moving Average.
  • I have changed 50 days to 30 days and 10 days.
  • I have also changed the 10 days moving average color from from red to blue as our both moving average color were same.
Now, our final code for the two moving averages crossover as follows:
/*
-------------------------------
AFL code writing for moving average cross-over.
Date : May 25, 2013
-------------------------------
*/

_SECTION_BEGIN("Price");
//The below code will display the price through candlesticks
Plot( Close, "Close", ParamColor("Color", colorGold), ParamStyle("Style", styleCandle, maskAll));
_SECTION_END();


_SECTION_BEGIN("MA 30");
//Below code will display 30 days simple moving average line
Plot (MA(Close, Param("Periods",30, 2, 300)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));
_SECTION_END();


_SECTION_BEGIN("MA 10");
//Below code will display 10 days simple moving average line
Plot (MA(Close, Param("Periods", 10, 2, 300)), "MA", ParamColor("Color",colorBlue), ParamStyle("Style", styleThick));
_SECTION_END();

//-----------------------------

Allah Hafiz

Thursday, December 22, 2011

AFL Code Writing : Lesson 3 (Part 3)

Today we will make our simple moving average more dynamic. By the below code, our user is able to change the color and style of the moving average line without changing the code each time :

//Below code will display 100 days simple moving average line
Plot (MA(Close,100), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));


But your user is not able to change the period dynamically. Like s/he would like to see the 50 days simple moving average. S/he needs to change the code. BTW, we can solve the problem by Param() function. Pls. see the below modified line of our simple moving average :

//Your user will be able to change the periods without changing the code
Plot (MA(Close, Param("Periods", 50)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));


By right button clicking or pressing Ctrl+R on the chart, your user is able to change the periods of moving average as per their desire. Pls. see the below image :


By dragging the bar, your user will be able to change the periods without changing the code. If you still confused please see the below explanation image :


Syntax :  Param("Periods", 50)
Meaning : By writing Param(), we are telling that it will be added in Parameters... so that our user can change the value without changing the code each time . "Periods" is name and 50 is default value.

Please keep in mind that by default Minimum value is 0 and Maximum value is 100. That is your user will be able to see the 0 to 100 days simple moving average. If s/he wish to see the 200 days moving average, s/he will not able to see it. Okay, we will give him/her a power to see upto 300 days simple moving average by the below code :

//Your user will be able to see 2 to 300 days simple moving average
Plot (MA(Close, Param("Periods", 50, 2, 300)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));


Syntax :  Param("Periods", 50, 2, 300)
Meaning : Here 2 is the minimum value and 300 is the maximum value.

Below is the our upto date complete code :

/*
-------------------------------
I've written this Code for the
purpose of my blog writing.

 Date : December 21, 2011
-------------------------------
*/

_SECTION_BEGIN("Price");
//The below code will display the price through candlesticks
Plot( Close, "Close", ParamColor("Color", colorGold), ParamStyle("Style", styleCandle, maskAll));
_SECTION_END();


_SECTION_BEGIN("Moving Average");
//Below code will display 50 days simple moving average line
Plot (MA(Close, Param("Periods", 50, 2, 300)), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));
_SECTION_END();

//-----------------------------


Allah Haifz.

Wednesday, December 21, 2011

AFL Code Writing : Lesson 3 (Part 2)

Today, we will give more power to our afl user. Our user will be able to change the color and style of moving average line without editing the code. But how? Let's see

By the below code, our user will not able to change the color through Parameters... (Right click on the chart and you will find the Parameters...). Because our below code is not dynamic. If our user wants to change the color of line s/he needs to change the code.

//Below code is not a dynamic code
Plot (MA(Close,50), "MA", colorRed);


But how can make our code dynamic so that our users can change the color as their desire without changing the code every time? It's easy. You have done this before. Just remember it. If you can't remember, don't worry. Just see the below code.

//Now our user will able to change the color of line dynamically
Plot (MA(Close,50), "MA", ParamColor("Color", colorRed)
);

By adding ParamColor(), we have given power to our user to change the color through Parameters without changing the code. But our above code is not fully dynamic because our user is not able to change the line style dynamically.

//Now our user will able to change the line style dynamically
Plot (MA(Close,50), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));


In a previous lesson, I explained the ParamColor() and ParamStyle(). So, I'm not going to explain it again. Below is the upto date complete code :

/*
-------------------------------
I've written this Code for the
purpose of my blog writing.

Date : December 20, 2011
-------------------------------
*/

_SECTION_BEGIN("Price");
//The below code will display the price through candlesticks
Plot( Close, "Close", ParamColor("Color", colorGold), ParamStyle("Style", styleCandle, maskAll));
_SECTION_END();


_SECTION_BEGIN("Moving Average");
//Below code will display 50 days simple moving average line
Plot (MA(Close,50), "MA", ParamColor("Color", colorRed), ParamStyle("Style", styleThick));
_SECTION_END();

//-----------------------------


In our next lesson, I'll show you how can we make our moving average code more dynamic. Some of my friends are eager to see the moving average cross over. Don't worry. I'll explain it. Allah Hafiz.