equity curve

Questions about MultiCharts and user contributed studies.
houss75
Posts: 50
Joined: 09 Feb 2014
Been thanked: 1 time

equity curve

Postby houss75 » 09 Feb 2014

Hi,

I'm looking for the EL code of trading equity curve management to integrate to
my trading system code.
Please let me know if there is any topic for this subject on the forum or
if some one have a code that can help me.

Rgds,

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: EASYLANGUAGE CODE

Postby MAtricks » 09 Feb 2014

Not exactly sure what you're requesting.. maybe this will get you started?

Code: Select all

Inputs:
AvgEquityLength( 20 ) ;

Variables:
Equity( 0 ),
AverageEquity( 0 ) ;

Equity = I_OpenEquity ;
AverageEquity = Average( Equity, AvgEquityLength ) ;

Plot1( I_ClosedEquity, "ClosedEquity" ) ;
Plot2( I_OpenEquity, "OpenEquity" ) ;
Plot3( 0, "0 line" ) ;
Plot4( AverageEquity, "AverageEquity" ) ;

if I_ClosedEquity > 0 then
setplotcolor( 1, green )
else
setplotcolor( 1, red ) ;
if I_Openequity > 0 then
setplotcolor( 2, darkgreen )
else
setplotcolor( 2, darkred ) ;
if AverageEquity > 0 then
setplotcolor( 4, darkcyan )
else
setplotcolor( 4, darkmagenta ) ;
Image
Attachments
ec indicator.png
(11.61 KiB) Downloaded 1371 times

houss75
Posts: 50
Joined: 09 Feb 2014
Been thanked: 1 time

Re: EASYLANGUAGE CODE

Postby houss75 » 09 Feb 2014

Thanks Matrics for your answer but it is not what I'm looking for.

I want to use the equity curve trading method be appling a Moving averages to the equity curve of a trading system to determine when and how to take trades from that trading system.
Allow signals when the equity is above the moving average, and block trades when below.

Rgds,

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: EASYLANGUAGE CODE

Postby MAtricks » 09 Feb 2014

Last edited by MAtricks on 09 Feb 2014, edited 1 time in total.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: EASYLANGUAGE CODE

Postby MAtricks » 09 Feb 2014

By the way, welcome to the forum :) Would you mind changing the topic to this thread to something more specific? I think it would be better for anyone that's also searching for a similar piece of code.


Return to “MultiCharts”