[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Darvas Box Indicator?



PureBytes Links

Trading Reference Links

Hi,

Looks to me that Dravas Box is basically trying to implement the 
classic 1-2-3 setup made famous by Ken Roberts.  I used to follow 
this setup a great deal until I realized that it is a crude attempt 
at finding the top or a bottom and a cruder attempt to enter the 
market by chasing it...

Instead, I use a similar but more sophisticated system which 
involves 4 steps: 1) Determine O/B, O/S conditions to find out what 
signal to look for (Buy or Sell) and when to look for a signal and 
when to stay out?  2)  Detect the signal  3)  Verify the signal and 
finally 4)  Interpret the signal.  

In my view Interpretation is more difficult than Verification and 
Verification is more difficult than Detection.  

I use RSI, Stochastics and Z-Score to determine O/B, O/S 
conditions.  Any damn Entry/Exit system to detect the signal and 
verify the signal in atleast one other timeframe and finally 
Interpret the signal as to whether it is a breakout or a counter-
trend change pullback using volatility (Bandwidth based on BB or ATR 
bands, CVol and HVR).  

I don't claim it to be a "Holy Grail System" but it is quite close.

My trading practice is based on the "Contrarian Theory".  At market 
tops or bottoms, you will find that it requires very few sellers or 
buyers to move the market to the opposite direction because the 
buyers and sellers are exhausted from moving the market up the hill 
or down the valley respectively.

In my experience, I found that chasing the market is never a good 
idea.  For e.g., a cheetah hunts only a small, sick, limping prey 
lagging behind the crowd to make the kill...  It does not go chasing 
the leader of the crowd....

Sorry, I didn't mean to discourage all the "Dravas Box" users, I am 
just throwing a word of caution.

Regards,

Pal Anand


