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

Trading Equity Curves



PureBytes Links

Trading Reference Links

Hi, All:

I would like to experiment with trading the equity curve.

The following code is a first pass at a low tech method
for doing so. This indicator attempts to plot the closed 
equity for a simple moving average system. Once all the
bugs are ironed out, it would be a trivial matter to use
this indicator to filter entries from an identical system.

It appears to be close, but not quite there. I would appreciate 
any comments or suggestions, especially with regard to
adapting it to display open equity.

Note that the system is of the stop-and-reverse variety.
Further adaptations would be needed for systems that
can be flat, or that allow pyramiding.

Cheers,

CAB VINTON
cvinton@xxxxxxxxxxxxxx


{CV_Equity
This is closed equity
CP = Current Position; ELong = Entry Long; EShort = Entry Short
I've used the most pessimistic options for entry positions
}

Vars: CP(0), ELong(0), EShort(0), Gain(0) ;

If C[1] crosses over Average(C, 55)[1] then begin
	If CP = 0 then ELong = High
	Else begin ELong = High; Gain = Gain + EShort - High ; End;
	CP = 1 ;
End;

If C[1] crosses under Average(C, 55)[1] then begin
	If CP = 0 then EShort = Low
	Else begin EShort = Low; Gain = Gain + Low - ELong ; End;
	CP = -1 ;
End;

Plot1(Gain, "Equity") ;