Ah gotcha so this is the crux of that system as I’m sure you know.
So if the last Trade made a profit then next trade lot size increases by 2.
ELSIF PositionPerf(1) > 0 THEN
OrderSize =OrderSize+2
ENDIF
@Grahal:
This, plus the fact that
// Riesgo, multiplicador de contratos.
n=6
I don’t understand why the system would always send 10 orders though.
first system always send 10 orders
n=capital/1000
if n>100 then
n=100
endif
if n<10 then
n=10
endif
but it is ok i think i found my mistake .
i was thinkink sellshort it is like a sell orders but it have to treat like buy order just before in the code .
hi guys back in code ;
juste mix the two codes and it is very close that i want
…… but dont works , dont know why ….. could you help me
//-------------------------------------------------------------------------
// Code principal : MonSystème(196)
//-------------------------------------------------------------------------
// Definición de los parámetros del código
DEFPARAM CumulateOrders = false // Acumulación de posiciones desactivada
DEFPARAM FlatAfter =173000
// Órdenes máximas
if Ordersize>18 then
Ordersize=18
endif
// Riesgo, multiplicador de contratos.
n=1
HoraEntradaLimite = 090600
HoraInicio = 090500
HoraEntradaLimite1 = 091600
HoraInicio1 = 091500
HoraEntradaLimite2 = 093100
HoraInicio2 = 093000
if dayofweek=1 then //Monday
daytrading=1
endif
if dayofweek=2 then // Tuesday
daytrading=1
endif
if dayofweek=3 then // Wednesday
daytrading=1
endif
if dayofweek=4 then //Thursday
daytrading=1
endif
if dayofweek=5 then // Frifay
daytrading=1
endif
if Time >= HoraInicio and time <= HoraEntradaLimite and daytrading= 1 or Time >= HoraInicio1 and time <= HoraEntradaLimite1 and daytrading= 1 or Time >= HoraInicio2 and time <= HoraEntradaLimite2 and daytrading= 1 then
c1 = open < close-2
IF c1 THEN
if not onmarket 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
buy ordersize*n contract AT close+2 stop
endif
c2= open > close-1
IF c2 THEN
if not onmarket 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
sellshort ordersize*n contract AT close-1 stop
endif
endif
endif
endif
SET STOP ptrailing 5
Glad you sorted it Paris. We look forward to seeing the results when you are ready?
i ve this code put in demo account , it begins monday , i will see it is good or not …
@Paris
Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