Equity Curve Average Filter
Forums › ProRealTime English forum › ProOrder support › Equity Curve Average Filter
- This topic has 14 replies, 4 voices, and was last updated 4 years ago by
Link.
-
-
01/26/2018 at 6:43 PM #60632
I visited the idea of using equity curve average as a filter on strategies a while back but put the idea to one side for reasons that I cannot recall. I just revisited the idea and added it to a strategy that I was working on and it appeared to give a very big improvement and produced a very nice equity chart.
I’m interested in knowing if anyone else is actually using an equity curve average as a filter in live strategies?
I’m also interested in any thoughts, ideas or experience of this subject.
01/26/2018 at 7:21 PM #60637Hi Vonasi, I actually use the equity curve average to manage my active strategies manually. So basically whenever they dip below the average I stop then until they recover.
I am interested to see how you implemented it into the actual code of the strategy? Do you also just suspend taking position or just reduce risk/exposure?
01/26/2018 at 8:42 PM #60642I tried just using it to reduce risk by reducing position size if the equity curve was below the average but found it gave better results to stay out completely until the average came back to meet the equity curve.
I had a strategy that went through some largish slow drawdown periods and was looking for a filter to keep me out of the market as much as possible during these times which is what bought me back to the idea of equity curve averaging as a filter.
At the moment I am just experimenting with an adaptation of the code found here within my strategy:
https://www.prorealcode.com/blog/trading-strategy-profit-curve/
My code is:
123456789101112131415161718CurvePeriod = 100Type = 0Capital = 10000Equity = Capital + StrategyProfitEquityCurve = Average[CurvePeriod,Type](Equity)IF Not OnMarket AND BarIndex < CurvePeriod THENIF conditions THENBUY 1 Contract At MarketENDIFENDIFIF Not OnMarket AND BarIndex > CurvePeriod THENIF conditions AND Equity >= EquityCurve THENBUY 1 Contract At MarketENDIFENDIFObviously CurvePeriod and the average Type are the optimized variables.
01/26/2018 at 10:10 PM #60647Obviously the code in my last post is not a true equity curve average as to achieve that it would be necessary to have an equity curve based on a simulation of all possible trades whereas the above code just stops trading and so the equity curve will just flat line until the average line comes back to meet it. I guess an indicator could be created that simulates all trades and then provides a simulated equity curve as if all trades had been taken and also an average line based on this. This will be my next step when I have some time(!) – although at the moment the flat-lining equity curve average filter appears to be quite effective.
01/27/2018 at 9:41 AM #6065701/27/2018 at 11:38 AM #60664Using a indicator to simulate trades seems like an plausible.
Yes it is, should definitely take time to code a framework to explore it all together 🙂
Take the average of the equitycurve is an option, but just like with any data serie, you can apply any indicator: Bollinger bands to test the deviation of your profit from its average, RSI to know your win/loss ratio is declining or ascending, possibilities are enormous.
01/27/2018 at 11:22 PM #60701Using a indicator to simulate trades seems like an plausible.
Yes it is, should definitely take time to code a framework to explore it all together
Take the average of the equitycurve is an option, but just like with any data serie, you can apply any indicator: Bollinger bands to test the deviation of your profit from its average, RSI to know your win/loss ratio is declining or ascending, possibilities are enormous.
You will have to stop coming up with these ideas and suggestions Nicolas as there is only so much time in everyday to explore new possibilities! I’ll add it to my list…. 🙂
05/09/2018 at 11:49 AM #70064Hello, I’m new to the forum, I’m interested in the codes to suspend a system when it is below its average, the problem is that the system stops altogether. I noticed that you talk about an indicator that takes into account the “fake” trades to build the equity curve, are there any updates? thank you so much!
05/09/2018 at 2:19 PM #70073are there any updates?
Not really. I did write one strategy which was an end of day strategy that built up a fake equity value for all possible trades alongside the real strategy profit and changed the value of position size from 1 to zero depending on the fake equity curves level compared to an average of it but I have not had much time to go much further with it.
05/04/2021 at 1:20 AM #168722My question is this:
You could do the same, but instead of with the equity curve, with strategy profit?That is, for example:
If we have a strategy profit of + € 10,000 and we lose 10%, we will only return to trading when it exceeds + € 10,000 again.05/04/2021 at 8:30 AM #168727when it exceeds + € 10,000 again.
How does strategyprofit go from below £10k to above £10k if we stop trading?
05/04/2021 at 8:41 AM #168729Apart from trading simulation, to calculate a fake profit, how do you think the gain will rise again if you have stop trading?
This blog post is talking about that: How to improve a strategy with simulated trades
05/08/2021 at 12:48 PM #16910605/08/2021 at 2:11 PM #169111STRATEGYPROFIT cannot be modified, so you will have to manage it your own, keeping a copy of STRATEGYPROFIT at the moment ir reaches 10000 (I named it Difference), then start with a new one.
There you go (not tested):
1234567891011ONCE MyStrategy = 0ONCE Difference = 0IF MyStrategy >= 10000 THENMyStrategy = 0Difference = STRATEGYPROFITELSEMyStrategy = STRATEGYPROFIT - DifferenceENDIFMyStrategy = MyStrategy + (PositionPerf * PositionPrice / PipSize * PipValue)Graph MyStrategyGraph STRATEGYPROFITMyStrategy will retain the profit up to 10000, while STRATEGYPROFIT will retain the total profit/loss.
05/08/2021 at 2:32 PM #169119 -
AuthorPosts
Find exclusive trading pro-tools on
