Supertrend… Against the trend

Supertrend… Against the trend

Hi all, I’ve tried with one friend to create a TS that is robust and could work on different index.

Here is a trading strategy to be run on 1 hour time-frame.

HOW IT WORKS?

Long entry if supertrend is short and the price goes over the EMA. Closing under the Bollinger bands middle.

Exit long if supertrend is long and the price goes under the EMA and the closure is under the Bollinger bands middle.

BEFORE TESTING:

Only thing to be chosen before run the backtest is the number of contracts, the starting time and end time.

The starting and end time is there to avoid to insert orders when spread during night time is too high.

SUGGESTIONS:

For DAX, EUROSTOX, CAC I suggest starting time 8 and end time 22.

For MIB I suggest starting time 8 and end time 18.

For GOLD and WTI starting time 0 and end time 24 (spread is always the same).

QUESTIONS:

Is there someone that can do a montecarlo forward test on this code?

any comments or Idea? I have also a version with money management but that would be a second step.

 

Share this

Risk disclosure:

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 : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Nicolas • 05/23/2016 #

    Hi David, thanks for sharing your strategy. Your contribution is much appreciated. Hope you’ll get what you are looking for into automated trading 🙂

  2. avatar
    Anonymous • 05/23/2016 #

    Probably a lot of people will see the trend line and think that it is not soo good compered with other trend line in this forum but please try to run it on other index also. It is there that you have good performance!
     

    • Nicolas • 05/23/2016 #

      Straight equity curve line is a trap, as we already discussed david. I’ll have a look on this code with my MonteCarlo matrix.

  3. Doctrading • 05/23/2016 #

    On prorealtime CFD, you can test the strategy since May 2006.The results are interesting.
    It’s winning since 2009, with a drawdown from August 2013 to December 2014.
    Thanks for sharing.Regards,

  4. avatar
    Anonymous • 05/23/2016 #

    Hi Nicolas! thanks for testing with montecarlo!! I think that best index to use are CAC WTI MIB and DAX. I am running it on test IG to see if real orders are like the backtested and for the moment it seems like this. If you will think that the system could be good I will share another code to avoid exit during the night for those index with increasing of the spread. Let me know if you want me to change the code in english… I saw only now that it is in italian. Sorry.
    Hi have another setup for this that was the original one:
    //FIXED PARAMETERS
    mm = 10
    BB = 20
    ATRvolaDown = 10
    ATRvolaUp = 40
    ATR = 14
    x = 2
    supertrendLow = 3
    SupertrendUp = 10
     
    These parameters should not have any curve fitted problems…
     
    @doctortrading… any suggestions to improve it?
     
    David

    • Nicolas • 05/23/2016 #

      Default indicators periods tend to be less curve-fitted you’re right, since these are the most used ones in the past and surely be in the future by the masses.

    • Gustaf • 05/23/2016 #

      Hi David!This looks really interesting. I’m a beginner, and unforunately I don’t understand italian.I Would greatly appreciate if you could translate the comments into english, as it would help me to get new ideas on how to create systems of my own.Keep it up!

  5. avatar
    Anonymous • 05/23/2016 #

    You are right Nicholas… this is why I have not choosen yet which of these 2 sets of paramenter should be used. We have to remember that the curve fitted could it be done also on multiple indexes and not only one.
    The forward test could give us some better idea.

  6. avatar
    Anonymous • 05/23/2016 #

    As said at the beginning this TS should not be run in only one Index. In the image in the link you can find the profit line of MIB,CAC, GOLD, DAX, EUROSTOCK all togheter. These lines consider the spread already!
    https://www.dropbox.com/s/5yvmsfncypuahpn/Supetrend.png?dl=0

  7. Nicolas • 05/23/2016 #

    For everyone information this strategy is also discussed in the forums on this thread: http://www.prorealcode.com/topic/robustness-in-automated-algorithmic-trading-systems/

  8. davidp13 • 05/23/2016 #

    Hi David. First question is why do you enter LONG if price is below the SuperTrend? And comment is have you tried ADX as an entry filter?

  9. avatar
    Anonymous • 05/23/2016 #

    We try to enter before that the market actually turn. We try to anticipate it. In which way would you use ADX?
     

  10. dwgfx • 05/23/2016 #

    David-1984 are you saying that you’ve already factored in the spread within the code? 
    If yes, where have you done that?

  11. avatar
    Anonymous • 05/23/2016 #

    no, not in teh code… only in the backtest. The entry is only between 8/22 so the spread for dax is 1 for most of the trades and 2 for the ones after 18.00 and before 22.00

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
NoName Thank you very much for this fascinating trading system. It is still proving to be extremely...
DANY I did it on demo account; it's too dangerous for mea and I can not resist psychologically  ....
demoz How can a demo account be dangerous? Did you have it run live (on a demo account for exampl...
DANY Yes, I mean that I tried on a demo account for 2 months and it had work fine, like the BackT...
MikeGC I don't know if you have used the variables a and b to optimise the parameters for the Super...
gianpiero75 I have not optimized, I multiplied the parameters for 6 (5,8), to use them on the 4  hoursTF...
bertrandpinoy bonjour Mike j utilise TrendChaser V2.0 et quand il prend position cela ne programme pas le ...
eisi If i switch between different Markets, the Backgroundcolour will appear where it should not...
datageek How can I get alerts on colour change?
NAMBO40 Hello, I would like to add a 25 period SMA moving average. It's possible?
Doctrading
8 years ago
gianlox What markets did you feel ? Thanks..
wanjpt Doctrading, could you code an alert when the supertrend touches price for various timeframes...
JSTAR PRODUCTIONS Hi there DocTrading, I have run this Screener and it only seems to screem When trend line to...
Henry
8 years ago
SuperTrend
SuperTrend
4
Indicators
Nicolas Exit and relaunch PRT should fix this behavior.
verdi55 Thank you. After a restart, it is somewhat faster; however, it still takes about 3 minutes t...
Nicolas Good! thanks for sharing your own code! Please do so with other ones if you think you can im...

Top