Moving averages on equity curve
-
- Posts: 323
- Joined: 07 Jan 2007
- Location: Lahore, Pakistan
- Has thanked: 64 times
- Been thanked: 57 times
Re: Moving averages on equity curve
Algyros,
If you mean moving aveage on Strategy Performance Report equity curve(s); I do not think this is presently possible.
However, one may do this:
1. Add Symbol 'EQUITY' -- Exchange UNDEF, Category Cash, Data Source ASCII Mapping.
2. Compile a .csv file in EXCEL of daily (or any other time period) equity.
3. Import the data of the equity file to 'EQUITY'.
4. Plot the chart with moving average of choice.
Here is an informative article on equity curve trading:
http://www.breakoutfutures.com/Newslett ... er0205.htm
Khalid
If you mean moving aveage on Strategy Performance Report equity curve(s); I do not think this is presently possible.
However, one may do this:
1. Add Symbol 'EQUITY' -- Exchange UNDEF, Category Cash, Data Source ASCII Mapping.
2. Compile a .csv file in EXCEL of daily (or any other time period) equity.
3. Import the data of the equity file to 'EQUITY'.
4. Plot the chart with moving average of choice.
Here is an informative article on equity curve trading:
http://www.breakoutfutures.com/Newslett ... er0205.htm
Khalid
- Attachments
-
- EQUITYwithMA.png
- (43.21 KiB) Downloaded 796 times
-
- EQUITY.xls
- (25.5 KiB) Downloaded 237 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Moving averages on equity curve
I think we're not on the same page, because as far as I know it's possible with the i_ClosedEquity reserved word, though this requires that the strategy is applied to one chart (i.e. no Portfolio Backtester) and requires thus a strategy (I assume Algyros is talking about a historical, not-generated-by-signals equity curve. ).If you mean moving aveage on Strategy Performance Report equity curve(s); I do not think this is presently possible.
Anyway, for other interested users, an example with an indicator which plots the equity curve:
Code: Select all
Inputs: DisplayAccountCurve(True), // Display the 'Account equity curve' or else the 'equity curve'
AccountStart(5000), // Account starting value
MAPeriods(15); // MA periods.
Variables: AccountEquity(0), maOfAccountEquity(0);
if i_MarketPosition = 0 then begin
if DisplayAccountCurve = true then
AccountEquity = i_ClosedEquity + AccountStart
else
AccountEquity = i_ClosedEquity;
end else begin
if DisplayAccountCurve = true then
AccountEquity = i_OpenEquity+ AccountStart
else
AccountEquity = i_OpenEquity;
end;
// Change color with a growing account equity
if AccountEquity > AccountEquity[1] then
SetPlotColor(1, green)
else
SetPlotColor(1, red);
maOfAccountEquity = AverageFC(AccountEquity, MAPeriods);
Plot1(AccountEquity, "Equity");
Plot2(maOfAccountEquity, "MA", RGB(0, 128, 255));
Josh
-
- Posts: 49
- Joined: 26 Dec 2009
- Has thanked: 34 times
- Been thanked: 1 time
Re: Moving averages on equity curve
Hi,
is it possible to use i_OpenEquity and the Moving Avg of the EquityCurve for a trading system to close out the position for backtesting and in real time trading?
Are there any simple coding examples?
Thank you
is it possible to use i_OpenEquity and the Moving Avg of the EquityCurve for a trading system to close out the position for backtesting and in real time trading?
Are there any simple coding examples?
Thank you
-
- Posts: 49
- Joined: 26 Dec 2009
- Has thanked: 34 times
- Been thanked: 1 time
Re: Moving averages on equity curve
here is a code for i_OpenEquity and an Average of i_OpenEquity,
how can I use this Indicator in order to trigger Exits,
although I know that backtesting is not possible.
Thanks
how can I use this Indicator in order to trigger Exits,
although I know that backtesting is not possible.
Thanks
Code: Select all
Inputs:
MALength(20),
StartingCapital( 100000 ),
RSILength(14);
Variables:
stratOpenEquity(0), stratClosedEquity(0), maValue(0), rsiValue(0);
stratOpenEquity = i_OpenEquity;
maValue = Average(stratOpenEquity, MALength);
rsiValue = RSI(stratOpenEquity, RSILength);
stratclosedEquity = i_ClosedEquity;
Plot1(stratOpenEquity, "OpenEquity");
Plot2(maValue, "MA");
//Plot3(rsiValue, "RSI");
Plot4(stratClosedEquity, "ClosedEquity");