ProRealCode - Trading & Coding with ProRealTime™
Hello,
nothing to do with performance.
if an order is rejected it will attempt an order.
the same thing to close an order
it is also to answer josef1604
here is the file edit
hi Fifi
in which unit of time should the graph be executed? thank you in advance
timeframe 1 minute
it does not change anything for the backtest.
it’s in demo or real that it changes
/ ROBOT VECTORIAL DAX
// M5
// SPREAD 1.5
// by BALMORA 74 - FEBRUARY 2019
// ajouter ligne 18 45 et a partir de 115 par fifi743
DEFPARAM CumulateOrders = false
DEFPARAM Preloadbars = 50000
//VARIABLES
CtimeA = time >= 080000 and time <= 180000
CtimeB = time >= 080000 and time <= 180000
// TAILLE DES POSITIONS
MoneyManagement = 2
RiskManagement = 1
Capital = 2000
MinBetSize = 1
RiskLevel = 5000000
Equity = Capital + StrategyProfit
IF MoneyManagement = 1 THEN
PositionSize = Max(MinBetSize, Equity * (MinBetSize/Capital))
ENDIF
IF MoneyManagement = 2 THEN
PositionSize = Max(LastSize, Equity * (MinBetSize/Capital))
LastSize = PositionSize
ENDIF
IF MoneyManagement <> 1 and MoneyManagement <> 2 THEN
PositionSize = MinBetSize
ENDIF
IF RiskManagement THEN
IF Equity > Capital THEN
RiskMultiple = ((Equity/Capital) / RiskLevel)
PositionSize = PositionSize * (1 + RiskMultiple)
ENDIF
ENDIF
PositionSize = Round(PositionSize)
// TAILLE DES POSITIONS
PositionSize = 1 * positionsize
ONCE PositionSize = 1
ONCE PositionSize = 1
// ajouter par fifi743
spread=abs(OPEN-CLOSE)
coeff=spread/highest[200](spread)*100
// perfomance
posmax =2
PP=positionperf(0)*100
if pp>ppf then
ppf=pp
endif
// stop hedge
stpposinver =2
//STRATEGIE
//VECTEUR = CALCUL DE L'ANGLE
ONCE PeriodeA = 10
ONCE nbChandelierA= 15
MMA = Exponentialaverage[PeriodeA](close)
ADJASUROPPO = (MMA-MMA[nbchandelierA]*pipsize) / nbChandelierA
ANGLE = (ATAN(ADJASUROPPO)) //FONCTION ARC TANGENTE
CondBuy1 = ANGLE >= 45
CondSell1 = ANGLE <= - 37
//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILE
ONCE PeriodeB = 20
ONCE nbChandelierB= 35
lag = 5
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
trigger = Exponentialaverage[PeriodeB+lag](pente)
// modifier par fifi743
// ajout d'un filtre pour achat
filtre,weekpivot,pivot,filt =call"FILTRE_Prise_Position"(close)
//===================== ajouter par fifi743
donchianP = 20
hh=highest[donchianP](high)
ll=lowest[donchianP](low)
MA=Average[4](close)
Myrsi=RSI[2](close)
CondBuy2 = (pente > trigger) AND (pente < 0) and high>MA and coeff>0.9
CondSell2 = (pente CROSSES UNDER trigger) AND (pente > -1)
//ENTREES EN POSITION
AC=0
VT=0
FIN=0
//
ATR= AverageTrueRange[14](close)
if coeff=100 and dhigh(0)-high>20 and open<close and high-close>10 and hh=high and hh-ll>80 then
POSLONG=0
endif
CONDBUY = CondBuy1 and CondBuy2 and CTimeA and atr>4
CONDSELL = CondSell1 and CondSell2 and CtimeB and atr>4
if close>pivot and CTimeA and cd and hh-ll>60 and hh[1]>hh and ll[1]=ll and Myrsi>75 and close<MMB and MMB-MMA>8 and open[1]<close[1] and open<close and atr>4 THEN
buy PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
AC=11
ENDIF
IF filtre=1 and atr>4 THEN
buy PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
AC=1
ENDIF
//POSITION COURTE
IF filtre=-1 and atr>4 THEN
Sellshort PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
VT=1
ENDIF
IF CtimeB and close>pivot and coeff<8 and open>close and hh-CLOSE<CLOSE-ll and open-close<3 and high-open>10 and close>average[10,1] and hh[1]<=hh and Myrsi<25 and atr>4 THEN
Sellshort PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
VT=11
ENDIF
//POSITION LONGUE
//
if longonmarket and high-close>4then
PosLong=0
endif
tESTma=average[3,2]
if OPEN[1] crosses over tESTma[1] and LOW[1]<LOW and open<close AND CLOSE>TESTMA then
PosLong =1
endif
IF CONDBUY and Poslong THEN
buy PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
AC=2
ENDIF
IF CONDSELL and open>ll[1] THEN
Sellshort PositionSize contract at market
SET STOP %LOSS 2
ppf=0
posinver=0
VT=2
ENDIF
//VARIABLES STOP SUIVEUR
ONCE trailingStopType = 1 // Trailing Stop - 0 OFF, 1 ON
ONCE trailingstoplong = 4 // Trailing Stop Atr Relative Distance
ONCE trailingstopshort = 4 // Trailing Stop Atr Relative Distance
ONCE atrtrailingperiod = 14 // Atr parameter Value
ONCE minstop = 10 // Minimum Trailing Stop Distance
// ajouter par fifi743
if posinver=0 then
trailingStopType =1
else
trailingStopType =0
endif
// TRAILINGSTOP
//----------------------------------------------
atrtrail = AverageTrueRange[atrtrailingperiod]((close/10)*pipsize)/1000
trailingstartl = round(atrtrail*trailingstoplong)
trailingstartS = round(atrtrail*trailingstopshort)
if trailingStopType = 1 THEN
TGL =trailingstartl
TGS=trailingstarts
if not onmarket then
MAXPRICE = 0
MINPRICE = close
PREZZOUSCITA = 0
ENDIF
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close)
if MAXPRICE-tradeprice(1)>=TGL*pointsize then
if MAXPRICE-tradeprice(1)>=MINSTOP then
PREZZOUSCITA = MAXPRICE-TGL*pointsize
ELSE
PREZZOUSCITA = MAXPRICE - MINSTOP*pointsize
ENDIF
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
if tradeprice(1)-MINPRICE>=MINSTOP then
PREZZOUSCITA = MINPRICE+TGS*pointsize
ELSE
PREZZOUSCITA = MINPRICE + MINSTOP*pointsize
ENDIF
ENDIF
ENDIF
if onmarket and PREZZOUSCITA>0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
ENDIF
ENDIF
//=============================FIN LONG==============================
// impultion coeff=100
for i=0 to 6 do
if coeff[i]=100 then
CD=1
break
else
CD=0
endif
next
if longonmarket and pp<-1.2 then
Sellshort PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=3
ENDIF
if longonmarket and ppF>3.6 and pp>ppF-pp then
sell at market
FIN=1
endif
if longonmarket and time>170000 and barindex-tradeindex<30 and coeff>80 and open<close and high-close<1 and pp>ppF-pp and positionprice<close then
sell at market
FIN=2
endif
if longonmarket and open[1]<close[1] and high[1]-close[1]>3 and coeff[1]>50 and open>close and high-open>10 and coeff>50 and pp>ppF-pp and positionprice<close then
sell at market
FIN=3
endif
if longonmarket and MMA[1]-MMA[2]>MMA[1]-MMA and hh[1]=hh and hh-close<close-ll and high[1]>high and barindex-tradeindex<3 and open[1]<close[1] and high[1]-close[1]>3 and coeff[1]<25 and open<close and coeff<15 and coeff[1]>coeff and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=4
ENDIF
if longonmarket and open[1]<close[1] and high[1]-close[1]>2 and open<close and high-close>5 and coeff[1]>50 anD coeff>90 and pp>ppF-pp and positionprice<close then
sell at market
FIN=4
endif
if longonmarket and open[1]>close[1] and high[1]-OPEN[1]>5 and open<close and high-close>10 AND coeff[1]<25 and pp>ppF-pp and positionprice<close then
sell at market
FIN=5
endif
if longonmarket and open[1]<close[1] and high[1]-close[1]>1 and high-open>1 and open>close and high[1]=high and low[1]>low and coeff[1]<coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=6
endif
if longonmarket and open[2]>close[2] and high[2]-open[2]>2 and close[2]=low[2] and open[1]>close[1] and open[1]=high[1] and close[1]=low[1] and abs(open-close)<1 and pp>ppF-pp and positionprice<close then
sell at market
FIN=7
endif
if longonmarket and hh[1]=hh and ll[1]=ll and highest[10](high)>high and coeff[1]<coeff and coeff>35 and barindex-tradeindex<10 and MMA[1]>MMA and close<MMA and open[3]<close[3] and open[2]<close[2] and open[1]<close[1] and open>close and open=high and close<low[1] and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=5
ENDIF
if longonmarket and coeff=100 and hh[1]>hh and ll[1]>ll and MMA[1]>MMA and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=6
ENDIF
if longonmarket and hh[1]=hh and ll[1]=ll and highest[10](high)>high and lowest[10](low)<low and open[1]>close[1] and open>close and high-open>5 and coeff[1]=coeff and coeff<15 and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=7
ENDIF
if longonmarket and coeff[1]>70 and coeff<3 and open[1]<close[1] and open>close and close-low<1 and high-open>5 and pp>ppF-pp and positionprice<close then
sell at market
FIN=8
endif
if longonmarket and MMA[1]-MMA[2]>MMA[1]-MMA and hh[1]<hh and ll[1]=ll and open[3]<close[3] and high[3]-close[3]>8 and open<close and high-close>3 and coeff<5 and pp>ppF-pp and positionprice<close then
sell at market
FIN=9
endif
if longonmarket and hh[1]=hh and ll[1]=ll and open[1]<close[1] and high[1]-close[1]< high-close and open<close and open-low>2 and high[1]=high and coeff<1 and pp>ppF-pp and positionprice<close then
sell at market
FIN=10
endif
if longonmarket and open[2]>close[2] and open[1]>close[1] and hh[1]<hh and ll[1]<ll and open<close and high-close>8 and coeff[2]<10 and coeff<35 and pp>ppF-pp and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=8
ENDIF
if longonmarket and highest[10](high)-lowest[10](low)>high-low and close-MMA>10 and high[1]>high and open[1]<close[1] and coeff[1]<10 and open>close and coeff<2 and coeff[1]>coeff and hh[1]=hh and ll[1]<ll and pp>ppF-pp and positionprice<close then
sell at market
FIN=11
endif
if longonmarket and open[3]<close[3] And coeff[3]>85 and open[2]<close[2] and high[2]-close[2]>5 and open[1]<close[1] and open>close and coeff<3 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=9
ENDIF
if longonmarket and high[1]-close[1]<1 and coeff[1]>70 and high[3]-close[3]>5 and open[3]<close[3] and open[2]>close[2] and open[1]<close[1] and open>close and coeff[1]<coeff and positionprice<close then
sell at market
FIN=12
endif
if longonmarket and hh[1]-ll[1]>hh-ll and hh[1]=hh and coeff[3]<3and open[2]<close[2] and open[1]<close[1] and close[1]>MMA[1]and open>close and coeff[1]<coeff and coeff[1]<8 and coeff<20 and close<MMA and positionprice>close then
sell at market
FIN=13
endif
if longonmarket and open[1]<close[1] and high[1]-close[1]<1 and open[1]=low[1] and open>close and coeff[1]<coeff and coeff>10 and close crosses under MMA and positionprice>close then
sell at market
FIN=14
endif
//
if longonmarket and high>MMA and hh[1]-high[1]<hh-high and open[2]>close[2] and coeff[2]>30 and hh[2]-high[2]<hh-high and high[1]-open[1]>3 and high-open>4 and open[1]>close[1] and close[1] crosses under MMA[1] and open>close and open<MMA and coeff[1]>coeff and positionprice>close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=10
ENDIF
if longonmarket and hh-close<close-ll and open[1]<close[1] and coeff[1]<25 and coeff[1]>coeff and coeff<15and open>close and close=low and high-open>7 and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=11
ENDIF
if longonmarket and hh-close<close-ll and coeff[1]=100 and open[1]<close[1] and high[1]-close[1]>4 and coeff<5 and open>close and open-close<2 and high-open>3and pp>ppF-pp and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=12
ENDIF
if longonmarket and hh[1]=hh and ll[1]=ll and hh[1]-high[1]<hh-high and open[1]<close[1] and high[1]-close[1]>7 and open>close and coeff[1]>15 and coeff<10 and coeff[1]>coeff and high-open>6 and pp>ppF-pp and positionprice<close then
sell at market
FIN=15
endif
if longonmarket and hh[1]=hh and ll[1]<ll and hh[2]-high[2]<hh[1]-high[1] and open[2]<close[2] and open[2]=low[2] and high[2]-close[2]>5 and open[1]>close[1] and open<close and high-close<1 and open-low>6 and coeff<15 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=16
endif
if longonmarket and hh[1]=hh and ll[1]<ll and open[2]<close[2] and high[2]-close[2]>6 and open[1]<close[1] and high[1]-close[1]>3 and open>close and high[1]<high and low[1]>low and coeff>15 and pp>ppF-pp and positionprice<close then
sell at market
FIN=17
endif
if longonmarket and open[1]<close[1] and open[1]=low[1] and high[1]-close[1]>6 and open>close and high[1]>high and close<low[1] and close crosses under MMA and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=13
ENDIF
if longonmarket and open[1]<close[1] and open[1]=low[1] and high[1]-close[1]>6 and open>close and high[1]>high and close<low[1] and close crosses under MMA and positionprice>close then
sell at market
FIN=18
endif
if longonmarket and barindex-tradeindex<5 and hh[1]<hh and hh-close<close-ll and ll[1]=ll and open[1]<close[1] and high[1]-close[1]>1 and open>close and high-open>4 and close-low<1 and high[1]<high and low[1]>low and coeff>30 and pp>ppF-pp and positionprice<close then
sell at market
FIN=19
endif
if longonmarket and open[2]<close[2] and coeff[2]=100 and open[1]>close[1] and high[1]-open[1]>6 and coeff[1]<35 and hh[2]<hh[1] and ll[2]=ll[1] AND OPEN<CLOSE AND high-close>8 and pp>ppF-pp and positionprice<close then
sell at market
FIN=20
endif
if longonmarket and MMA[1]>MMA and high<MMA and hh[1]=hh and ll[1]>ll and positionperf(1)>0 and barindex-tradeindex<10 and open>close and coeff=100 and positionprice>close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
ppf=0
VT=14
ENDIF
if longonmarket and open[2]>close[2] and coeff[2]<3 and high[2]-open[2]>15 and open[1]<close[1] and high[1]-close[1]>8 and open>close and hh[1]-high[1]<hh-high and hh-close<close-ll and pp>ppF-pp and positionprice<close then
sell at market
FIN=21
endif
if longonmarket and open[3]>close[3] and high[3]-open[3]>2 and open[2]<close[2] and high[2]-close[2]>3 and open[1]<close[1] and high[1]-close[1]>1 and OPEN>close and high=open and positionprice>close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=15
ENDIF
if longonmarket and barindex-tradeindex>100 and low[1]-MMa[1]>low-MMA and low[1]>low and hh[2]<hh[1] and hh[1]=hh AND LL[1]<LL and hh-ll<30 and open[3]<close[3] and coeff[3]>50 and coeff[2]=0 and open[1]<close[1] AND OPEN>CLOSE and coeff[2]<coeff[1] and coeff[1]<coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=22
endif
if longonmarket and barindex-tradeindex<10 and open[3]<close[3] and abs(open[2]-close[2])<1 and abs(open[1]-close[1])<3 and open>close and positionprice<close then
sell at market
FIN=23
endif
if longonmarket and hh[1]=hh and low[1]-MMA[1]>low-MMA and hh-ll<60 and barindex-tradeindex<4 and hh-close<close-ll and hh[1]-high[1]<hh-high AND open[2]<close[2] and open[1]>close[1] and abs(open-close)<1 and coeff[1]>coeff and pp<ppF and positionprice<close then
sell at market
FIN=24
endif
if longonmarket and hh[2]<hh[1] and hh[1]=hh and ll[1]<ll and hh-close<close-ll and high[1]>high and low[1]<=low and open[1]<close[1] and close[1]-open[1]<4 and open>close and coeff<15 and pp>ppF-pp and positionprice<close then
sell at market
FIN=25
endif
if longonmarket and barindex-tradeindex>600 and positionprice>close then
sell at market
FIN=26
endif
if longonmarket and barindex-tradeindex<10 and cd and open[1]<close[1] and coeff[1]<10 and open>close and high-open>4 and low[1]-MMa[1]>low-MMA and high[1]>high and low[1]>low and pp>ppF-pp and positionprice<close then
sell at market
FIN=27
endif
if longonmarket and barindex-tradeindex>10 and hh-MMA<MMA-ll and hh[1]<hh and ll[1]=ll and hh-ll<70 and hh-close<close-ll and open[1]<close[1] and close[1]=high[1] and open>close and high[1]<high and low[1]<low and coeff[1]>coeff and coeff[1]>35 and pp>ppF-pp and positionprice<close then
sell at market
FIN=28
endif
if longonmarket and open[2]<close[2] and high[2]-close[2]>1 and open[2]-low[2]<1 and open[1]<close[1] and high[1]-close[1]>=1 and open<close and hh[2]>hh[1] and ll[1]=ll and coeff[2]<2 and coeff[1]=coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=29
endif
if longonmarket and open[2]<close[2] and high[2]-close[2]>6 and open[1]<close[1] and high[1]-close[1]>=6 AND OPEN>CLOSE and coeff[2]=coeff[1] and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=30
endif
if longonmarket and barindex-tradeindex>20 and hh[1]=hh and ll[1]<ll and open[2]<close[2] and high[2]-close[2]>6 and open[1]<close[1] and high[1]-close[1]>=4 and open>close and close crosses under MA and coeff[2]>coeff[1] and pp>ppF-pp and positionprice<close then
sell at market
FIN=31
endif
if longonmarket and open[2]>close[2] and open[1]>close[1] and open>close and ll[1]>ll and hh[2]-ll[2]<50 and hh[1]=hh and MA crosses under MMA and coeff[1]<coeff and coeff>90 and positionprice>close then
sell at market
FIN=32
endif
if longonmarket and coeff[4]<1 and coeff[2]<3 and open[1]<close[1] and high[1]-close[1]>4 and open>close and coeff>15 and close crosses under MA and pp<PPF then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=16
ENDIF
if longonmarket and open[2]>close[2] and high[2]-close[2]>3 and coeff[2]<5 and open[1]<close[1] and high[1]-close[1]>2 and open>close and MA crosses under MMA and LL[1]<LL and hh[1]=HH and pp<PPF then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=17
ENDIF
if longonmarket and open[2]<close[2] and open[1]<close[1] and high[2]-close[2]>3 and high[1]-close[1]>6 and open>close and high-open>6 and coeff[1]>coeff and coeff<10 and MA[2]-MMA[2]>MA-MMA and positionprice>close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=18
ENDIF
if longonmarket and open[2]<close[2] and high[2]-close[2]>8 and open[1]<close[1] and high[1]-close[1]>8 and open>close and hh[2]<hh[1] and hh[1]=hh and ll[1]=ll and coeff[1]>coeff and coeff<15 and pp>ppF-pp and positionprice<close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
VT=19
ENDIF
if longonmarket and barindex-tradeindex<3 and OPEN[1]>close[1] and open>close and coeff[1]<coeff and coeff>25 and MA crosses under MMA and MMA[1]>MMA and MA[1]>MA and ll[2]<ll[1] and ll[1]=ll and hh[1]=hh and positionprice>close then
Sellshort PositionSize * posmax contract at market
SET STOP %LOSS stpposinver
VT=20
ppf=0
ENDIF
if longonmarket and barindex-tradeindex>20 and cd and open[1]<close[1] and high[1]-close[1]>8 and open>close and coeff[1]<25 and coeff[1]<coeff and hh-close<close-ll and pp>ppF-pp and positionprice<close then
sell at market
FIN=33
endif
if longonmarket and barindex-tradeindex>20 and coeff[1]<3 and coeff[1]>coeff and coeff>50 and open>close and close<MA and hh[1]=hh and ll[1]=ll and hh-ll<30 and pp<ppF and positionprice<close then
sell at market
FIN=34
endif
if longonmarket and barindex-tradeindex>20 and open[1]<close[1] and high[1]-close[1]>3 and coeff[1]<10 and open<close and open=low and high-close>2 and coeff<1 and hh[1]=hh and ll[1]<ll and pp<ppF and positionprice<close then
sell at market
FIN=35
endif
if longonmarket AND COEFF>15 AND LL[1]>LL and(( open>close and high-open>10)or(open<close and high-close>10)) and positionprice<close then
sell at market
FIN=351
endif
if longonmarket AND OPEN[3]<close[3] and open[2]>close[2] and open[1]>close[1] and open>close and coeff[3]>25 and coeff[2]<10 and open[3]>close and pp>ppF-pp and positionprice<close then
sell at market
FIN=352
endif
if longonmarket and close<MA and coeff[2]<1 AND weekpivot>pivot and open[1]<close[1] and coeff[1]>30 and open>close and coeff>15 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=353
ppf=0
ENDIF
if longonmarket AND OPEN[2]<close[2] and high[2]-close[2]>10 and open[1]<close[1] and high[1]-close[1]>6 and open>close and coeff<15 and high[1]>high and low[1]>low and coeff[1]>coeff and positionprice<close then
sell at market
FIN=354
endif
if longonmarket AND COEFF[2]<1 and coeff[1]>30 and open[1]<close[1] and open>close and hh[1]<hh and coeff[1]>coeff and positionprice<close then
sell at market
FIN=355
endif
// les nombres ronds
pr=10000
for t=0 to 50 do
pr=PR+100
if longonmarket and high[1]>PR and HIGH<PR and hh[1]>hh AND LL[1]>LL and pp>ppF-pp and positionprice<close then
sell at market
BREAK
endif
NEXT
if longonmarket and barindex-tradeindex<15and low[2]>low AND MMA-MMB>8 and hh[1]-high[1]<hh-high and LL[1]<LL and coeff[3]>40 and coeff[2]>coeff[1] and coeff[1]<25 AND OPEN[2]<close[2] and hh[3]<hh[2] and hh[2]=hh[1] and open[1]>close[1] and open>close and high[1]>high and low[1]>low and pp>ppF-pp and positionprice<close then
sell at market
FIN=356
endif
if longonmarket and barindex-tradeindex<8 and COEFF[1]>90 and coeff>40 and open[1]<close[1] and high[1]-close[1]>5 and hh[2]<hh[1] and open>close and high[1]<high and low[1]<low and pp>ppF-pp and positionprice<close then
sell at market
FIN=357
endif
if longonmarket And (close[1]-open[1])/2<open-close and hh[2]<hh[1] and hh-ll<60 and hh=high and barindex-tradeindex<5 and open[1]<close[1] and coeff[1]>35 and Myrsi>80 and open>close and coeff>20 and coeff[1]>coeff and Myrsi<70 and pp>ppF-pp and positionprice<close then
sell at market
FIN=358
endif
if longonmarket and dhigh(0)-high>20 And OPEN<CLOSE and high-close>2 and open>MMA and MMA-MMb<2 AND coeff[1]>coeff and hh=high and hh[1]<hh and hh-ll<30 and Myrsi>90 and pp>ppF-pp and positionprice<close then
sell at market
FIN=359
endif
if longonmarket and open[1]<close[1] and coeff[1]>25 and hh[1]-high[1]>5 and high[1]-close[1]>1 and low[1]<MMA[1] and MMA-MMB<6 and open>close and open-close<1 and close-low>8 and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=360
ppf=0
ENDIF
if longonmarket and open[1]<close[1] and coeff[1]>25 and hh[1]-high[1]>5 and high[1]-close[1]>1 and low[1]<MMA[1] and open>close and open-close<2 and close-low>6 and coeff[1]>coeff and coeff<6 and pp>ppF-pp and positionprice<close then
sell at market
FIN=361
endif
if longonmarket and dhigh(0)-high>25 and open<close and close-open<5 and high-close>25 and coeff[1]<coeff and coeff>5 and hh[1]<hh and MMB-MMA<1 and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=362
ppf=0
ENDIF
if longonmarket and open[1]<close[1] and coeff[1]>75 and RSI[2](close[1])>90 and hh[2]<hh[1] and high[1]-close[1]>1 and hh[1]=hh and ll[1]<ll and open>close and coeff>45 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=363
endif
if longonmarket and dhigh(0)-high>30 and close-open<5 and open[2]<close[2] and coeff[2]>coeff[1] and open[1]<close[1] and open<close and coeff<10 and hh=high and Myrsi>95 and pp>ppF-pp and positionprice<close then
sell at market
FIN=364
endif
//
if longonmarket and barindex-tradeindex<3 and hh[1]=high[1] and hh[1]-high[1]<hh-high AND ll[1]<ll and hh-ll<60 and hh[1]-ll[1]>hh-ll and dhigh(0)-high[1]>6 and open[1]<close[1] and high[1]-close[1]>6 and open>close and coeff<25 and Myrsi>90 and pp<ppF and positionprice<close then
sell at market
FIN=365
endif
if longonmarket and barindex-tradeindex<3 and hh=high and open<close and high-close>6 and MYRSI>94 and coeff[1]>coeff and hh[1]<hh and pp>ppF-pp and positionprice<close then
sell at market
FIN=366
endif
if longonmarket and barindex-tradeindex<10 AND highest[10](high)>high and open[1]<close[1] and high[1]-close[1]>4 and open<close and high-close>3 and open-low>15 and MYrsi>80 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=367
ppf=0
ENDIF
if longonmarket and positionprice>=close and highest[10](hh)>high and open[1]<close[1] and high[1]-close[1]>3 and MYrsi[1]>90 and MYrsi[1]>MYrsi and open>close and high -open>5 and close-low>10 and coeff[1]>coeff then
sell at market
FIN=368
endif
if longonmarket and low-MMA>20 and dhigh(0)-HH>70 and high[1]>high and low[1]<low and hh-ll>100 and MMA-MMB>10 and hh[2]<hh[1] and hh[1]=hh and open[1]<close[1] and Myrsi[1]>90 and open>close and Myrsi[1]>Myrsi and Myrsi<70 and coeff[1]>coeff and coeff<25 and pp>ppF-pp and positionprice<close then
sell at market
FIN=369
endif
if longonmarket and open[1]<close[1] and hh[2]<hh[1] and coeff[1]>50 and MYrsi[1]>95 and hh[1]=high[1] and hh[1]=hh and open>close and high[1]=high and low[1]<low and MYrsi<70 and coeff[1]>coeff and pp>ppF-pp and positionprice<close then
sell at market
FIN=370
endif
//
if longonmarket and weekpivot>pivot and pivot>close and hh[1]=high[1] and open[1]<close[1] and high[1]-close[1]>4 and open[1]-low[1]>2 and close crosses under MMA and MYrsi<25 and coeff[1]<coeff and open>close and coeff>15 and hh-ll>50 and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=371
ppf=0
ENDIF
if longonmarket and pp<-0.1 and barindex-tradeindex<5 AND MMA[1]>MMA and MMA-MMb<10and weekpivot>pivot and pivot>close and dhigh(0)>hh and dhigh(0)-hh>100 and hh-ll>50 and close crosses under MMA and MYRSI<20 and coeff[1]<coeff and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=372
ppf=0
ENDIF
if longonmarket and pp<-0.2 and barindex-tradeindex<10 AND dhigh(0)>hh and dhigh(0)-hh>50 and coeff[1]<coeff and coeff>70 and close crosses under MMA and close crosses under MMB and MMA[1]-MMB[1]>MMA-MMb and Myrsi<25 and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=373
ppf=0
ENDIF
if longonmarket and open[1]<close[1] and high[1]-close[1]>15 and open[1]-low[1]>10 and open<close and Myrsi>80 and coeff>45 and Weekpivot>pivot and positionprice<=close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=374
ppf=0
ENDIF
if longonmarket and Weekpivot>pivot and hh-ll<50 and open[1]<close[1] and high[1]-close[1]>6 and open[1]-low[1]>2 and Myrsi<50 and Myrsi[1]>Myrsi and coeff<15 and positionprice<=close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=375
ppf=0
ENDIF
if longonmarket and Weekpivot>pivot and hh-ll>50 and open[1]<close[1] and high[1]-close[1]<1 and open[1]-low[1]>10 and open>close and Myrsi<75 and coeff[1]<coeff and coeff>35 and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=376
ppf=0
ENDIF
if longonmarket and Dhigh(0)-hh>50 and high=hh and Weekpivot>pivot and hh-ll>30 and open[1]<close[1] and high[1]-close[1]>2 and open>close and close crosses under MMB and close crosses under MMA and MMA[1]-MMB[1]>MMA-MMB and coeff>35 and Myrsi<25 and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=377
ppf=0
ENDIF
if longonmarket and close>pivot and low-MMA<3 and dhigh(0)-hh<20 and pivot>weekpivot and open[1]<close[1] and open>close and hh[1]<hh and hh=HIgh and high-open>4 and Myrsi[1]>Myrsi and Myrsi <50 and hh=high and pp>ppF-pp and positionprice<close then
sell at market
FIN=378
endif
if longonmarket and hh[1]-ll[1]>hh-ll and weekpivot>pivot and close<pivot and open>close and myrsi[1]>90 and Myrsi[1]>Myrsi and coeff>20 and coeff[1]<coeff and hh[1]>=high [1] and close crosses under MMA and pp<ppF and positionprice<close then
sell at market
FIN=379
endif
if longonmarket and barindex-tradeindex<20 and hh-ll<40 and close crosses under MMA and close crosses under MMb and MYrsi<10 and coeff>45 and pivot>weekpivot and close>Pivot and pp<ppF and positionprice>close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=377
ppf=0
ENDIF
if longonmarket and cd and hh-ll>80 and barindex-tradeindex<5 and open[1]<close[1] and open>close and weekpivot>pivot and close>pivot and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=378
ppf=0
ENDIF
if longonmarket and high[1]>high and low[1]<low and barindex-tradeindex<10 and dhigh(0)-hh<20 and open[1]<close[1] and high[1]-close[1]>5 and open>close and coeff>15 and Myrsi[1]>90 and Myrsi<70 and HH-LL>80 and weekpivot>pivot and close>pivot and pp>ppF-pp and positionprice<close then
Sellshort PositionSize contract at market
SET STOP %LOSS stpposinver
FIN=378
ppf=0
ENDIF
////============================FIN SHORT==========================
//=========================================
IF shortonmarket and pp<-1.6 then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=3
ENDIF
if shortonmarket AND ppF>1.9 and pp>ppF-pp then
exitshort at market
FIN=36
endif
if shortonmarket and barindex-tradeindex<5 and pp<ppF and posinver then
exitshort at market
FIN=37
endif
if shortonmarket and barindex-tradeindex>10 and open[1]>close[1] and close[1]-low[1]>7 and open>close and close-low>13 and positionprice>close then
exitshort at market
FIN=38
endif
if shortonmarket and positionperf(1)<0 AND high>close[1] and abs(open-close)<1 and open-low>9 and positionprice>close then
exitshort at market
FIN=39
endif
if shortonmarket and barindex-tradeindex>70 and open<close and pp>ppF-pp and pp>0.3 and abs(open-close)<1 and positionprice>close then
exitshort at market
FIN=40
endif
if shortonmarket and open[1]>close[1] and close[1]-low[1]>5 and open>close and close-low>8 and coeff<5 and coeff[1]>coeff and positionprice>close then
exitshort at market
FIN=41
endif
if shortonmarket and high[1]>high and low[1]<low and open<close and coeff<3 and open-low>2 and high-close>2 and abs(open-close)>0.2 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=42
endif
if shortonmarket and barindex-tradeindex<15 and open[2]<close[2] and open[2]=low[2] and high[2]-close[2]>3 and open[1]>close[1] and close[1]-low[1]>2 and open>close and positionprice>close then
exitshort at market
FIN=43
endif
if shortonmarket and MMA[2]-MMA[1]>MMA[1]-MMA and hh-low>low-ll AND open<close and close-low>10 and high-close<1 and coeff<20 and CD and coeff[1]>25 and barindex-tradeindex<10 and open[3]<close[3]and open[2]>close[2] and open[1]<close[1] and open[1]-low[1]<2 and low[2]>low[1] and high[2]>high[1] and coeff[1]>coeff and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=44
endif
if shortonmarket and hh-close>close-ll and hh[1]=hh and low[1]-ll<low-ll and barindex-tradeindex<20 and open[2]>close[2]and low[2]>low[1] and open[1]<close[1] and high[2]>high[1] and coeff[2]=coeff[1] and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=45
endif
if shortonmarket and low>MMA and MMA[1]<MMA and barindex-tradeindex<=6 and coeff[2]<2 and open[1]>close[1] and open>close and coeff-coeff[1]<4 and pp>ppF-pp and positionprice>close then
buy PositionSize contract at market
SET STOP %LOSS stpposinver
ppf=0
AC=4
ENDIF
if shortonmarket and barindex-tradeindex<7 and open>close and open=high and close=low and coeff>90 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=46
endif
if shortonmarket and coeff[1]>coeff and low[1]>low and close[1]<high and open[1]>close[1] and close[1]-low[1]>5 and coeff[1]>50 and open>close and close-low>4 AND high-open>4 and coeff<7 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=47
endif
if shortonmarket and hh-close>close-ll and hh-ll<30 and barindex-tradeindex>70 and coeff[1]<2 and coeff<1 and coeff[1]>coeff and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=48
endif
if shortonmarket and ll[2]>ll[1] and coeff[1]=100 and open[1]>close[1] and close[1]-low[1]>10 and open<close and coeff<10 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=49
endif
if shortonmarket AND coeff[1]<1 and open[1]>close[1] and high[1]-open[1]>5 and open>close and close-low>10 and hh[1]=hh and ll[1]>ll and hh-close>close-ll and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=50
endif
if shortonmarket and low[1]>low AND COEFF[2] >20 and open[2]>close[2] and close[2]-low[2]>3 and open[1]=close[1] and close[1]-low[1]>4 and open>close and coeff<5 and close-low>2 and coeff[1]=0 and pp>ppF-pp and positionprice>close then
buy PositionSize *posmax *2 contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=5
ENDIF
if shortonmarket AND open[1]>close[1] and close[1]-low[1]>2 and coeff[1]<10 and open<close and open-low>3 and coeff<3 and high-close> 5 and hh[1]>hh and hh-close>close-ll and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=51
endif
if shortonmarket AND open[1]>close[1] and coeff[1]<2 and open>close and close-low>8 and high=open and pp>ppF-pp and positionprice>close then
buy PositionSize *posmax *2 contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=6
ENDIF
if shortonmarket and barindex-tradeindex<5 and coeff[2]>55 and coeff[2]>coeff and hh-close>close-ll and hh-ll<100 AND open[1]>close[1] and close[1]-low[1]>3 and coeff[1]>50 and open<close and close-open<10 and open-low>5 and coeff<20 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=52
endif
if shortonmarket and barindex-tradeindex<8 AND OPEN[2]<close[2] and open[2]-low[2]<1 and high[2]-close[2]>10 and open[1]>close[1] and close[1]-low[1]>1 and open>close and close-low>5 and coeff[1]>coeff and coeff<8 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=53
endif
if shortonmarket and barindex-tradeindex<5 AND OPEN[2]<close[2] and coeff[2]<3 and open[1]<close[1] and open[1]-low[1]>3 and open[1]>MMA[1] and open>close and positionprice>close then
exitshort at market
FIN=54
endif
if shortonmarket and hh-close>close-ll and barindex-tradeindex<10 and MMA[1]-high[1]>mma-high and hh[1]=hh and ll[1]=ll and abs(open[2]-close[2])<1 and coeff[2]<2 and open[1]>close[1] and open<close and high[1]<high and low[1]<low and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=55
endif
if shortonmarket and abs(open[2]-close[2])<1 and coeff[2]<1 and open[1]>close[1] and close[1]-low[1]>2 and open<close and coeff>35 and close crosses over MMA and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=7
ENDIF
if shortonmarket and hh-ll<50 and hh[1]=hh and ll[1]=ll and MMA[1]<MMA and COEFF[2]<10 and coeff[1]<25 and coeff=100 and open<close and close crosses over MMA and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=8
ENDIF
if shortonmarket and barindex-tradeindex<10 and open[3]>close[3] and close[3]-low[3]>5 and open[2]<close[2] and open[2]-low[2]>3 and open[1]>close[1] and open<close and low[3]<low[2] and low[2]<low[1] and low[1]<low and high[1]<high and MMA[1]-high[1]>MMA-high and pp<ppF and positionprice>close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=9
ENDIF
//
if shortonmarket and CD and open[2]<close[2] AND open[2]-low[2]<1 and high[2]-close[2]>6 and open[1]>close[1] and close[1]-low[1]>6 and open<close and high[1]>high and low[1]<low and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=10
ENDIF
if shortonmarket and barindex-tradeindex<10 and MMA[1]-high[1]>MMA-High and hh[1]>hh and ll[1]=ll and hh-close>close-ll and CD and open[2]>close[2] and open[1]<close[1] and open[1]-low[1]>10 and coeff[1]<3 and abs(open-close)<1 and low[1]<low and high[1]<high and coeff[1]>coeff and coeff<2 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=56
endif
if shortonmarket and barindex-tradeindex<10 and hh[1]>hh and abs(open[1]-close[1])<1 and open<close and MA crosses over MMA and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=11
ENDIF
if shortonmarket and barindex-tradeindex<10 and MA[1]>MMA[1] and open[1]>close[1] and close[1]-low[1]>4 and coeff[2]<coeff[1] and coeff[1]>coeff and open<close and open-low>6 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=57
endif
if shortonmarket and CD and open[2]<close[2] and open[1]<close[1] and open<close and close crosses over MA and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=12
ENDIF
if shortonmarket and CD and open[2]>close[2] and close[2]-low[2]>15 and coeff[2]<6 and coeff[1]<coeff and open[1]>close[1] and close[1]-low[1]>8 and open<close and close crosses over MA and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=13
ENDIF
if shortonmarket and barindex-tradeindex<30 and open[2]>close[2] and open[1]<close[1] and coeff<3 and hh[2]>hh[1] and hh[1]=hh and ll[1]=ll and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=58
endif
// OK A METTRE DE COTE
if shortonmarket AND COEFF>52 and HH[1]>HH AND LL[1]>=LL and(( open>close and close-low>10)or(open<close and open-low>10)) and positionprice>close then
exitshort at market
FIN=59
endif
if shortonmarket and filt=1 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=60
endif
if shortonmarket and coeff>80 and RSI[2](close)<2 and ll[1]>ll and open>close and close-low>10 and hh-ll<80 and MMB-MMA>5 and ll=low and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=60
endif
if shortonmarket and high[1]<high and low[1]<low and close=high and hh-ll<90 and barindex-tradeindex>15 and hh[1]>=hh and ll[1]<=ll and abs(open[1]-close[1])<2 and coeff[1]<5 AND COEFF>15 and open<close and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=61
endif
if shortonmarket and CD And hh[2]>hh[1] and ll[1]>ll and hh[1]=hh and open<close and open-low>8 and coeff>45 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=62
endif
if shortonmarket and coeff[1]>coeff and coeff<10 and MMB-MMA>5 and Myrsi crosses over Myrsi[1]and Myrsi[1]<Myrsi and hh-close>close-ll and hh-ll<40 and open<close and open-low>5 and high-close>4 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=62
endif
if shortonmarket and close<pivot and pivot-close>70 and MMB[1]-MMA[1]>MMB-MMA and hh[1]=hh and hh-ll>100 and dlow(0)=ll and time>090000 and close crosses over MMA and MYrsi>75 and coeff>25 and pp<-0.2 and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=15
ENDIF
if shortonmarket and barindex-tradeindex<3 and MYrsi[1]<Myrsi and Myrsi>60 and low[1]>=low and high[1]<high and hh-ll>100 and MMB[1]-MMA[1]>MMB-MMA and open[1]>close[1] and open<close and coeff[1]<coeff and coeff>40 and pp<-0.2 and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=16
ENDIF
if shortonmarket and barindex-tradeindex<3 and open[1]>close[1] and open[1]-low[1]>20 and ll[1]=low[1] and Low[1]<low and low[1]-ll[1]<low-ll and hh-ll>100 and high[1]>=high and open<close and coeff>15 and Myrsi[1]<Myrsi and Myrsi>30 and pp<0 and positionprice<close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=17
ENDIF
if shortonmarket and pivot>weekpivot and barindex-tradeindex<10 and open[1]>close[1] and close[1]-low[1]>20 and open<close and Myrsi[1]<Myrsi and Myrsi>40 and coeff>25 and pp<=0 and positionprice<=close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=1
ppf=0
AC=18
ENDIF
if shortonmarket and high>MMA AND MMB-MMA>10 and high[1]<high and pp<-0.1 and hh-close>close-ll and dhigh(0)-hh<20 and pivot>weekpivot and MYrsi>75 and barindex-tradeindex<5 and coeff[2]<10 and coeff[1]<15 and open<close and coeff>70 and hh[1]>hh and hh-ll>70 and positionprice<=close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=0
ppf=0
AC=19
ENDIF
if shortonmarket and close>pivot and hh-ll<30 and Myrsi[1]<Myrsi and Myrsi>75 and dlow(0)<low and coeff>90 and close crosses over MMA and close crosses over MMB and MMA-MMB<1 and hh[1]<hh and ll[1]=ll and pivot>weekpivot and positionprice<=close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=0
ppf=0
AC=20
ENDIF
if shortonmarket and hh-ll>100 and close crosses over MMA and pp<-0.1 and barindex-tradeindex<3 and weekpivot>pivot and close<pivot and coeff>65 and Myrsi>70 and positionprice<=close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=0
ppf=0
AC=20
ENDIF
if shortonmarket and coeff>70 and open[1]<close[1] and open<close and close crosses over MMA and close crosses over MMB and MMA>MMB and Myrsi>75 and Myrsi[1]<Myrsi and weekpivot>pivot and close<pivot and pp<-0.1 and positionprice<=close then
buy PositionSize *posmax contract at market
SET STOP %LOSS stpposinver
posinver=0
ppf=0
AC=21
ENDIF
if shortonmarket and open[1]>close[1] and coeff[1]>50 and hh[2]>hh[1] and ll[2]>ll[1] and open<close and open-low>10 and pp>0.2 and weekpivot>pivot and close<pivot and coeff<15 and pp>ppF-pp and positionprice>close then
exitshort at market
FIN=62
ENDIF
if ac and vt and fin then
endif
// ppb =-1.06
// ppv = -1.45
//graph pp
//GRAPH AC
//GRAPH VT
//GRAPH FIN
//graph weekpivot
//graph pivot
Fifi. I did not manage to find better results with the new MTF in 1 minute. Can you tell me if the code I joined with the money management is credible?
it does not change anything for the backtest. it’s in demo or real that it changes
Does above answer your question @francois528 ?
The add on MTF code will not – in itself – give better performance.
The add on MTF code is an attempt to have Rejected Orders presented again and so be passed through / accepted as a Trade.
We cannot test the add on MTF code in Backtest as Orders do NOT get Rejected in Backtest.
Hope my elaboration helps in understanding?
Can you tell me if the code I joined with the money management is credible?
I cannot answer the above question, sorry.
Ne répond à votre question ci – dessus @ francois528 ? NO
here is francois528
it is to modify
remove the line 44
Hello everyone, a big thank you for your research work, I have been with you since the beginning and it’s exciting. I had a question @fifi743 what do you mean by “remove line 44”? should we write it like the last code you posted called “francois528”. thank you in advance . best regards
What is the right version please , or maybe it would be easier if you can post the last version ? I will be grateful because I am a little lost ^^
//// TAILLE DES POSITIONS
PositionSize = 1 * positionsize
//ONCE PositionSize = 1
//ONCE PositionSize = 1
or
// TAILLE DES POSITIONS
PositionSize = 1 * positionsize
ONCE PositionSize = 1
ONCE PositionSize = 1
Hello,
francois528 has published a version that has nothing to do with the version I published.I do not recommend touching the leverage.
we have to wait until PRT version 11 is available to test the version I published.
Hello,
here is an example to control that the positions passes
Thank you very much again Fifi743. I added the MTF to v6 and it gives me an error as you can see in the image. Fifi743, can you help me please? or someone to help me? Thank you
Discussing the strategy VECTORIAL DAX (M5)
This topic contains 1,263 replies,
has 125 voices, and was last updated by VinzentVega
11 months, 2 weeks ago.
| Forum: | ProOrder support |
| Language: | English |
| Started: | 02/24/2019 |
| Status: | Active |
| Attachments: | 470 files |
The information collected on this form is stored in a computer file by ProRealCode to create and access your ProRealCode profile. This data is kept in a secure database for the duration of the member's membership. They will be kept as long as you use our services and will be automatically deleted after 3 years of inactivity. Your personal data is used to create your private profile on ProRealCode. This data is maintained by SAS ProRealCode, 407 rue Freycinet, 59151 Arleux, France. If you subscribe to our newsletters, your email address is provided to our service provider "MailChimp" located in the United States, with whom we have signed a confidentiality agreement. This company is also compliant with the EU/Swiss Privacy Shield, and the GDPR. For any request for correction or deletion concerning your data, you can directly contact the ProRealCode team by email at privacy@prorealcode.com If you would like to lodge a complaint regarding the use of your personal data, you can contact your data protection supervisory authority.