EURUSD Mini overnight trading strategy 3 minutes TF

EURUSD Mini overnight trading strategy 3 minutes TF
Good afternoon,

This strategy is designed for the Eur / Usd mini 1 € with a 3-minute timeframe and a spread of 0.6 pips. It only works in the evenings. Let's see what you think and if anyone is encouraged to improve it. ;) I have already put it with real money for a month and the backtest corresponds to what the robot does in real.

Buenas tardes,

Esta estrategia esta diseñada para el Eur/Usd mini 1€ con un timeframe de 3 minutos y un spread de 0,6 pips. Exclusivamente funciona por las noches. A ver que os parece y si alguno se anima a mejorarlo. ;) Ya lo tengo puesto con dinero real desde hace un mes y el backtest se corresponde a lo que hace el robot en real.

DEFPARAM CumulateOrders = true // Acumulación de posiciones desactivada
DEFPARAM FlatAfter = 080300
// No se abren nuevas posiciones después de la vela que se cierra a las 5:15 p.m.
HoraEntradaLimite = 070000
// El análisis de mercado empieza en la vela de 15 minutos que cierra a las 9:30 a.m.
HoraInicio = 010000
IF ((Month = 6 AND (Day = 23 or day=24))or (month=11 and day=9)) THEN
 DiaTrading = 0
 DiaTrading = 1

capital= 3000 + strategyprofit
posicion= capital/3000
if posicion>1then
if posicion<1then

if Time >= HoraInicio and time < HoraEntradaLimite and diatrading=1 then
// Condiciones para entrada de posiciones largas
 indicator1 = ExponentialAverage[35](close)-2*std[5](close)
 c1 = (close < indicator1[1])

 indicator2 = RSI[11](close)
 c2 = (indicator2 < 30)

 IF c1 AND c2 THEN
  buy posicion CONTRACT AT MARKET

