A simple "3 Candles – SMA20" strategy

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29134 quote
    Doctrading
    Participant
    Master

    Hello all,

    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.  Defparam cumulateorders = true MM20 = average[20](close) // ACHAT ca1 = MM20 > MM20[1] and close > MM20 ca2 = close < close[1] and close[1] < close[2] IF ca1 and ca2 THEN amplitude = high – low buy at market buy at high stop ENDIF // VENTE cv1 = MM20 < MM20[1] and close < MM20 cv2 = close > close[1] and close[1] > close[2] IF cv1 and cv2 THEN amplitude = high – low sellshort at market sellshort at low stop ENDIF set stop loss 2*amplitude set target profit 2*amplitude

    manel thanked this post
    candles-sma-1489841292cp48l1.png candles-sma-1489841292cp48l1.png
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

A simple "3 Candles – SMA20" strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Doctrading @doctrading Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/20/2017
Status: Active
Attachments: No files
Logo Logo
Loading...