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

RE: Equity curves and pushpop



PureBytes Links

Trading Reference Links


-----Message d'origine-----
De : Charles Johnson [mailto:cmjohnsonxx@xxxxxxxxx]
Envoyé : samedi 1 mars 2003 00:36
À : Omega-List
Objet : Equity curves and pushpop


Robert Linders' excellent free utility PUSHPOP, available for download at
www.traders2traders.com, allows getting the equity of an underlying system,
or more than one combined, into one or more variables in code running on
another chart. This can be used however one wishes for technical analysis,
trading, etc.

I don't know how this compares to Pierre's tool, but it is orders of
magnitude easier than trying to write a system that doesn't trade feeding
one that does in the same strategy.

====
Do not work the same.
Here the code is  called inside the same signal or indicator, same chart,
several times if needed.
DO NOT TRY TO USE IT, AS IT WILL NOT VERIFY, the user function is NOT included.
It's verbose, but simple.
The // equity curve is calculated by calling this function:

mposi=Sirtrade_Eq(XORDRE, ROUNDTURN, STP, TYPE, XTGBUY, XTGSELL, eqar);





{Indicator: SirTrade2000 Equity Curve //
=================
Computes the Equity Curve of any strategy inside an indicator...or a strategy.
The function returns the current marketposition, and the equity Curve value into
the
eqar[0] array element.  Allow multiple contracts, but not scaling up or down
during the same market position
}

var:ordre(0);
{1)<<<<<<<<<Logic of the system to monitor goes here>>>>>>>
=======================================================}

inputs:len(10);
value0=c-c[len];			{ This is a simple momentum trading signal}

if value0>0 then ordre=+1;	{amount of contracts to buy for this setup}
if value0<0 then ordre=-1;	{amount of contracts to sell for this setup}
{
<<<<<<<End of the system code>>>>>>>>>>>>>
==========================================}

{2)Equity Curve computations (Underlying trading system)
========================}

array:eqar[5](0);

inputs:
		RoundTurn(0.0),	{cost & slippage in big points}
		stp(0),		{stop or limit measurement in big points}
		type(0),		{+1 stop orders, -1 limit orders, 0= MOC orders for the original
system}
		tgbuy(h),		{ stop or limit target}
		tgsell(l);		{stop or limit target}

{
(3)Setting stop limit and MOC orders-Do not modify
===================================================}
var:eqtg(0),xtgbuy(0),xtgsell(0),xordre(0),mposi(0);

if type=0 then begin
	eqtg=0;
	xtgbuy=c;
	xtgsell=c;
	end else begin
	eqtg=1;
	xtgbuy=tgbuy[eqtg];
	xtgsell=tgsell[eqtg];
end;
xordre=ordre[eqtg];

if currentbar>1 then
mposi=Sirtrade_Eq(XORDRE, ROUNDTURN, STP, TYPE, XTGBUY, XTGSELL, eqar);


{Plot section}

Value11=eqar[0];			{This is the Equity Curve}
Value12=xaverage(value11,10);	{..and it's moving average}


plot1(value11,"Eq");
plot2(value12,"AvgEq");


Sincerely,

Pierre Orphelin
www.sirtrade.com
Tradestation 2000i, TradeStation 6 sales and support
Safir-X, neurofuzzy logic trading system builder

To subscribe to our FREE trading system newsletter:
http://www.sirtrade.com/newsletter.htm
Next issue: November 2002