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 • 68 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 • 68 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 • 68 days ago #

    Great code but those drawdowns is huge! 

  4. mbaker15 • 66 days ago #


    Could somebody translate this code into english for me?

    Regards, Mark

    • Nicolas • 66 days ago #

      I think Google Translate can do this job for you 🙂

  5. iramirez55 • 65 days ago #

    Hola, gracias primero de todo.

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


  6. Jesús • 64 days ago #

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



  7. jonjon • 24 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 • 24 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 • 21 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 • 19 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
arcane For a program, please specify the supportThe spreadThe time unit. You need to do this at t...
Derek Good question. Especially the special types of bear markets in the US can be misleading.  T...
Derek Hello arcane, you are right. Starting capital = 10.000,-€ Spread = 1 Timeframe : Monthly
iramirez55 thanks for all
Raul Vg Hello, please comment on the forum link that appears in the description. In that same forum ...
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]
alemaliz Hello Raul vg the minimum stop on the Dax and mini 1 and not to 18 points how do you insert ...
Raul Vg Hi alemaliz, In the IG broker, the minimum trailing stop is 5 with the open market.  
Nicolas For everyone information, a discussion thread is ongoing here:
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Interesting concept, good work !  
verdi55 Thank you. This is mainly to show the concept, but I would not trade with this system as it ...
3 months ago
Nicolas I'm sorry, upload of attachments is actually not possible in the comments.
PRT_kok hi Verdi, nice try...I've developed a similar strategy but got poor profit factor...what's y...
verdi55 The profit factor depends very much on the brick size AND on the position of the first bar o... The code dose not work   Syntax error: line 2, character 12One of the following chara... why do I get error ond line whit DAX? Eihter cod works. Can you chare the file?
Elsborgtrading Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your e...
4 months ago
maxxb a ok quindi potrei anche non aver sbagliato nulla ... grazie ..  
sunandsea12345 scusate sono nuovo del forum ,dove posso chiedere come posso generare un codice che mi perme...
ALE Ciao Puo andare nel forum Supporto pro order In fondo troverai lo spazio per inserire un ...
Nicolas Hello DonDollar, and thanks a lot for your contribution to our community :) A "keep it simp...
DonDollar Ni Nicolas, thanks for the comment. I started with a 3000$ Position and 1 Pip Spread. I fo...
DonDollar Stupid me, it is indeed 1 POINT Spread....  
mbaker15 How is this system performing live guys? Has anyone been running it?
ellejoe Hi Ale, can you please share your live results and updated version with us? Was this strateg...
ALE Hello ellejoe,since 1th november 2016,I can confirm probacktest results, I cant run it in li...
DANY I did it on demo account; it's too dangerous for mea and I can not resist psychologically  ....
demoz How can a demo account be dangerous? Did you have it run live (on a demo account for exampl...
DANY Yes, I mean that I tried on a demo account for 2 months and it had work fine, like the BackT...
Nicolas Hi David, thank you for the contribution. I have tested the strategy through 200.000 bars an...
David Thanks Nicolas. I assumed that this would be the case when back tested further. 
Dimi.A Awesome mate.
ALE Hello Traderfed, because it run many operations over the past three years, instead of havin...
fepabe Ciao Ale, porta pazienza ma facendo copia incolla del codice non mi restituisce alcun valore...
arke Hi Cosmic, I saw that you are able to do a backtest on DAX in 15Min timeframe till 6 years ...
5 months ago
enzo_52 Hi Ale, so you have the same results with german 30 mini 1e cash TF 1h?  
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
5 months ago
ALE @Nicola Nicolas thanks for your kind attention, the same indicator used with different set c...
miguel33 In piena sintonia . 
Ernesto1 Grazie Ale per aver condiviso con noi il tuo indicatore  P.A.B. aspettiamo il tuo script s...
5 months ago
chaostrader82 Dear Matriciel , can you add in the following ? stoploss=30pips , take profit= 4pips <===...
chaostrader82 Theres some bugs still with this program , can somebody help to improve on the following? I...
Matriciel Hi Chaostrader82,You know, I'm starting in automatic strategy coding so I'm not going to be ...
6 months ago
Cosmic1 Hi Yngve, Amplitude relates to the range of the price action for the given times stipulated...
GAMMA I try as per your advise and change the time to usa time still no luck, may be I am doing so...
Cosmic1 Post the code you are using, will try and figure it out. What broker?
Elsborgtrading Hi Nicolas, and thanks for updating the file. When I backtest the code now I get a complete...
Elsborgtrading Hi Nicolas. I made a mistake. a FTSE chart had sneaked under the DAX and when backtesting I ...
Nicolas "set stop loss" are individual for each order with IG.