Experiments in Technical Analysis

Hello Marcus,

Chaikin Money Flow Indicator Appeared in the January 94 issue of Stocks & Commodities magazine Like the popular Chaikin A/D Oscillator developed by Marc Chaikin, the Chaikin Money Flow indicator is based on the Accumulation/Distribution line. It is created by summing the values of the Accumulation/Distribution Line for 21 periods and then dividing by a 21 period sum of the volume. The interpretation of the Chaikin Money Flow indicator is based on the assumption that market strength is usually accompanied by prices closing in the upper half of their daily range with increasing volume. Likewise, market weakness is usually accompanied by prices closing in the lower half of their daily range with increasing volume. If prices consistently close in the upper half of their daily high/low range on increased volume, then the indicator will be positive (i.e., above the zero line). This indicates that the market is strong. Conversely, if prices consistently close in the lower half of their daily high/low range on increased volume, then the indicator will be negative (i.e., below the zero line). This indicates that the market is weak. The Chaikin Money Flow indicator provides excellent confirmation signals of trendline and support/resistance breakouts. For example, if a security's prices have recently penetrated a downward sloping trendline (signaling a potential trend reversal), you may want to wait for further confirmation by allowing the Chaikin Money Flow indicator to cross above the zero line. This may indicate an overall shift from a downtrend to a new uptrend. A divergence between the Chaikin Money Flow indicator and prices are also significant. For example, if the most recent peak of the indicator is lower than it's prior peak, yet prices are continuing upward, this may indicate weakness.
Formula:
/*
Chaikin Money Flow Indicator


*/

Graph0 = sum(((( C-L )-( H-C )) / ( H-L ))*V, 21 ) / sum(V,21);


Comments:Andy
[email protected]
2005-06-23 15:23:48 I love this formula, it has helped out so much in my trading. It far surpases the Acc/Dist and the Chaikin Osilator. My only problem with it is that I trade the Forex market with esignal data. For some reason they have data bars for Fri Eve through Sunday with no volume and it messes up the Indicator, does anyone know a way around this?

Thanks,

Andy
Tomasz Janeczko

2005-08-30 19:37:35 Turn on weekend filtering




VOLUME on pricechart

Go to Amibroker main menu view , charts, Basic charts, select Volume at price and right click and select overlay and then you get properties parameter window where you can select side button to place the volume on the left or right side of price chart


Regards

SAJI
 
Hello Marcus,

I think you asked for Chaikin Oscillator. Here is the AFL


_SECTION_BEGIN("Chaikin");
r1 = Param( "Fast avg", 9, 2, 200, 1 );
r2 = Param( "Slow avg", 14, 2, 200, 1 );
Plot( Chaikin(r1,r2), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Plot(0 ,"Zero",colorBlue);
Buy=Cross(Chaikin(r1,r2),0);
Sell=Cross(0,Chaikin(r1,r2));
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBlue);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed);
Title = "{{NAME}} - {{INTERVAL}} {{DATE}} - Chaikin Oscillator: {{VALUES}}";

_SECTION_END();

Regards

Saji
 
Hello Marcus,

I could not understand what you meant by "only problem is it fails if H==L although its very rare it is possible,". Is it you are adding a filter or conditon for buy or sell where high equals low. In AFL H==L means high equals low. How can it be. May be Karthik can help you better.

Regarding the volume bars you can try Market Profile Volume AFL. it has the same style as required by you. I am not sure it is in the library or not. It is a new addition.Any way search for it if you cannot find it let me know. May be you require to modify the existing volume AFL plot statements with the plot statements from Market Profile Volume AFL. It should be easy.

Saji
 

marcus

Active Member
Dear Saji,

Yes that is what I meant if High = Low (as I said rare but possible) the entire formula will fail because the denominator will be zero. Hence we will not get a Chaikin Money flow line at all and will get an error, any possibility should be taken care of.

0/1 is acceptable and gives is 0
0/0 is not acceptable and is a meaningless quantity

I will check the market profile volume, thanks for mentioning it Sajji I want something as close as possible to PBV, id i cant get it will ask you again.

