The Grinder EUR/USD 5 min / intraday trading strategy

The Grinder EUR/USD 5 min / intraday trading strategy

This is my first autosystem, thanks to the many people in this web that help me with it. I designed it with the idea of being versatile so it can work within bulls, bears and neutrals periods, also with different markets, timeframes or indicators. I put here one of the setups I designed but I have tried others with similar results in backtesting, e.g. DOW-15m-MACD.

There´s not size management. I have tried roughly several approachs but I was not convinced about them. I decided to leave the size of the positions to the monetary circumstances of each one. Also it can be a good topic to contribute ideas here.

I can only backtest with 100k candles, it would be nice if someone can do it before that.

To use you need to import in PRT the Divergence Indicator “Divergence-RSI-V3.itf” and the system itself “The Grinder-EUSD-5M-v0.itf”

SETUP:

  • EUR/USD Intraday, from 08:00 to 19:00
  • 5 minutes TimeFrame

HOW IT WORKS:

  • It uses an indicator that detectes divergences between price and RSI to look for swing highs and lows (This indicator is based in an original idea of “jose7674”. Thanks for it Jose, sorry I don´t remember where I get it, not in this web)
  • It filters trends with a modified Donchian Channel
  • Additionally when a %Loss is reached it switchs to the opposite direction as a trend should be underway
  • The %Profit is high and rarely used as the system itself look for highs and lows to change position
  • The %Loss is not used, coded as a precaution, as the system switch direction before getting to 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?

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

  1. verdi55 • 03/30/2017 #

    OH MY GOD

  2. TempusFugit • 03/30/2017 #

    I forgot to say that I am looking forward for feedback about this strategy. Is my first autosystem and sincerely I have no idea if I am going in the right direction and I hope you people with more experience help me. Thanks

    • DEIO • 03/30/2017 #

      hi TempusFugit,
      I tried to make some manual calculation of the performance in order to insert in the strategy some Money Management, but I stopped
      myself when I saw results.
      It’s possible that I’m wrong but let’s try you too, using the attached code below.
      It’s seems that when the performance are quite stick to zero level (between plus or minus) prorelatime the most of time
      say that you win (even if a little amount), but by a manually calculation you loose.
      You can see the equity line manually calculated.
      So, I hope to be wrong (I’m am a new member…), but if I am right I would be worried about PRT results.
      Please let me know your opinion or whoever can help us.
      thx
      code:
      // System parameters
      DEFPARAM CumulateOrders = FalseDEFPARAM PRELOADBARS = 2000DEFPARAM FLATBEFORE = 080000DEFPARAM FLATAFTER = 190000LimitEntryTime = 184000 //No Entries after this time
      //———————————————————————————–//timestop 5 inutes before FLATAFTER in order to let me calculate manually perftimestop = 185500if one = 0 thencapital = 10000one = 1endif//———————————————————————————–
      // Divergence Indicator RSIignored, DRSI = CALL “Divergence RSI v3″[24,8,1,0]BullishDivergence = DRSI = 1BearishDivergence = DRSI = -1
      // Filter to avoid entries on a trend (Delayed Donchian Canal with a Margin)NotBearTrend = LOWEST[120](close[15]) < (close+((close*SafetyMargin)/100))NotBullTrend = HIGHEST[120](close[15]) > (close-((close*SafetyMargin)/100))SafetyMargin = 0.15
      // Conditions for Entry of Long PositionsIF BullishDivergence AND NotBearTrend AND OPENTIME<=LimitEntryTime THENBUY 1 CONTRACTS AT MARKETELSIF SHORTONMARKET AND ((CLOSE-TRADEPRICE)/TRADEPRICE)*100 > FlipPosition THEN// Change from short to long position when the FlipPosition Stop reached, because a trend is underwayBUY 1 CONTRACTS AT MARKETENDIF
      // Conditions for Entry of Short PositionsIF BearishDivergence AND NotBullTrend AND OPENTIME<=LimitEntryTime THENSELLSHORT 1 CONTRACTS AT MARKETELSIF LONGONMARKET AND ((CLOSE-TRADEPRICE)/TRADEPRICE)*100 < -FlipPosition THEN// Change from long to short position when the FlipPosition Stop reached, because a trend is underwaySELLSHORT 1 CONTRACTS AT MARKETENDIF//———————————————————————————–//manually calculation of performanceif onmarket thenif LONGONMARKET thenperf = (close – POSITIONPRICE)/POSITIONPRICE * 100perfc = (close – POSITIONPRICE) * POINTVALUE * COUNTOFPOSITION *10000endifif shortonmarket thenperf = (-close + POSITIONPRICE)/POSITIONPRICE * 100perfc = (-close + POSITIONPRICE) * POINTVALUE * COUNTOFPOSITION *-1 *10000endif
      if perf >= 3 or time > timestop then//graph perfccapital = capital + PERFCgraph capitalif longonmarket thensell at marketendifif shortonmarket thenexitshort at marketendifendifendif//———————————————————————————–// Loss, Profit and Flip StopsSET STOP %LOSS 3 // Not used because the Flip Stop is lower, just in case.//SET TARGET %PROFIT 3FlipPosition = 1.5 // It this %Loss is reached the position turns in the opposite direction (Long->Short or Short->Long)
       
       

  3. TempusFugit • 03/30/2017 #

    Hi DEIO, 
    Thank you for collaborate
    I am not sure what are you trying… to replicate the “Equity  Cuve” shown by PRTBackTest? And I am not sure to follow your code, e.g. what is “one”?, but is it possible that the piece I copy below make your code only take in account the trades with 3% profit or those that reach 19:00? Because these trades are minority
    if perf >= 3 or time > timestop then
    //graph perfc
    capital = capital + PERFC
    graph capital
    Also, you canceled the 3%TakeProfit so the system is changed.
    Maybe I can´t understand your code because I am also a newbie, can any expert enlight us?
    Also if you are worried about the PRT calculation of P/L, I think you can verify it checking each trade calculation of P/L and total them. Is that what worries you?
     

    • DEIO • 03/30/2017 #

      Hi TempusFugit,
      it’s true that didn’t consider all the trades of the strategy…. I’m checking….
      Anyway usaually I try to replicate the E.L. of PRT (as best I can), because this way I’m more confident about what I’m coding.
      Probably I haven’t completely understood your criteria’s strategy, anyway in order to try a Money management
      in my mind it’s necessary to calculate the current capital and so the plusminus of any trade.
      About 3% target … I tried to manage manually as I said before (just where you said that there are the minority of trades).
      And results are the same you got with your original code.
      Two questions:
      1. when the position is flipped in the opposite direction, where the closure of the loosing trade is ?? 2. The majority of trades at what % are closed ? (apart time expiry and 3% plus)
      Anyway I can’t judge PRT calculations !!! but I’d like to understand how the strategy works exactly 🙂
      I hope I was clear ..
      Thx.

  4. Joachim Nilsson • 03/30/2017 #

     Hey TempusFugit!
    Thanks for your code but im sorry to say that it dosn´t work in it´s current state. 
    You have over optimized it to work with the order of the trades, like – short-long-long-short-long and so on. If you split the code in one short side and on long side you will not get a very pleasing resault…
    If I could I would add a picture but it´s not possible here.

  5. TempusFugit • 03/30/2017 #

    Hi Joachim,
    Thanks for sharing, but I am not sure about that. The base of the system with wich I created it is taking the highs and lows continuosly during the day (high-low-high-low…), that´s way the stop loss and profit are so high for this timeframe and rarely used So I think it´s normal it doesn´t work separately. I would nice to know the results of backtest before the one I can get (100.000) to know if it´s too optimized as you think.
    Thanks anyway 🙂

  6. TempusFugit • 03/30/2017 #

    Hi DEIO,
    Answering your questions:
    1. when the position is flipped in the opposite direction, where the closure of the loosing trade is ??
    It would follow the same rules that any other trade. It can:

    Change direction if the indicator gets the opposite divergence signal (Bear->Bull or Bull->Bear): Its the most common
    Change direction if it reachs the FlipStop (1,9% in this setup). Thats it´s difficult to happen twice in the same day
    Reach the ProfitStop (3% in this setup). Also rarely happening
    Close at 19:00

    2. The majority of trades at what % are closed ? (apart time expiry and 3% plus)
    With my max bars allowed backtesting (100.000) the statistics are: Average Win: 192$ and Average Loss: -225$. But the results by trade are very varied because the system can change direction several times in the same day and it goes from 0 to -1.882/+3.173
    I hope this help you understand the system better

  7. Aloysius • 03/30/2017 #

     Hi, I’ve made the backtest with 200 000 bars and unfortunatly it is not so good… I try to inser the picture but it doesn’t work. Anyway it looses 28 000 $ between august 2014 and august 2015.

    • TempusFugit • 03/30/2017 #

      Thanks Aloysius, too bad the results are not good. I will appreciate very much if  you can post them in the forum, to see how it behave. Anyway I still like the idea of the system, I will try to improve it.

    • TempusFugit • 03/30/2017 #

      Aloysius,
      Would you so kind to post your results here?:
       https://www.prorealcode.com/topic/the-grinder-eurusd-5-min-intraday-trading-strategy/
      Thanks 

  8. Joachim Nilsson • 03/30/2017 #

    Sorry my wrong, missed the “flip position” line 🙂

  9. TempusFugit • 03/30/2017 #

    Done!
     https://www.prorealcode.com/topic/the-grinder-eurusd-5-min-intraday-trading-strategy/
    Thanks for your patience GraHal, this is a new world for me. And for appreciate my work 🙂

  10. CERROGATO • 03/30/2017 #

    hola tempus , estoy usando tu código, por que sólo de 8 a 19 siendo 24 horas el eurusd?
     

    • TempusFugit • 03/30/2017 #

      Hi C,
      The hours the System don´t opperate the market use to be more flat so the highs and lows are not very far from each other and the System needs some distance betwenn H/L to react well.  I backtested the System with different open/close times and this seen to be the best

  11. rama • 03/30/2017 #

    LOWEST[120](close[15]) what is meaning close[15] if LOWEST[120](close) will return close value of lowest of 120 candles. what does LOWEST[120](close[15]) code return?

    • TempusFugit • 03/30/2017 #

      Hi rama,

      It means the lowest close of the last 120 candels starting 15 candles back from the present candle.

      Be ware this strategy is not profitable, has been loosing money all the last year. Anyway I think it still has useful ideas, maybe for longer timeframes

      Best of luck

  12. rama • 03/30/2017 #

    LOWEST[15(close[0]) also gives the same

  13. TempusFugit • 03/30/2017 #

    Ok, but you are missing the 120 lookback period

  14. Globalmarkets79 • 03/30/2017 #

    Hello, I tried to run the code but i had an syntax error that “This variable is not used in the code:limitentrytime”. Can you help me?

avatar
Register or

Likes

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

+1 more likes

Related users ' posts
YvesRobert Hello David, can you explain to me this strategy ? You calculate the difference between t...
davidelaferla The strategy calculates the variation between the body and the previous body (however in pro...
KumoNoJuzza Thanks David it looks great. I am playing with it to get familiar. Do you think it would b...
BaderBader Good day davidelaferla, Thank you for making your strategy available to the community, I do...
Anjuna Marine Thanks for sharing this. I've tested it over 13 years, and each year has been profitable. I ...
noisette Thank you for this code. looks robust and can easily be improved with trailing stop and adju...
phoentzs
1 year ago
banjoo78 Which is the timezone's setting of USA SP 500? I've differents results and I don't know why....
pdrh I have runit in the UTC+2 TZ and got matching results
BaderBader Hey @banjoo78, maybe its because of your License for US Indices? Because I have the sa...
pdrh Bonjour WE ARE SOCIETY,Vous optimisez toujours votre Algo chaque
WE ARE SOCIETY Bonjour, je l'optimise et l'améliore chaque semaine en évitant au maximum les interdictions ...
dammon c'est un bien beau code que tu nous sors là. il m'a fallu du temps pour bien tout comprendre...
Germano77 hello, thx for sharing, but wich broker do you use? At IG I got the notification "automatic...
Musiar Hi Davide, You have done a great job: I modified a bit your strategy for Nasdaq, and now I ...
Maik2404 Musiar können sie den code des automatischen systems teilen.
sfl CAC on Weekly timeframe, long only, short dosent work. Defparam cumulateorders = false ...
superfalcio This kind of strategies coming from Connors research usually work well on timeframes from 1D...
AndyB72 Sbaglio o Short non fa nemmeno un'operazione ? Andare Long su SPY con la MM200 è praticament...
Stanko Ciao Crusoe, grazie per il commento: confermo che il trailing stop non funziona bene. Provo ...
taklause I was wondering, you said it works on the 1 min Chart, but you never use it in the code as t...
Stanko Ciao taklause. Utilizzando il grafico a 1 minuto e fino al grafico a 15 minuti il codice fun...
YvesRobert Hello davidelaferla, how do you put a stop loss and where exactly ? the moment you enter on ...
Hypersimo Buongiorno Davide a quale distanza inserire stop loss e tp nella strategia? grazie
beanpole Thank you for sharing the code. I applied it to the "CAC40 Index" on Euronext market on a da...
ProRealAlgos Hi Crusoe76. Do you mean that you would like a short version of this?
crusoe76 yes please
banjoo78 Hi, first of all thank you for your sharing. I'm new of ProRealTime and I can't replicate y...
ProRealAlgos Same here ;)
YvesRobert Hello, can someone explain this strategy because I don't understand what the program does ex...
andyfx79 l have been demoing for the past couple of weeks with great results , but during a bear mark...
ProRealAlgos.com Hi JohnScher. Yes I think you refer to the strategy called "Turnaround tuesday". This strate...
JohnScher I am not alluding to the turnaround tuesday. The general opinion is that Turnaroundtuesday ...
ProRealAlgos.com Yeah that's maybe not of importance. Anyway. Enjoy! :)
superfalcio Hello, very interesting. Do you have already some tested condiction including timeframe and ...
ThaNoizy Yes, you cannot use CFDs on IG for Weekly strats you need to use their Index Futures, they h...
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...
JohnScher Short variant, see at https://www.prorealcode.com/topic/late-lunch-trade-dax40-strategy/
DANY Hi JohnScher, Thanks a lot for your contribution. Consider this release to avoid overfit...
JohnScher Thank you so much for exploring the Late Lunch Strategy. For discussion and in answer to yo...
BenJuice JohnScher, merci de partager ta stratégie. Je suis nouveau dans ce domaine, sur ton code q...
JohnScher As a percentage of the price, here 2%. StopLoss as well as TargetProfit. SL and TP come ...
Wilko I absolutely love the simplicity of this mean-reversion strategy. Well done!
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 ...
thomas2004ch Hi, Is this startegy suitable for daily SPY? Regards
ebous64 Je cherche à traiter des effets de bords avec un encadrement ajustable des variables. Vous a...
thomas2004ch What are the values for nbx, nby, pbx, pby, ptsup, stplos, stptg, tp, vsmax, vsmin?
JohnScher Postscript: It's running in the live right now. One position after the other is opened. ...
ullle73 nice!! how's it been since your last post on going live? :)
thomas2004ch Hi, Is this strategy suitable for daily SPY? Regards
adconsulting
3 years ago
japan 225 cash 1 h
japan 225 cash 1 h
28
Strategies
superfalcio Ora è tutto ok e gira correttamente!!! Grazie, mi sembra veramente notevole a prima simulazi...
Meta Signals Pro Hi @adconsulting, Thanks a lot for these contributions. I am currently running live 2 of y...
superfalcio Ciao @adconsulting, stavo rifacendo un check dei tuoi sistemi, quello su eurusd-30 min... on...

Top