M15 SP500 LowBuyHighSell Strategy

Forums ProRealTime English forum ProOrder support M15 SP500 LowBuyHighSell Strategy

Viewing 15 posts - 1 through 15 (of 47 total)
  • #223398

    Here is a strategy on the SP500, which in its raw version is already effective long and short. With similar settings the code is also effective on other indexes.
    It is a mixture of gap close and mean reversion. We buy intraday below a low from the daily chart. We are selling above a high from the daily chart. The exit is the close of the previous day. So theoretically a gap closure. We exit open positions every evening and are flat overnight. A simple stoploss based on the daily range is also included in the algo. That’s all. Improvements and/or thoughts on this algo are always welcome.

    5 users thanked author for this post.
    #223402

    Thank you for sharing your code.

    What time are overnight fees triggered in Germany?  In UK it is for trades open at 22:00.

    Your exit times of if time >= 220000 would allow overnight fees to be triggered in UK.

    #223403

    Feel free to make improvements to the code and adjust the time. If you set TimeEx to 0 in line 29, the result changes only minimally. In theory, you even get money if you hold the SP500 overnight. It is a short-term strategy. Little time on market. There are not many positions that are held overnight. I also tried to add another exit with a bigger profit. But this variant works very reliably. And that’s what I wanted. Short time on the market and “reliability”.

    #223404

    Also works great on NASDAQ. I haven’t tried Dow Jones yet.

    #223407

    As a matter of interest then … what time are overnight fees triggered in Germany?

    I’m just interrested if it is 22:00 same as UK even though Germany is currently UTC+1 and UK is currently UTC?

    I can’t see German IG website to find out, maybe you can?

    Whenever I have checked on UK IG re overnight fees it awlays says 22:00 so I guess it is 22:00 all year round regardless of the hour going forward or back (as now).

    Maybe UTC+1  countries are the same at 22:00 all year round … anybody can answer?

    End of hijacking your thread 🙂

    Your strategy shows a good equity curve on DJI 1 Hour timeframe (no changes except minus 1 hour for UK on the UTC +1 times and I use spread = 5 for DJI when backtesting).

    #223409

    As far as I know, overnight fees always apply from 10 p.m. Here in Germany. Can you post a picture of Dow Jones? How big is the drawdown?

    #223410

    good equity curve on DJI 1 Hour timeframe

    I forget how I work is not same as most … above is only over 10k bars.

    Nearly blows the Account (£100k) at pos size = 1 over 100k bars so no point me posting an equity curve for 10K bars?

    #223412

    Optimize lines 39 and 57 together and lines 40 and 62.

    #223418

    @Admin

    @Roberto

    Can you test and approve my contribution to the library?

    #223435

    When backtesting u need to allow for varying spreads throughout the day, testing on 0.5 spread when spread can be 2 until US open wont give accurate results.

    Can have some drawdown… would need some time to look more closely, but spreads can make a significant difference in strategy success when testing….

    #223445

    Hi Phoentzs, interesting code. I rewrote the code in the simplest form and added only a certain percentage to the exit. Up to 50k the results are similar, then are better.

     

    #223448

    Thanks @Mauropro, great work with you as always.

    I initially used “set target Price myclose”. But the exit brings a little more power. This system in combination with a breakout system should be enough for a portfolio.

    #223539

    Here is the 200k backtest. The post-corona-volatility seems to be doing the system a lot of good.
    Thanks for sharing.

    #223558

    Es ist wichtig, sich daran zu erinnern, dass wir hier über das SP500 sprechen. Vor fünf Jahren lag diese noch bei rund 2000 Punkten, die Volatilität war also sicherlich deutlich geringer. Wir arbeiten auf einen Lückenschluss hin, der auch heute noch manchmal nur wenige Punkte umfasst. Aber es scheint sicher, dass die Bewegung sehr oft auftreten wird, und wir können uns dieses Prinzip zunutze machen. Selbst wenn wir “highest and lowest” im Code auf “1” setzen, funktioniert das System trotzdem. Lediglich der Drawdown nimmt leicht zu und die Kurve ist etwas zackig. Probieren Sie das System an der Nasdaq aus… 😉

    1 user thanked author for this post.
    #223612

    Test with a spread of 0.6 as this is the minimum at IG and the maximum is 1.4
    Added buy and sell conditions

     

     

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 47 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login