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

darvas



PureBytes Links

Trading Reference Links

a darvas dll alone is available in thirs party

DARVASBOX

First thanks to Jonf who has written the js code for the Darvas Box.
The plugin is Darvas(); it takes no parameters.

A better explanation of the construction of the Darvas Box is 
available at:

1) <http://www.gerryco.com/tech/darvas.html>
2) <http://www.wealth-lab.com/cgi-bin/WealthLab.DLL/editsystem?
id=2814>


A dll must return one statement , in the case of the darvas.dll, the 
function
Darvas() alone returns the stateArray
but you can also extract other statements from the dll 
For example at the end of the source code of darvas.dll there are

gSite.SetVariable( "BotArray", BotArray );
gSite.SetVariable( "TopArray", TopArray );
gSite.SetVariable( "DBuy", DBuy );
gSite.SetVariable( "DSell", DSell );
gSite.SetVariable( "BoxArr1", BoxArr1 );
gSite.SetVariable( "BoxArr2", BoxArr2 );
gSite.SetVariable( "StateArray", StateArray );
return StateArray;

All of these statements can be given by the plugin.
You can visualize the box with the following code.

Plot(Close,"",1,64);
D=Darvas();
Color= IIf(StateArray==5,2,1);
Plot(Boxarr1,"",D+1,512);
Plot(Boxarr2,"",D+1,512);
Plot(dbuy*C,"",5,2);
Plot(dsell*C,"",4,2);
Title= "Darvas dll";

Note that a box is valid when the state is 5. The color allows you 
to see the valid box .
The Botarray and Toparray are the valid Bot and Top
Dsell and Dbuy are the signals when a Low is below the BotArray or a 
High above the TopArray

2. Inverse DARVASBOX

Note the Darvas Box may be used to take a LONG position;
also in the plugin there is an Inverse Darvas Box for SHORT positions
You can visualize it with:

Plot(Close,"",1,64);
D=InvDarvas();
Color= IIf(StateArray==5,2,1);
Plot(Boxarr1,"",D+1,512);
Plot(Boxarr2,"",D+1,512);
Plot(dshort*C,"",5,2);
Plot(dcover*C,"",4,2);
Title= "Inv Darvas dll";

3. DARVASBOX on ARRAY

you can also built any DarvasBox on Any indicators with the plugin 
DarvasArray( Array);
for example on the AccDist().

Plot(AccDist(),"",1,1);
D=DarvasArray( AccDist() );
Color= IIf(StateArray==5,2,1);
Plot(Boxarr1,"",D+1,512);
Plot(Boxarr2,"",D+1,512);
Plot(dbuy*C,"",5,2);
Plot(dsell*C,"",4,2);
Title= "Darvas dll";