[TUTORIAL] Complete Backtesting and Analysis Setup (100% Free)

hi clarkfx, just came across here and try to find some thought about backtesting as i just bought new ea. your tread here really help me a lot to understand this as i am lack of some knowledge about this, [U]thank YOU![/U]

by following your instruction, i did download the tickdata through downloader and trying to move on, however i have 2 questions here:

  1. in the downloader, i found there is configure function can help you download the data in all time frames. this, apparently, save me huge time to convert them back and forth, and even worse thing is the converter is not really function enough some time, the converted data were cut into pieces.

  2. once i put everything organized into the mt4 and started to process the test, the speed is really really really slow under “every tick…” mode and very annoying to wait. do you have some idea if it is normal or there are some other setting i may need touch it?

thanks again for your time and contribution,

i added isFloat function to D2MT4.py python script because i have got error while running that script



def isFloat(value):
	try:
		float(value)
		return True
	except ValueError:
		return False

path = input("Filename: ")
x = 1

file = open(path+".csv", 'r')
outfile = open(path+"_1m.csv", 'w')

linenum = 1
prevDT = ""

for aline in file:

        value = aline.split(',')
        datetime = value[0]
        currentDT = datetime[0:16]

        if linenum == 1:
            openP = value[x]
            highP = openP
            lowP = openP
            closeP = openP
            volume = 1
            prevDT = currentDT

        else:
            if currentDT == prevDT:
                volume += 1

                if isFloat((value[x])):
                        closeP = float(value[x])
                        if float(value[x]) > float(highP):
                            highP = value[x]
                        if float(value[x]) < float(lowP):
                            lowP = value[x]

            elif currentDT != prevDT:
                outfile.write(str(prevDT)+","+str(openP)+","+str(highP)+","+str(lowP)+","+str(closeP)+","+str(volume)+"
")
                openP = value[x]
                highP = openP
                lowP = openP
                closeP = openP
                volume = 1
                prevDT = currentDT

        linenum += 1

file.close()
outfile.close()

Can anyone answer this question - I had an EA developed by a programmer at MT4 site - the programmer placed a copyright behind the EA I asked to be made - is this normal - thanks in advance for your answers

don’t buy any forex robot without real forward test and has been made withdraw

Hi,

I write my own EAs so I don’t know if this is ‘normal’ practice, but here are my thoughts …

They may have been able to put copyright on the actual coding, as that is their work, but whether that applies to the [B]idea[/B] behind the coding I’m not so sure. Don’t think you can copyright an idea, but I’m not an expert by any means.
If that’s true then it would only protect the actual code the programmer has written, so you couldn’t sell it for example - and as a program can be written in many, many different ways to do the same thing, it wouldn’t stop it being written in an alternative way by you, and you’d be free to do what you want with it.

As I say, I’m not an expert on copyright so you’d need further input.

HTH a little bit :slight_smile:

Typically, upon completion the developer should give you full rights. It’s fishy they’d do something like that. I’d talk to them about it.

Hi ClarkFX, thanks for all the help and info.
I have downloaded MT4 however the file path indicated -[U][B][I] 2) Place the “Period_Converter_Opt.mq4” and “Period_Converter_Opt.ex4” files in the indicators folder of your MetaTrader 4 you just downloaded. Ex) “C:\Program Files (x86)\MetaTrader 4\experts\indicators”[/I][/B][/U] - is not present in MT4 anymore. Is there another way I can get these files to where they need to be - please help. Thanks in advance.

Hi guys, i wanted to do this so i can back test EA’s accurately but hit a roadblock. When i go to convert my downloaded tick data into .CSV via D2MT4 app that is placed in the tickfolder as per instructions. it comes up with an error message that is displayed at the speed of light. so in 2015 can this method still me used? Clark bro if your still about i could do with a little saving.

'best

darth

Use tickstorylite bro. Saves a whole lot of ducking around when it comes to data conversion.

Cheers bro. you saved me. :wink:

'best

darth

First of all congratulation of your work!! I would like to report that the indicator Period_Converter_Opt doesn’t work for me. When drag and drop into any chart error appear in the Journal tab like “Expert ‘Period_Converter_Opt’ is not custom indicator and will be removed”. I really need to work MT4 back-testing with your method.
So thanks Again!

Hi Clark,

When drag and drop into any chart error appear in the Journal tab like “Expert ‘Period_Converter_Opt’ is not custom indicator and will be removed”.
What to do?

regards,

Louis Witte

Clark…I know this is an old thread…but I’ve gotta say…Outstanding Job!!! Extremely Helpful.

I’ve followed all the steps…I have all my time frames in MT4. I attempted a sample backtest and the test is terminated after the first close order. Here is a copy of the journal. I attempted this with other time frames and different EA’s…all with the same results. Any adivice???

Update: I thought perhaps it was attempting to calculate the conversion price so I also loaded AUDUSD and USDCAD. I was able to complete a successful test with both…but when I attempt to test it on a Cross Pair (AUDCAD)…it gives these errors. Thoughts?

Hi! @ClarkFX t seems that the py script can’t be downloaded from the links I see here. It says server IP Address cannot be found. Any other link to this?

The Py script is in the zip file in the 3rd post. Download the file and unzip and there you go.

Hi, thanks a lot for your post Clark. Unfortunately I have problem downloading MT4 without broker license. In metaquotes.net and metatrader4.com there is only mt5 for download. So can you provide another download link for that?

Not sure you noticed, but Clark’s post was from 2014! You can click on the letter C next to his name, and then click on the letter C again to see Clark’s profile, and there, you’ll see that he hasn’t been on the site since November 2018.

You can get MT4 from several places. One being from your broker if they support it. Or, the MT4 website itself, as you’ve tried. I think you just need to look a bit further down the page.

Second orange button.

His last post in this thread is from Dec’ 14, so I think he is still around.
I have tried that second button, believe it or not, it is mt5 also.
So my question is: using broker license free mt4 is mandatory for this method of backtesting?

That’s December, 2014. Not the 14th of December, 2019.

:joy::sweat_smile:
Ok. what about other questions?