Lesson 13 - Your First Expert Advisor (Part 1) - page 2

 

newbie

Hello everyone, I was just introduced to MT4 this past week and I am so excited to find this series of lessons. I intend to spend the next couple of weeks poring over these lesson plans you have so graciously put together. Thank you so much.

 

Change short and Long EA

Audio:
ok guru but if we reverse the contain of it may be good?

Hi All,

I'm using 8 & 21 EMA. By making the 21 the shortEma and 8 the longEma it works over 70% on the four hour chart.

shortEma = iMA(NULL,0,21,0,MODE_EMA,PRICE_CLOSE,0);

longEma = iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,0);

Best Wishes,

Tom

 

Tom,

have you checked average win and loss in term of $?

Thanks,

moneyquest

 

I was reading some trading strategy and they are using 8, 21 and 55 EMA: enter on 8 and 55 EMA crossing and exit on crossing 8 and 21 EMA. They call it Fibo-EMA trading strategy (because of Fibonacci numbers 8, 21 and 55).

 

Newbie lost!

Hey all,

Has anyone had a problem with their EA looking really good on the graph, but then leveling off around the begining of 2005 and either only going up slowly after that or going down slowly? I seem to have seem this same thing happening on different pairs and with different EAs but almost everytime I see it, it's always right there around Jan 2005! Is the data less complete when going back further than this year and has errors that make it look like it would have done better than it really would have?

Also, I downloaded data from Forexite on the H1 and imported it to my Metatrader 4 and it shows up on the charts, but when I try to test it with any EA it doesn't use the two previous year's data (2001-2002)! Am I doing something wrong? PLease let me know if anyone knows. I have one minute data going back to Jan 3 2001, do I need to import all of that to get it work? Does anyone have any suggestions?

 
Willis11of12:
...Also, I downloaded data from Forexite on the H1 and imported it to my Metatrader 4 and it shows up on the charts, but when I try to test it with any EA it doesn't use the two previous year's data (2001-2002)! Am I doing something wrong? PLease let me know if anyone knows. I have one minute data going back to Jan 3 2001, do I need to import all of that to get it work? Does anyone have any suggestions?

To get the most realistic historical strategy testing, use the one minute data. (I've heard this matches real-time testing to 90% accuracy. If you use only time period longers than a minute, the % accuracy lowers.) Then use the Metatrader script Period_converter to convert the one-minute data into the history for the larger time frames M5, M15, M30, H1, H4, Daily, etc. This is just an overview of the procedure...I've only done this once, and the step-by-step instruction are on another forum, if you care to web search.

As far as losing profitability in your strategy testers starting January, 2005, this could be because

1) the historical data was not all using the same time-frame as you suggest or

2) your currency pair market had a significant change such as changing between a ranging market, a trending market, or a volatile market. Most strategies work best in one type of market.

I am still a novice at Forex and Metatrader, so my remarks come from limited study and experience.

 

Thanks Mcintyd1! I hadn't thought about using the period converter. Is doing so a simple process or do you have to know what you are doing to use it? Also, the one minute data I have is in individual days and has all the pairs in the same file, so I have to copy and paste each pair out of each day and put it into a seperate file before I can get it to work properly with Metatrader 4. Does anyone have such files that are ready to be put into Metatrader 4? Thanks in advance! =)

 

ea

codersguru:
Audio, What do you mean? Do you mean increasing the number of history bars? Or changing the broker?

Yes the histo bar.thanks A

 

Databank

Willis11of12:
Does anyone have such files that are ready to be put into Metatrader 4? Thanks in advance! =)

Hi Willis

Follow this link

http://www.alpari-idc.com/en/dc/databank.php

Please note that you might have to have patiences and be willing to fool around abit to get the imports to work - I was having problems - but now the imports work perfectly for me.

 

Hi codes guru,

I having problem with the compiling.It keep having unbalanced pareantheses.

I check through quite a few times and cross checking with yours.Do you mind help me check?Thanks alot

Files:
Reason: