Another long only strategy built with mean reversion in mind with a classic Relative Strength Index indicator on 3 periods. Buying the deep RSI 3 periods (under 10 level) and sold the long position when RSI rise above the 50 level.
I also add a dynamic lot calculation made upon the strategyprofit. You can change the value of the “initial lot” (100 shares at start) and the “step profit” which add more shares whenever the strategy gain a new stepprofit (50$ by default).
14.5% drawdown while almost being 8% of traded time in the market. Annualized return of 11.5% profit, 16 years long.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
//indicator myRSI = RSI[3](close) //initial lot initLOT = 100 //profit step of the strategy to increase lot stepPROFIT = 50 myLOT = max(initLOT,initLOT+ROUND((strategyprofit-stepPROFIT)/stepPROFIT)) IF NOT LongOnMarket AND myRSI<10 THEN BUY myLOT CONTRACTS AT MARKET ENDIF If LongOnMarket AND myRSI>50 THEN SELL AT MARKET ENDIF |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Nicolas,
very easy and very interesting strategy. But one question: Why is there no ‘DEFPARAM CUMULATEORDERS = False’ at the beginning? I tried it with False and True but…there is no difference if. So why do I need it?
Rads,
Clemens
…and I do not see any opened positions…strange…
I found the answer by myself for the second question. But still no idea about the False and True thing.
The line 12 of the code is the answer of your question. Before launching a new trade, the code check if there is already a long trade opened.