Sunday, August 15, 2010

DARVAS BOX CODE

Hello and welcome to my blog.

This is not a recommendation to buy or sell any of the stocks discussed on this blog. Due diligence is your responsibility. If you need professional investment advice then find a professional.

With so many posts today I must be making up for lost time. Since I have mentioned the DARVAS BOX in the most recent posts I will publish the MetaStock code that I am using. There is a link to a critique of the DARVAS BOX in the link section. You can also google the name and get a lot of hits. If you add MetaStock forum or MetaStock code to your search I am sure you will find information for constructing the box. I know that what I am using was created by someone else. I give my deepest thanks to them but apologize for not knowing exactly where it came from. When I am surfing later I will look for the specific address. Credit and thanks go to the original creator of the following. I have only modified it slightly. Went and found a couple of links for the code.

http://trader.online.pl/MSZ/e-w-Darvas_Box.html
This is the basic one that I modified. Thank you.

http://www.guppytraders.com/gup206.shtml
This one is very detailed and provides information on setting up alerts and all the MetaStock bells and whistles. I will go back and check this one out. Thanks in advance.

http://www.sethi.org/investments/darvas/sbp_java.phtml
This is an online automatic DARVAS BOX generator. Fun to play with and an easy way to check out ideas. No coding or other work involved.

DARVAS BOX TOP MetaStock Code

Topbox:=If(Ref(H,-3)>=Ref(HHV(H,18),-4)
AND
Ref(H,-2) less than Ref(H,-3)
AND
Ref(H,-1) less than Ref(H,-3)
AND
H less than Ref(H-3),Ref(H-3),PREVIOUS);
Topbox;

The highlighted text should be the math symbol for less than.

DARVAS BOX BOTTOM MetaStock Code

Botbox:=If(Ref(H,-3)>=Ref(HHV(H,18),-4)
AND
Ref(H,-2) less than Ref(H,-3)
AND
Ref(H,-1) less than Ref(H-3)
AND
H less than Ref(H,-3),LLV(L,4),PREVIOUS);
Botbox;

Again the highlighted text should be the math symbol.

DARVAS BOX MIDDLE

For this simply add the above two codes together and divide by 2.

I like the DARVAS BOX visually and the following is what I look for on the charts. If there is a buy signal from another indicator then I will visually check the location of the DARVAS BOX. If it is way above the current price than it is usually best to wait it out. There may be an upmove but possibly only short lived. I like to see the box edges collapse downward towards the price to add a little more confidence in a signal.

A narrower box seems to be more inviting than one that is really wide. When I think about this it is similar to the contraction and expansion of Bollinger Bands. Tight is better.

Another thing that I watch for is the price to drop below the bottom of the box. I then wait it out to see if it can move back into the box. Sometimes this upmove will continue to at least the box top. It is the same with an upmove. If the price can not hold above the box top it maybe a sign of weakness.

Generally though the DARVAS BOX is nice way to spot support and resistance. The most immediate levels as well as past ones can be used.

Anyways, check them out and see what you think. Nothing is a catch all and a combination of a couple of indicators and time frames seems to work the best.

I am starting to babble so I will end this. A couple of charts follow. One just to shows the DARVAS BOX, the other is a stock chart as weird art. Which is which?



Thank you for your time.

No comments:

Post a Comment