Apologies … I see what you mean @Gubben
Yes you are right we need to add TIMEFRAME (5 minutes ,updateonclose) .
I must have copied the MTF Pass code from the Vectorial-DAX-v2-WFE-MTF.itf … as shown below.
Fifi has added some other lines of code in the file he posted as MTF.itf and it is these extra lines (e.g. VTM=1) that are giving the problems.
TIMEFRAME(1 minute)
UT=100
// ==================controle si operation prise
if countPosBUY=COUNTOFLONGSHARES and CurrentDayOfWeek <6 and CountTime +UT <time and CountTime +(UT*3)>time and open<close then
BUY NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
//================
if countPosSELL=COUNTOFSHORTSHARES and CurrentDayOfWeek <6 and CountTime+UT <time and CountTime +(UT*3)>time and open>close then
SELLSHORT NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
Gubben
look how is this file written
So this is the code that should be added in the end of any strategy, and then TF set to 1M? (with the 5 minute MTF added in the beginning)
//============================controle des positions
countPOsBUY=10
countPosSELL=10
CountTime=250000
NBPos=0
//100 et 20
//POSITION LONGUE
TIMEFRAME(1 minute)
UT=100
// ==================controle si operation prise
if countPosBUY=COUNTOFLONGSHARES and CurrentDayOfWeek <6 and CountTime +UT <time and CountTime +(UT*3)>time and open<close then
BUY NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
//================
if countPosSELL=COUNTOFSHORTSHARES and CurrentDayOfWeek <6 and CountTime+UT <time and CountTime +(UT*3)>time and open>close then
SELLSHORT NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
TIMEFRAME(1 minute)
UT=100
// ==================controle si operation prise
if countPosBUY=COUNTOFLONGSHARES and CurrentDayOfWeek <6 and CountTime +UT <time and CountTime +(UT*3)>time and open<close then
BUY NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
//================
if countPosSELL=COUNTOFSHORTSHARES and CurrentDayOfWeek <6 and CountTime+UT <time and CountTime +(UT*3)>time and open>close then
SELLSHORT NbPos CONTRACT AT MARKET
SET STOP %LOSS 2
endif
Or should these be modified?
countPOsBUY=10 countPosSELL=10 CountTime=250000 NBPos=0
Now the strategy runs at least, but I am not sure if this is correct? 🙂
Surely below is part of the Auto-System code and not part of the MTF Pass code??
countPOsBUY=10
countPosSELL=10
CountTime=250000
NBPos=0
PRT complained about them not being defined until I added that…? I haven’t really studied this code deeply but was hoping that I would only need to copy paste and have it work 🙂
Gubben
share the file that I control
Thanks for the support. It was one of the V6 versions (not sure what the difference is between v6-1 and v6-2). Since I guess I have not understood or implemented the code correctly I just reupload the file without any changes to point out which one I am trying to add the MTF control too.
What I don’t understand is what to do to not have a syntax error on countposbuy, counttime, nbpos, and countpossell
here is
it is to modify
timeframe 1M
I have not tested it
Great! It still complained about VTM but I put // on that line and it works. That should be OK I guess? 🙂
Thanks for the help
fifi743 – I’m not sure what sort of translation tool you are using for your replies (perhaps the built in one?) but they can sometimes be very poor translations. Perhaps you are using ‘lazy French’ or ‘mobile phone French’ which most translation tools struggle with. English is my mother tongue but often your replies are impossible to understand. Perhaps a few more words, capital letters, apostrophes, commas and hyphens would help the translation tool!
here is
it is to modify
timeframe 1M
I have not tested it
This is what I was referring to, but now it gives error in vtm.
Thanks FIFI
hi guys, may i ask the purpose of the MTF addon and in which way that code shoul improve any code?