--- In amibroker@xxxxxxxxxxxxxxx, "Paul Chivers" <pchivers@xxxx> 
wrote:
> As everyone can see, there is much confusion about how to draw 
the "correct" boxes.
> 
> After looking at various examples on the 'net, I based my code 
almost entirely on http://www.gerryco.com/tech/darvas.html.  My code 
inside the 'for' loop is essentially just implementing the state 
machine presented on that site.
> 
> However, I became interested in Darvas after attending the last 
Perth Sunday Traders Club meeting where Frank Watkins made a 
presentation on his ProTrader software.  One of the pictures (p17) 
in Frank's booklet "Darvas Box Trading" suggests that his software 
requires the first new high to be a New n-day High.  I have not seen 
this requirement mentioned anywhere else and my code does not use 
this precondition.  I also did not add this requirement as I was 
trying to get into a new trend closer to the bottom than this would 
otherwise allow.  YMMW.
> 
> As Stan said, what Darvas is basically looking for is a new High 
that is not exceeded for 2 subsequent days, followed by a new Low 
that is not penetrated for 2 subsequent days.  (This is why you 
can't use functions like HHV() and LLV() directly out-of-the-box to 
construct Darvas Boxes.  You can of course - it just gets messy).  
The Low may also be the Low of the day of the first New High.  This 
works well in an uptrend but sucks in a down trend.  However, if we 
are only to trade longs, then these rules work well.
> 
> There are many shortcomings of the rules as strictly presented.  
One in particular that I noticed was that after a sharp drop into a 
bottom, the top of the Darvas box is stuck back at a long-
inconsequential, old-time High.  This is because we cannot claim to 
have found a box until a qualified Low is found after a qualified 
High.  It just happens that in a downtrend the last qualified High 
is often a long time ago.  Therefore we don't get our first Buy 
signal out of the bottom until that long-old High is broken.  But no 
mechanical system is perfect to we'd all better just get used to it.
> 
> I have drawn "Darvas Channels".  This so that I could see the 
boxes form as the days progressed but also to cater for the Hard 
Right Edge (see next paragraph).  As each Low is violated, the state 
machine re-syncs and the bottom of the box is moved lower.  But my 
code does not go back and fixup the box (channel) bottom.  Same 
situation as each new High is made; the top of the box (channel) 
gets moved up.  So my boxes are not "the same" as examples seen 
elsewhere but the meat of the box, once it's formed, should be 
absolutely correct.
> 
> I chose not to draw boxes strictly according to Darvas.  However, 
the code could be modified to go back and fix things up ("And the 
Angel wants to go back and fix things.  To repair the things that 
have been broken" - Laurie Anderson's "The Dream Before").  I chose 
this because at the Hard Right Edge boxes are only partially 
formed.  It is not until some time in the future that we have all 
the information need to construct the box.  i.e. the box often 
cannot be validly drawn until after price has broken out of the box 
and the Buy signal has occurred.  Too late!  I prefer to see the box 
forming.  I also prefer NOT to see things drawn one way one day and 
suddenly change the next.  YMMW.
> 
> Let's keep in mind that strict adherence to the Darvas rules are 
not what's important here; it's whether what we come up with can be 
used to make money.  No mechanical system is perfect.  Let's get 
over the "Holy Grail"-itis.  It's like people who ask whether a 20 
day (E)MA is better than a 21 or 25 or 'n' day (E)MA.  Sheesh!  Get 
over it and trade the sucker.
> 
> Anyway, I hope this explanation helps people to understand my code 
and helps them decide how they would like to modify it if they 
choose.  Enjoy.
> 
> Ciao!
> 
> Paul
> 
> CRITICISM
> 
> He has the right to criticize
> who has the heart to help.
> 
>      - Abraham Lincoln
> 
> 
>   ----- Original Message ----- 
>   From: Graham 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, 18 September 2003 4:13 PM
>   Subject: RE: [amibroker] Re: Darvas Box Indicator?
> 
> 
>   Here is a MS code for one from
>   http://www.euro-info.com.pl/kr/AFM/e-w-Darvas_Box.html
>   Darvas Box 
>   LowL:=If(Low=LLV(Low,5),Low,If(Ref(Low,-1)=LLV(Low,5),Ref(Low,-
1),
>   If(Ref(Low,-2)=LLV(Low,5),Ref(Low,-2),If(Ref(Low,-3)=LLV
(Low,5),Ref(Low,-3),
>   If(Ref(Low,-4)=LLV(Low,5),Ref(Low,-4),0)))));
>   NewH:=ValueWhen(1,High>Ref(HHV(High,5),-1),High);
>   box1:=HHV(High,3)<HHV(High,4);
>   box2:=ValueWhen(1,BarsSince(High>Ref(HHV(High,5),-1))=3 AND 
box1=true,NewH);
>   box3:=ValueWhen(1,BarsSince(High>Ref(HHV(High,5),-1))=3 AND 
box1=true,LowL);
>   TopBox:=box2;
>   BottomBox:=box3;
>   TopBox;
>   BottomBox;
> 
> 
>   Cheers,
>   Graham
>   http://groups.msn.com/ASXShareTrading
>   http://groups.msn.com/FMSAustralia
> 
> 
>   -----Original Message-----
>   From: stvd2002 [mailto:stanvol@x...] 
>   Sent: Thursday, 18 September 2003 4:05 PM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: Darvas Box Indicator?
> 
> 
>   I know, and I believe the script for wealthlab is written  on 
the 
>   the basis  of this http://www.gerryco.com/tech/darvas.html
> 
>   But I've installed Guppy trader essential software and it draws 
the 
>   bottoms of some boxes differently.  I realy cannot comment on 
the 
>   proper definition on the construction.  Maybe 
>   http://www.gerryco.com/tech/darvas.html is the correct 
definition 
>   and the software from http://www.guppytraders-essentials.com 
could 
>   draw them incorrectly,  which I doubt.  
> 
>   Anybody can download a trial version and see for themselves.  I 
>   apologise for confusing everyone   :-)
> 
>   Stan
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset" 
>   <nenapacwanfr@xxxx> wrote:
>   > Tha darvas box in box.dll have been written according to 
>   > http://www.gerryco.com/tech/darvas.html
>   > 
>   > stephane
>   > > The top of the box is established when the stock does not 
touch
>   or 
>   > > penetrate a previously set new high for three consecutive 
days.
>   > > This is true in reverse for the bottom of the box.  The 
bottom 
>   > > starts one day after the top.  
>   > > 
>   > > But I'm not 100% sure either because I don't have the book
>   > myself.   
>   > > Anyone who has the book please feel free to correct me.
>   > > 
>   > > Stan
>   > > 
>   > > 
>   > > --- In amibroker@xxxxxxxxxxxxxxx, "mleonsprint"
>   <mleonsprint@xxxx> 
>   > > wrote:
>   > > > What do you consider a correct "Darvas" box?
>   > >  
>   > >  
>   > >  
>   > > > --- In amibroker@xxxxxxxxxxxxxxx, "stvd2002" <stanvol@xxxx>
>   wrote:
>   > > > > I'm also currently experimenting with darvas boxes,
>   > > unfortunately
>   > > > > the box.dll in the 3rd party draw them inaccurately.
>   > > > >  
>   > > > > There is a script on a WealthLab site that draws darvas
>   boxes, 
>   > > but
>   > > > > again it draws them inaccurately.
>   > > > >  
>   > > > > However I could be wrong, because I've noticed that same
>   people 
>   > > > have
>   > > > > different definitions of how to construct them, 
therefore I
>   > > admit
>   > > > > that I'm bit confused myself :-)
>   > > > >  
>   > > > > There is a software from Australian trader by the name of
>   Daryl 
>   > > > > Guppy and his softWare draws them correctly.
>   > > > > http://www.guppytraders-essentials.com/
>   > > > >  
>   > > > >  
>   > > > > Regards
>   > > > > Stan
>   > > > > 
>   > > > > --- In amibroker@xxxxxxxxxxxxxxx, "mroman59" 
<mroman59@xxxx>
>   > > wrote:
>   > > > > > Hello, has anyone heard of or tried to create a Darvas 
Box
>   > > > > > indicator?  The Darvas Box investing technique derives 
>   from 
>   > > the
>   > > > > > books How I made $2 million in the Stock Market by 
Nicolas
>   > > > Darvas.
>   > > > > > If anyone has come across any websites that could 
assits
>   in 
>   > > > > > programing code for this indicator, I would greatly
>   > appreciate
>   > > > it.
>   > > > > > 
>   > > > > > Thank You
>   > > > > > MR
> 
> 
>   ------------------------ Yahoo! Groups Sponsor ------------------
---~--> Buy
>   Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: 
HP $8-20.
>   Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & 
Canada).
>   http://www.c1tracking.com/l.asp?cid=6351
>   http://us.click.yahoo.com/0zJuRD/6CvGAA/qnsNAA/GHeqlB/TM
>   -----------------------------------------------------------------
----~->
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at:
>   http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/ 
> 
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/