Thanks for your help
 
Hi Karthik,

I am putting this question here though not very relevant to this thread but since u were using a moving average based trading system intially I thought you would be the right person to ask this and ofcourse I would like if other ppl contribute.

1. if using a crossover of moving averages or a price crossover for moving averages as a set up bar/ or as a buy signal what can be the various strategies to decide on a exit price. Cause if we want to implement money mgmt to our trading we need to have an exit price. I am aware of previous pivot low(taught by saint) and three bars high (traderji). Are there other methods ppl use.

2. once the price moves up what can be the various methods to retain the profits i.e not to exit after loosing most of the profits gained. I am not trying to catch the entire move but yes how can be retain most of it.

3. Moving average based signals give at times very nice moves but also in ranging market gives a lot of wipsaws. What indicators can we add to reduce them. Maybe add MACD and ADX/Ravi.

Views from various members would help identify different mindsets and strategies and maybe we can mix and match as per our trading styles. Hope to get participation in this post.

What I am using right now is the 23-30 ema. A close above this as a set up bar and a price movement above this as a buy signal. I want to try and add on to this. Some of the buy signals given by this methid have been very nice but still a lot of wipsaws.

Rgds

Rahul
 

karthikmarar

Well-Known Member
Hi Karthik,

I am putting this question here though not very relevant to this thread but since u were using a moving average based trading system intially I thought you would be the right person to ask this and ofcourse I would like if other ppl contribute.

1. if using a crossover of moving averages or a price crossover for moving averages as a set up bar/ or as a buy signal what can be the various strategies to decide on a exit price. Cause if we want to implement money mgmt to our trading we need to have an exit price. I am aware of previous pivot low(taught by saint) and three bars high (traderji). Are there other methods ppl use.

2. once the price moves up what can be the various methods to retain the profits i.e not to exit after loosing most of the profits gained. I am not trying to catch the entire move but yes how can be retain most of it.

Rahul
Dear Rahul

Yes, It is a difficult to decide when to take your profits without giving too much back or getting out of the trend too early. Most people who make a good entry seem to have difficulty on this aspect. The objective should be to make use of the trend to the maximum and get out without giving back too much.

Many strategies are used to exit like trailing stops, percentage retrenchment stops, timed stops, fixed amount stops. The most popular one is the Trailing stops. Trailing stops could be based on volatility, channel breakout, moving average etc. I will cover some of these in detail soon though information about these could be found about these in the forum itself.


3. Moving average based signals give at times very nice moves but also in ranging market gives a lot of wipsaws. What indicators can we add to reduce them. Maybe add MACD and ADX/Ravi.

What I am using right now is the 23-30 ema. A close above this as a set up bar and a price movement above this as a buy signal. I want to try and add on to this. Some of the buy signals given by this methid have been very nice but still a lot of wipsaws.
Rahul
As we all know the moving average crossover gives good entry when the market starts trending. But to see if the trend has really started and we are going into a ranging market is difficult. ADX and RAVI do help us in this regard. One of the easiest way seems to be to wait for higher high and a higher low to be formed. Combine this with ADX or RAVI and this will definitely help you to avoid the whipsaws.

Hope this has helped. I will deal with the trailing stops in the coming posts as I am little tied up presently.

Warm regards

Karthik
 
Dear Rahul

Yes, It is a difficult to decide when to take your profits without giving too much back or getting out of the trend too early. Most people who make a good entry seem to have difficulty on this aspect. The objective should be to make use of the trend to the maximum and get out without giving back too much.

Many strategies are used to exit like trailing stops, percentage retrenchment stops, timed stops, fixed amount stops. The most popular one is the Trailing stops. Trailing stops could be based on volatility, channel breakout, moving average etc. I will cover some of these in detail soon though information about these could be found about these in the forum itself.




As we all know the moving average crossover gives good entry when the market starts trending. But to see if the trend has really started and we are going into a ranging market is difficult. ADX and RAVI do help us in this regard. One of the easiest way seems to be to wait for higher high and a higher low to be formed. Combine this with ADX or RAVI and this will definitely help you to avoid the whipsaws.

