Universal Strategy

Universal Strategy

If you have followed the thread found here: https://www.prorealcode.com/topic/profitable-strategy-that-work-on-any-market/

You will be aware that I have placed a challenge to the forum to create a universal market neutral strategy. In other words a strategy that can be adapted to any market without ANY optimization. Below is my attempt at exactly this. I have opted to add a trading time filter as all markets have their sweet spot.

No variables have to be optimized for this strategy to work other than the trading time and spread. Attached is 2 screenshots of the same code executed on 2 different markets (same 1Hr timeframe but different spreads) where in both instances the code has significantly outperformed Buy and Hold. Spread on CAC40 set to 3 and spread on ZAF40 set to 20.

Note that this strategy was not meant to be a jaw dropper in terms of performance but rather a proof of concept that a single strategy can be applied to different markets with positive results. Obviously optimizing this strategy to individual markets will yield better results but that was never the idea. Hopefully the whole ProRealCode community can benefit from this (and even improve on it).

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?

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

  1. Nicolas • 84 days ago #

    Thanks for this interesting concept. I successfully test the strategy on DAX and Bund (same kind of results as your other tests on SAF40 and CAC40), but I’m not able to get relevant backtests on other timeframes than 1 hour, and because you stated that this trading strategy is “non timeframe dependent”, that’s why I’m talking about it. Good job!

  2. juanj • 83 days ago #

    I just want to expand a bit on the mechanics of how this strategy should theoretically perform in both ranging and trending markets. The idea is that in a ranging market you would likely see Bollinger reversals between the bands whereas in a trending market you would see a successful Bollinger breakout. This strategy aims to take advantage of both. Then also just to be fair (in answering Nicolas’s question above) although I mentioned the strategy to be timeframe independent, it would more accurate to just call it market neutral. The above set of ‘static’ variables is more suited to a specific timeframe. For lower timeframes such as the 5min chart, a smaller MA such as 50 would likely be ‘more’ suited along with an ATR[1] period. However once configured for an timeframe, it should be compatible between different markets on that timeframe.

  3. juanj • 83 days ago #

    @nicolas it would be interesting to see the 200k bar backtests of the CAC40 and SAF40, if you can post them? Would also be interesting to see if another trading time-frame is maybe better suited back then? I also think that maybe we can look into adding a different stop mechanism, maybe something like your trailing stop? The idea is for the PRC COMMUNITY to build onto this to get it to perform even better and more consistently on all markets.

  4. juanj • 83 days ago #

    I have made a minor modification to the Exit criteria and the result is looking very promising (check the EUR/USD 1Hr with spread of 0.8) for example.

  5. juanj • 83 days ago #

    If longonmarket and ((close[2] > BollU and close[1] > BollU and close BollU and high[1] > BollU and high < BollU)) Then
    LE = 1
    ElsIf shortonmarket and ((close[2] < BollL and close[1] BollL) or (low[2] < BollL and low[1] BollL)) Then
    SE = 1

    If ((close 95 Then
    Sell at market
    ElsIf ((close > close[1] + ATR) or (SE = 1)) and RS2 < 5 Then
    Exitshort at market

  6. juanj • 83 days ago #

    For above modification also add to the entry criteria to initialize the values;

    ‘LE = 0’ below every ‘Buy possize contract at market’
    ‘SE = 0’ below every ‘Sellshort possize contract at market’

  7. juanj • 83 days ago #

    @Nicolas I see it also significantly brings down the drawdown on the CAC40.

    Btw why is the Add PRT Code function not working on here? Also cannot attach screenshots, there are some very sexy curves on for instance the EUR/USD that need some showing off.

  8. juanj • 81 days ago #

    To follow new developments or get the latest version of this strategy please visit the forum:

  9. tahar • 60 days ago #

    Hello Juan, I wanted to test Universal Strategy via a demo account on PRT but nothing happens, the auto trading is in process but nothing occured after 6 hours, the screen has no orders at all. What could be the problem to your opinion? Cheers.

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Vonasi I'm a big fan of anything with Larry Connors on the SP500 with RSI[2]. I notice that your ex...
Francesco78 Hi Vonasi. The logic is based in the fact that the market has a bias to go up. This asymmetr...
Vonasi It seems that buy and hold outperforms this strategy. Removing the short side of the strateg...
papero76 gracias esto es interesante
jebus89 Im getting a huge drawdown, seems like i need to be a millionair before i run this :)
Nicolas That's right, it depends from when you start the strategy! ...
luxrun Nicolas, ho realizzato uno screener dall'indicatore perfect trend-line. Lo screener mi resti...
M. Pettersson Can you please use English?
luxrun Voilà: Nicolas, I realized a screener with the perfect trend-line indicator. The screener r...
papero76 great idea
flodefacebook Merci Nicolas pour cet indicateur. Très utile dans une technique de retournement.
robdav Thanks Francesco, interesting.
stefou102 I came up with a pretty similar strategy, although in my experience the following test works...
Wilko The close at MA condition does't make much sense as this strategy will stay in market until ...
juanj The last fractal will be coordinate 1 and the high/low of the candle that generates an angle...
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
alex Im looking for a entry when EpicMA crosses over/under trigger. Then look for exits when Epic...
JM David, Thanks a lot and next week I begin the test of this strategy in real... You have ot...
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
victormork It didn't work using the add PRT code button. I'll try again without it. //SHORT // Sel...
victormork sorry the code keep on changing when I press post comment. Basically you have to complete th...
Stefan Arens Hi Vicormork, i´am sorry - but it still doesn´t work. I can´t correct the error. Prorealtim...
rejo007 C'est à propos de la partie "short" proposée par SimoneDasGupta un peu plus haut dans les co...
Doctrading AH ok, I think the ca3 is the same : ca3 = pB[1] < 0.2 and pB < 0.2 Best regards,
chromosome21 Hello everybody, First, thank you so much for all your advices, I'm a begginer in trading a...
Wilko I'm happy my code snippet inspired some new thoughts! Thanks for the feedback!
CKW Thanks Wilko. I modified your daily strategy to 4H and tested WF on Dow Jon with acceptable ...
Wilko Thanks!
gabri GraHaL, I cannot see any link attached. I mostly manual trade but for stocks with strong fi...
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread https://www.prorealcode.com/topic/multiframe-rsi-of-rsi/
bobrenard96 sorry, but your strategie doesn't work. When i implement the file, i have the error : backt...
Nicolas It's a platform error, nothing to deal with the code. Did you tried to download the itf file...
gackeen Scusa Pier, scusate tutti, sono nuovo. Ho caricato il file e mi viene restituito il messaggi...