As you can imagine, I am currently overwhelmed by my work, and by the demands of my readers, who want a few backtests of strategies, or help to develop their personalized indicators on the ProRealTime platform.
As far as possible, I try to answer all the requests, in the order in which they have been formulated (I’m 2 months late for some!) However, I will respond to a more recent request today because it is easy to satisfy.
The coding request vas very simple.
For buying, we look for the SMA20 to be increasing, with 3 closes which are lower each time. Then we make a “buy stop” order at the highest of the last candle.
Stop loss = take profit = high – low of this candle
So I chose to test this strategy on the CAC40. Initially, the results were not very good with this demand. There were also backtesting errors with the stop loss and take profit hit on the same candle, which is why I doubled the distance to stop loss and take profit. The strategy was positive, but not very effective.
I chose to couple it with another strategy :
We buy directly when there are 3 closes lower each time ; AND we also enter the top of the third candle. I also added the inverse rules to the sale.
Certainly, this strategy will not make you rich ; But it has the merit of showing that with extremely simple trading rules, we can be positive. I am convinced that it can be frankly improved, with adjustments, money management, etc.
For example, I did not test the fact that we can go back on 3 candles of the same color, I only tested this way. Be careful, however, because this strategy uses several simultaneous orders : do not abuse with the leverage. ￼
Warning: Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced clients who have sufficient financial means to bear such risk. The articles, codes and content on this website only contain general information. They are not personal or investment advice nor a solicitation to buy or sell any financial instrument. Each investor must make their own judgement about the appropriateness of trading a financial instrument to their own financial, fiscal and legal situation.