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
KumoNoJuzza Thanks. I did not know IG had Futures. I am always missing an info or a detail. I used to th...
joaoarcher Hi, thank you for the this. Is it possible to create a screener from this indicator, so that...
superfalcio Last very good gain of the system: positions on Eurostoxx50 closed yesterday friday 06/12/2024.
Nicolas
2 years ago
3 RSI
3 RSI
2
Indicators
Violet Nicolas, you calculate iRSI, but don't use it. You show RSI in the returned values, which, a...
Nicolas Yes, that's an error. RSI instruction is set by default to 14 if you don't indicate it that'...
Patrice210 bonjour STANKO, effectivement la première ligne apparait en anomalie et je ne comprend pas v...
KumoNoJuzza Hi guys, Thanks @Stanko and everyone for your contributions. I have been playing around ...
Stanko Hi KumoNoJuzza, thanks for the post. I also tried your code with Dax and the performance is ...
DELBERT Bonjour , Nicolas , je voudrais installer cet indicateur sur ma PRT , version 10.3 , mais je...
Nicolas En effet, il faut à minima une version 11. La 10.3 est tellement ancienne maintenant.. Je pe...
DELBERT Bonjour , Nicolas , merci pour ta réponse , je fais un essai et je verrais . Salutations .
Khaled Thank you Nicolas! Looks like TDI (Trader Dynamic Index). Interesting to give Exit Signal as...
Nicolas ColorBetween is an instruction added last year: https://www.prorealcode.com/documentation/co...
finplus Bonjour, serait-il possible de remplacer l'écart formé par les bandes de Bollinger par l'ATR...
AntoGH Bonjour peut-on backtester cela ? Et si vous l'avez fait pourriez vous nous donner le code.....
Nicolas désolé c'est un oubli de ma part, tu peux supprimer cette ligne, elle n'est plus utile dans ...
DELBERT Bonjour , Nicolas , merci pour ta réponse , je suis en effet avec PRT 10.3 , et j'ai bidouil...
supertiti https://zupimages.net/viewer.php?id=20/50/2e3v.jpg
volanirina Bonjour Je souhaite l'avoir sur l'indicateur MT4 si possible s'il vous plait. car je l'ai fa...
Nicolas ProRealCode est un site dédié à l'utilisation de la plateforme de trading ProRealTime: https...
Pensera Bravo Nicolas ! Tu es en quelque sorte l’inventeur de Metascore…(oups je viens de lire jusqu...
Nicolas Dans un but d'investissement pure, et non spéculatif.
Enigma08 Hi Juanj. I am new to ProrealTime and I am trying to program the Proscreener. I want the Pro...
Nicolas Please open a topic in ProScreener forum with your query, I'll reply you there. Thank you.
manafull Thanks Nicolas, I post my question, along with the codes I am trying to convert from your in...
Nicolas I replied to your post here: https://www.prorealcode.com/topic/screener-for-rsi-and-linear-r...
Madrosat I Have not see a fully functioning automated strategy on your site?? Really have you???
juanj Hi Madrosat, why would it be on my site? I have developed it for my personal use and also to...
Madrosat ok I understood you are using prorealcode to hack the fish
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
woktrade Superbe !
Vonasi An updated version with a bug fix can be found here: https://www.prorealcode.com/topic/dis...
snucke hey Vonasi is it possible you can help me get this indicator to show how much a market mo...
kbrooks323 Hello would someone be willing to release a scan code for this? that would be helpful as I s...
Nicolas You can do easily this screener by using the assisted creation tool. It would take you about...
kbrooks323 I just figured it out thanks!
Vinks_o_7 Vonasi you're a beast !!! ;-)))
pableitor Amazing indicator , you are pushing PRT to the limit! But looking at the scatter its not c...
Vinks_o_7 Thanks Doc !
Maxime Baudin Intresting, thank you!
Zigo
5 years ago
fifi743 Good morning, there is no mistake about the shorts c11=SMI[14,3,5](close)>-40
Zigo has to be c11=SMI[14,3,5] < -40 (indeed)
xar3 Thank you ;-) Zigo
Sapo Thank you very much. as always your indicators are extremely effective. kind regards Vonasi.
mitsu21 Hi, it looks nice. I'll try it tomorrow thank you for your share kind regards bruno
kj1988 Thank you Vonasi for sharing this indicator. Very useful as a comfirmation to the price act...
ggolfet Thanks Nicolas, I imported the itf file and solved the problem.
Hasardeur Hallo Nicolas, i tried to code the multi period heat map in combination with the Ehler’s ...
Nicolas Please open a new topic with the code in forum.

Top