intraday DAX strategy mini-1€, timeframe 5 min

Category: Strategies By: Raul Vg Created: January 16, 2017, 10:00 AM
January 16, 2017, 10:00 AM
Strategies
70 Comments

Good afternoon,

This robot simply tries to buy or sell in the direction of the first 5 minutes of the market, ie if the first bar 5 minutes from the opening at 9am is positive, we buy, otherwise we sell.

With a spread of 1 point in the DAX mini 1 € and a time frame of 5 min.

In addition, it has an accumulator, in case the operation wins, the next day we will add 2 contracts, in case of losing the operation, we will divide between two contracts that we put the next day. Example:

Day 1: 1 contract -> We win; Day 2: 3 contracts-> We win; Day 3: 5 contracts-> We lost; Day 4: 3 (2.5) contracts-> We win; Day 5 = 5 contracts …

In addition, it has a manual multiplier to assume greater or lesser risk with the number of contracts.

There are also a maximum number of contracts.

IMPORTANT: For a faithful backtest, you must use PRT v10.3, in v.10.2 the results are NOT real.

A discussion thread is ongoing on the forum about the settings and feedback about the strategy, you can read, ask your questions and participate here:  https://www.prorealcode.com/topic/5-min-mini1e-dax-spread-1/

//—————–

Buenas tardes,

Este robot trata simplemente de comprar o vender en la dirección de los primeros 5 minutos del mercado, es decir, que si la primera barra de 5 minutos desde la apertura a las 9h es positiva, compramos, en caso contrario, vendemos.

Con un spread de 1 punto en el DAX mini 1€ y un time frame de 5 min.

Además, tiene un acumulador, en el caso de que la operación resulte ganadora, al día siguiente sumaremos 2 contratos, en el caso de perder la operación, dividiremos entre dos los contratos que metemos al día siguiente. Ejemplo:

Día 1: 1 contrato -> Ganamos; Día 2: 3 contratos-> Ganamos; Día 3: 5 contratos-> Perdemos; Día 4: 3 (2,5) contratos-> Ganamos; Día 5= 5 contratos…

Además, tiene un multiplicador manual para asumir mayor o menor riesgo con la cantidad de contratos.

También hay puesto un máximo de contratos.

IMPORTANTE: Para un backtest fiel, hay que usar PRT v10.3, en la v.10.2 los resultados NO son reales.

// Definición de los parámetros del código
DEFPARAM CumulateOrders = false // Acumulación de posiciones desactivada

// La posición se cierra a las 17:29 p.m. si no toca ni stop ni take.
DEFPARAM FlatAfter =173000

once ordersize=1
// No se abren nuevas posiciones después de la vela que se cierra a las 09:06
HoraEntradaLimite = 090600
// El análisis de mercado empieza en la vela de 5 minutos que cierra a las 09:05
HoraInicio = 090500

// Órdenes máximas
if Ordersize>18 then
 Ordersize=18
endif

// Riesgo, multiplicador de contratos.

n=6

// Condiciones para el analisis.

if Time >= HoraInicio and time <= HoraEntradaLimite then

// Condiciones de entrada de posiciones largas.

c1 = open < close-1
IF c1 THEN
 IF PositionPerf(1) < 0 THEN
  OrderSize = OrderSize/2//+1
  if ordersize<1 then
   ordersize=1
  ENDIF
 ELSIF PositionPerf(1) > 0 THEN 
  OrderSize =OrderSize+2
 endif
// Si la primera barra del día de 5 min es positiva, compramos.
 buy ordersize*n shares at market
endif

// Condiciones de entrada de posiciones cortas.

c2= open > close-1
IF c2 THEN
 iF PositionPerf(1) < 0 THEN
  OrderSize = OrderSize/2//+1
   if ordersize<1 then
    ordersize=1
   ENDIF
 ELSIF PositionPerf(1) > 0 THEN
  OrderSize =OrderSize+2
 ENDIF
// Si la primera barra del día de 5 min es negativa, vendemos.
 sellshort ordersize*n shares at market
 endif
endif

SET STOP ploss 5
SET TARGET pPROFIT 10

 

Download
Filename: intraday-DAX-5minutes.itf
Downloads: 918
Raul Vg Senior
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...