S&P 500 daily RSI(2) long short strategy

S&P 500 daily RSI(2) long short strategy

Hi all,

Have a look to this daily strategy on S&P 500. I guess many of you already know it, as it is made very famous by Larry Connors, I just added a bit of asymmetry between long and short, but the code is still extremely light, with only 2 parameters optimized and a stable performance of over 20 year!

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. maorai • 10/21/2017 #

    hi Francesco,
    the variables a and b are missing !!
    thanks for clarify it

  2. Francesco78 • 10/21/2017 #

    a = 10 b = 30, if you run the optimization this is what you will get

  3. Vonasi • 10/21/2017 #

    I’m a big fan of anything with Larry Connors on the SP500 with RSI[2]. I notice that your exit criteria are different for long and short positions. A long position needs a down candle to exit but the short positions exit on up or down candles. Can you explain any logical reasoning behind this or is it just something that seemed to work better?

  4. Francesco78 • 10/21/2017 #

    Hi Vonasi. The logic is based in the fact that the market has a bias to go up. This asymmetry allows long positions to have an “advantage” over short positions.

  5. Vonasi • 10/21/2017 #

    It seems that buy and hold outperforms this strategy. Removing the short side of the strategy (I’m not keen on shorting indices especially the SP500) results in close to buy and hold performance without the amount of time in the market and far less volatility in the equity curve. Not many trades though. Settings of 15 and 35 seem to be optimal for this.

  6. quietlife • 10/21/2017 #

    HI. My first post on PRC. I tied this on UKX I am limited with 2500 bars, but the results looked very good.

  7. Robin von Bauhn • 10/21/2017 #

    Nice strategy! Really like the stuff you are posting. Although the performance on the short side is quite bad when in raging bull markets. So try out my favourite filter; close > close[180] (or anywhere between 100-250) for longs and opposite for shorts. Greatly reduces drawdown 🙂

  8. Francesco78 • 10/21/2017 #

    hi Robin, thank you for yiur comment. Would you mind to post the exact modification to the code that you make? Id love to test it. have a great day.

  9. Robin von Bauhn • 10/21/2017 #

    Here you go! Would like to hear your feedback 🙂

    cl = RSI[2]100-a

    if cl and close > close[180] then
    buy 5 contracts at market
    endif

    if cs and close 100-(a+b) then
    sell at market
    endif

    if shortonmarket and RSI[2]<(a+b) then
    exitshort at market
    endif

  10. Francesco78 • 10/21/2017 #

    Sorry there might be few typos, pls send the full code.
    Thank you

  11. Robin von Bauhn • 10/21/2017 #

    Oh, it’s “cs” that’s missing. I don’t have the code right now but it’s the exact same conditions as in your code above so you can copy it from there. But as you might see I made the sides more symmetrical and removed “close < open" as condition for long exit

  12. Manuel9z • 10/21/2017 #

    Hola Francesco, gracias por tu estrategia. Cuando intento activarla en ProOrder, no lo permite, indica este mensaje: Deben aplicarse los siguientes cambios antes de enviar el código a ProOrder:
    – Reemplace las variables. Para lanzar esta estrategia en trading automático, suprima las variables de la ventana de programación en la sección BroBacktest y reemplácelas por valores específicos en el código de su sistema de trading.
    Puedes ayudarme en que he de hacer. Muchas gracias

  13. Manuel9z • 10/21/2017 #

    ok, sorry, I’ve already configured it with a = 10 b = 30 thanks Francesco for your post

  14. snucke • 10/21/2017 #

    Hello Francesco!

    when i replace a&b with 10&30 the results are not the same?

    how can i make this code applicable for live trading? cause i must remove the a&b with values

  15. Francesco78 • 10/21/2017 #

    @snucke the results are not the same because the pictures refers to a few years ago. I am not sure how the strategy will look now with the same parameters.

    • sfl • 10/21/2017 #

      still working, using with filters like :

      trendFilterUp=close>average[190](close)
      trendFilterDw=close<average[190](close)

      same parameters 10,30

  16. snucke • 10/21/2017 #

    @Francesco78 i mean the results differ when i test on my own.

    so im curious of what the parameters a&b are based on?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+6 more likes

Related users ' posts
abd78 @Vonasi I saw that you did some work on seasonality, I wondered if you wanted to go here and...
Vonasi Sorry - my understanding of Italian is zero so if I watch the video I won't understand it I'...
Kosuda76 Thanks for your reply! But I do not really understand what the opposite of them the values ​...
AdriTrade Good job Louis!! How could do this for the Williams indicator? Thank you very much.
imorandin Hi!, Nice code. I'm tryng to port it to another language, but I don't understand this part:...
luxrun Thanks, bolsatrilera, for a very good and solid screener!
luxrun sorry... indicator!
Lily Rios Gracias por el indicador, tengo una pregunta necesito programar un screener de valores que e...
Bebbo Grazie del prezioso contributo Nicolas, scusa la mia inesperienza, sono alle prime armi e s...
Nicolas To avoid recalculation, you should use the one from this post.
Bebbo Ok Grazie Nicolas.
bolsatrilera
7 years ago
jissey Bonjour Bolsatrilera, je trouve le cm rsi interessant, merci de l'avoir mis à disposition ! ...
bolsatrilera bonjour jissey, je n'ai aucune information sur ce que tu dis, je suis désolé.
ALE Hi the color is given by a numerical value derived from the oscillator in use. If you comp...
efahmy Thanks mate
Jo-01-R Hello, it is possible to have this indicator but instead of colors rather have numbers rangi...
j102491 Hello, would this be the same as doing close-moving average and just getting the z-score of ...
Nicolas No, you will get a distance in points. Here is the definition of Z-score: The z-score, also ...
j102491 Thank you
Nicolas
7 years ago
enricot Scusa nn riesco.
SoloContado If you smooth the signal using a "summation" function, you get a nice "crossing of 0" graph....
ShaunG Greatly appreciated Nicolas!
Etienne Hi, thanks for proving this code. I would like to contribute by adding a computation speed...
Etienne //Compute Super Smoother coefficients once if barindex = 1 then a1 = exp( -1.414 * 3.14159...
Nicolas Thanks a lot!
anametsinwha Is it possible to change it to highs and lows rather than open and close?
apachx Hi. Please, describe the algorithm in words. I want to understand how it works, but for now...
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
Matriciel
7 years ago
Alai-n Thanks...
Bard Thanks for sharing this Verdi55. More instructions from Larry Williams website (and a fea...
Nicolas
7 years ago
Jurik RSX
v10.3
Jurik RSX
3
Indicators
hartgeld Hallo Nicolas, ein sehr guter Indikator, vielen Dank! Leider rechnet er bei mir nicht die Pe...
rigel Hi Nicolas, have you coded the Jurik alone (as Mov. average)?
Nicolas 2 versions available in this indicator: https://www.prorealcode.com/prorealtime-indicators/a...

Top