Hope this has helped. I will deal with the trailing stops in the coming posts as I am little tied up presently.

Warm regards

Karthik

Thanks karthik I think a topic on protecting profits would be great. the problem i see is if I use a trend line method I see it keeps violating trend line and then the price moves up and in commodities market u have lots so if u have only one lot then there has to be a different approach to it.

Also if we use a movign average method to exit then at times a lot of profit is missed.

I am sure there is no perfect way to exit at the top but atleast I am hoping to learn a method that would help protect most of it.

Rgds

Rahul
 

SGM

Active Member
1. If using a crossover of moving averages or a price crossover for moving averages as a set up bar/ or as a buy signal
......................

3. Moving average based signals give at times very nice moves but also in ranging market gives a lot of wipsaws.

What I am using right now is the 23-30 EMA. A close above this as a set up bar and a price movement above this as a buy signal.

I want to try and add on to this. Some of the buy signals given by this method have been very nice but still a lot of wipsaws.

Rgds

Rahul
Hello Rahul

A system based on moving average/price/crossover is basically a simple trend following system. In this kind of a system it is important to define the time frame that we will be working with. This is done with selection of the EMA pair. In your system you have selected 23-30 EMAs.

I am sure you would have tried different combinations like for e.g. 3-13/13-33/50-200 or even using simple/weighted averages instead of EMAs. Usually selecting averages with smaller time frame will get us in the trend early but also we get more whipsaws on the other hand bigger the timeframe wider the placement SLs.

I was reading about the Turtle Trading System, in which instead of having one entry criteria they use two entry criteria with different timeframes. Besides entry criteria they also had very well defined rules for Position Sizing, Stops, and Exits. The most surprising thing is they have used a very simple method as entry criteria; they use 20-Day break out and 55-Day break out as System 1 and 2 respectively.

There is one interesting rule in the system, “System 1 (smaller time frame signal) will be ignored if the last break out would have resulted in a winning trade.” Would using this rule with the crossover system give us some statistical advantage? Like, we do not trade the next crossover signal after a winning trade. This is done irrespective of if we took the previous winning trade or not.

Would it help with your system to use 2 pair of EMAs for entery criteria instead of only 23-30? I guess it would need lots of back testing and experimentations :) to decide on the right combinations.

Download the pdf document that influenced the above thoughts. In fact it would be interesting to back test the turtle system rules with different crossover entry criteria on historical data.

Regards
Sanjay
 
Last edited:

casoni

Well-Known Member
Hello Rahul

A system based on moving average/price/crossover is basically a simple trend following system. In this kind of a system it is important to define the time frame that we will be working with. This is done with selection of the EMA pair. In your system you have selected 23-30 EMAs.

I am sure you would have tried different combinations like for e.g. 3-13/13-33/50-200 or even using simple/weighted averages instead of EMAs. Usually selecting averages with smaller time frame will get us in the trend early but also we get more whipsaws on the other hand bigger the timeframe wider the placement SLs.

I was reading about the Turtle Trading System, in which instead of having one entry criteria they use two entry criteria with different timeframes. Besides entry criteria they also had very well defined rules for Position Sizing, Stops, and Exits. The most surprising thing is they have used a very simple method as entry criteria; they use 20-Day break out and 55-Day break out as System 1 and 2 respectively.

There is one interesting rule in the system, System 1 (smaller time frame signal) will be ignored if the last break out would have resulted in a winning trade. Would using this rule with the crossover system give us some statistical advantage? Like, we do not trade the next crossover signal after a winning trade. This is done irrespective of if we took the previous winning trade or not.

Would it help with your system to use 2 pair of EMAs for entery criteria instead of only 23-30? I guess it would need lots of back testing and experimentations :) to decide on the right combinations.

Download the pdf document that influenced the above thoughts. In fact it would be interesting to back test the turtle system rules with different crossover entry criteria on historical data.

Regards
Sanjay
THANK YOU FOR THE PDF....I FOUND VERY INTERESTING & THIS WILL HELP ME\ EVERYONE A LOT...
 

Similar threads