Ayuda sobre un sistema y filtros
Publicado: 12 Sep 2007 11:39
Buenos días:
Tengo un sistema que da unos resultados bastante aceptables en el Dax.
Estoy intentando poner unos filtros y me estoy volviendo loco.
Actualmente lo estoy intentando de muchas formas. Seía algo así
(Aquí van el resto de las condiciones para comprar y vender y el sitema siempre está abiero o cerrado)
............................
...........................
.Sell AtStop, 1, .Close + 1
End If
End If
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
End With
End Sub
Pero a la hora de la verdad cuando se me ejecuta la opción exitlong atlimit o exitshort atlimit el sistema empieza a comprar o vender una vez detrás de otra. Si uso barras de cinco minutos durante esos cinco minutos compra y vende sin parar en el punto en el que le maraca la orden limit.
He intentado poner algo así para que cuando haya ejecutado la opción limit intente comprar o vender de nuevo en el punto inicial
If .GetMarketPosition(0) = 0 Then
.buy atlimit, 1, .GetExitpricePrice(0) - filtro1
End If
If .GetMarketPosition(0) = 0 Then
.sell atlimit, 1, .GetExitpricePrice(0) + filtro1
End If
Esto último iría después de todo lo anterior quedando algo así
.Sell AtStop, 1, .Close + 1
End If
End If
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = 0 Then
.buy atlimit, 1, .GetExitpricePrice(0) - filtro1
End If
If .GetMarketPosition(0) = 0 Then
.sell atlimit, 1, .GetExitpricePrice(0) + filtro1
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
End With
End Sub
Total que me salen unos resultados muy buenos pero no son realmente aplicables.
Gracias y un saludo
Tengo un sistema que da unos resultados bastante aceptables en el Dax.
Estoy intentando poner unos filtros y me estoy volviendo loco.
Actualmente lo estoy intentando de muchas formas. Seía algo así
(Aquí van el resto de las condiciones para comprar y vender y el sitema siempre está abiero o cerrado)
............................
...........................
.Sell AtStop, 1, .Close + 1
End If
End If
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
End With
End Sub
Pero a la hora de la verdad cuando se me ejecuta la opción exitlong atlimit o exitshort atlimit el sistema empieza a comprar o vender una vez detrás de otra. Si uso barras de cinco minutos durante esos cinco minutos compra y vende sin parar en el punto en el que le maraca la orden limit.
He intentado poner algo así para que cuando haya ejecutado la opción limit intente comprar o vender de nuevo en el punto inicial
If .GetMarketPosition(0) = 0 Then
.buy atlimit, 1, .GetExitpricePrice(0) - filtro1
End If
If .GetMarketPosition(0) = 0 Then
.sell atlimit, 1, .GetExitpricePrice(0) + filtro1
End If
Esto último iría después de todo lo anterior quedando algo así
.Sell AtStop, 1, .Close + 1
End If
End If
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = 0 Then
.buy atlimit, 1, .GetExitpricePrice(0) - filtro1
End If
If .GetMarketPosition(0) = 0 Then
.sell atlimit, 1, .GetExitpricePrice(0) + filtro1
End If
If .GetMarketPosition(0) = 1 Then
.ExitLong AtLimit, 1, .GetEntryPrice(0) + gl
If .GetMarketPosition(0) = 0 Then
End If
End If
If .GetMarketPosition(0) = -1 Then
.ExitShort AtLimit, 1, .GetEntryPrice(0) - gc
If .GetMarketPosition(0) = 0 Then
End If
End If
End With
End Sub
Total que me salen unos resultados muy buenos pero no son realmente aplicables.
Gracias y un saludo