// Condiciones de entrada de posiciones cortas
 indicator3 = ExponentialAverage[35](close)+2*std[10](close)
 c3 = (close > indicator3[1])

 indicator4 = RSI[5](close)
 c4 = (indicator4 > 70)

 IF c3 AND c4 THEN
  sellshort posicion CONTRACT AT MARKET

 atr = AverageTrueRange[49](close)
 stopus = atr*300000
 TP = atr*80000

 SET STOP pLOSS stopus
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 • 123 days ago #

    Thank you Raul for sharing your strategy with the community. Every code sharing is appreciated. I have successfully backtest your strategy with new backtest engine of the new PRT version, and results are accurate. I found that you use averaging down to compensate loosing orders, even if you cut all orders at the beginning of a new day, the drawdown of the money equity can be huge sometimes. Maybe you could de-leverage a bit or avoid stacking orders at each new candle if the takeprofit was not met at the first glance. This is just my own thoughts by now, will be happy to discuss more. 

  2. Raul Vg • 123 days ago #

    Thanks Nicolas, I’m sorry, my English is bad, I will translate it in google hehe. In the code, I have put that it does not operate the night of the brexit or of the elections of the usa,
    These days better not have automatismes. In the code you can change the number of contracts as the benefits of the strategy increase, currently limited to a contract.

  3. Joachim Nilsson • 122 days ago #

    Great code but those drawdowns is huge! 

  4. mbaker15 • 120 days ago #


    Could somebody translate this code into english for me?

    Regards, Mark

    • Nicolas • 120 days ago #

      I think Google Translate can do this job for you 🙂

  5. iramirez55 • 120 days ago #

    Hola, gracias primero de todo.

    Por la mañana entre 7 y 12 también fuciona.


  6. Jesús • 119 days ago #

    Hola Raul VG, muchas gracias por compartir la estrategia, parece muy interesante el concepto.



  7. jonjon • 79 days ago #

    Hi Raul. Thanks for this code. I understand it all apart from the stop and target code. Can I ask a stupid question: where do you get the 300000 and the 80000 numbers from? I understand what the ATR is but I can’t get my head around why you then multiply by these numbers. Thanks

  8. Raul Vg • 79 days ago #

    Hi jonjon, these figures are the most appropriate for the strategy. Atr is an average true range indicator, in eur / usd it has values of 0.001, so multiply by that amount. Anyway is a very risky strategy, to accumulate orders, can be all night accumulating orders without stopping and produce large losses

  9. barbagio • 76 days ago #

    Hola Raul,
    gracias por compartir sistema, muy interesante. Tengo unicamente una duda sobre el spread que me parece verdaderamente muy bajo. Has probado otra combinaciòn aumentandolo? A la noche normalmente no està tan bajo.
    Otra pregunta: el sistema ya està optimizado?


  10. jonjon • 73 days ago #

    Hi Raul. Just a thought, is there a way to limit the maximum number or orders that can be accumulated? This could help a little with risk? With the following:

    DEFPARAM CumulateOrders = true

    is it possible to limit it to a maximum to 4 accumulated orders, for example? If so do you, or anyone else, know the code as I’m being a little slow today? Thanks 

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Peter J Hi Francesco do you think it would differ if the backtesting had tick data?  It's my underst...
Dagge99 What is the spread that time of day in Italy40?
Francesco78 6 ticks noramlly here in Italy.
GraHal   Your code is so 'disciplined and well laid out' ... a pleasure to work with! Is bel...
victormork @GraHal shall we move this to the forum thread advised above?
Maz Thanks guys. Please see forum post for more details. I encourage you guys to play / pull it ...
bjoern You are absolutely right, thank for your comment. Already working on an optimization while u...
bjoern Added a range filter for entering positions. Performance seems to be much better, even with ...
Nicolas Thanks!
bjoern Thanks! Will take a look at it!
Francesco78 Thank you!
ALE Thanks Paris
iramirez55 Bonita estrategia. Gracias ALE
ALE ... thanks I hope could help our community!
AleX Thanks
Bandido Ciao e grazie per il codice. Avevo osservato la stessa cosa circa sette o otto anni fa, sem...
Francesco78 Grazie a te per il commento, per quanto riguarda lo spread basta impostare l'entrata alle su...
Dagge99 Why are you the only one sharing unfinished strategys that doesn't perform well? To help us ...
Nicolas What are you calling a finished strategy? This one has been coded by a request on forums, si...
clanli Hi Nicolas Thanks for a fantistic piece of code. I tried the following with really good res...
GraHal Yes, somehow it seems logical for you to raise a Forum Thread and with the same title as thi...
TempusFugit Done!
TempusFugit Aloysius, Would you so kind to post your results here?:
Oskar Bergvall With tp= -0,1 and with the MACD I'd say it's very safe in 4 hour I cannot find a single fail.
DEIO Hi all, I posted a new version on the related topic.
rpcasanas30779 Hi, Tried test this strategy on USTech 100 ( Nasdaq) and looks excellent return ( 90+% Accur...
Derek Nice strategy. Have you tried adding a stop loss since there are a few sharp drawdowns? I ...
Piston_Broke Non so .... da qui la mia domanda iniziale :-)
Piston_Broke Hi Derek. I have tried many different ways to apply SL's to this and similar versions of th...
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
Oskar Bergvall  I noted Davids and Nicolas remarks. Could it be possible to make an indicator for contraria...
bluetime6 Hello Nicolas. Can i ask you for something? I backtested your strategy in Dax 4H Timeframe...
Francesco78  Sorry I must add that it looks great only if we start the backtesting from 2008. Im not fa...
Nicolas You can't upload images here, sorry. Hi, I dont understand, when I do the backtest I get only drawdown and a big loos? Have I mis...
2 months ago
Lotar Hi Plop61, thanks for your comment. To make the code for short positions is possible. But ...
JvdG Hi Lotar, your strategy raised my interest; I did some tests and made a few adjustments fit...
Nicolas You can send it to and I'll attach it here. Thanks for your sharing!
DEIO hi Derek, so you mean that you are using CASH contract as US 500 Cash (mini or full doesn't...
Derek It's a CFD on the futures contract. That's why there is no commission and IG calls it a Forw...
Derek Clarification: Automatic rollover will be into the nearest forward but I prefer the farthes...
iramirez55 thanks for all
johnymon Hi Reiner, Many thanks for the  superb strategy.I just tried to back-test on prerealtime bu...
Reiner Hi Joy John, Navigator will allways sell at 9:00 at the first tdom and will accumulate a lo...
GabrielVP Hola. ¿Has probado a incorporar compras en el mismo sistema? o ¿sería posible? disculpa mi i...
Iber0 Con esta modificación reinviertes las ganancias y la curva mejora bastante arriesgando menos...
Iber0 Asi quedaria con el spread de IG [IMG][/IMG]
bjoern Seems to work nice on BUND - M15 with SL 70 and TP 120