Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 3


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 05-19-2006, 01:04 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 800
igorad is on a distinguished road
Hi,
I've finished translate EL code to MT4.
Try to test and optimize this EA.

Igor
Attached Images
File Type: gif VolexEUR.gif (5.6 KB, 290 views)
Attached Files
File Type: mq4 VolExExpert_v1.mq4 (17.3 KB, 172 views)
File Type: rar volexeur_m5.rar (671 Bytes, 131 views)
__________________
Let's improve trade skills together
http://finance.groups.yahoo.com/group/TrendLaboratory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 05-19-2006, 02:08 PM
Senior Member
 
Join Date: May 2006
Posts: 123
gbolla is on a distinguished road
THANKS IGORAD!!!!!

Bye


Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 05-30-2006, 12:18 PM
Senior Member
 
Join Date: May 2006
Posts: 123
gbolla is on a distinguished road
Hi Igorad how are you?
I nedd your help again.
You translate this part of Easy Language...

if (PositionProfit(1)<0 and PositionProfit(2)<0) then
contr_plus=1;
else contr_plus=0;

...with....

PastTradeProfit();

if ((pastpips[1]+pastpips[2]) < 0 && (pastpips[3]+pastpips[4]) < 0)
{
contr_plus = 1;
}
else
{
contr_plus = 0;
}

...and....

void PastTradeProfit()
{
int total=HistoryTotal(), n=0;
ArrayResize(pastpips,total);
for (int cnt=total-1;cnt>=0;cnt--)
{
if ( OrderSymbol()==Symbol())
{
if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY) && OrderType() > OP_SELL ) continue;

if (OrderType()==OP_BUY)
{n = n+1;
pastpips[n] = MathRound((OrderClosePrice()-OrderOpenPrice())/MarketInfo(Symbol(),MODE_POINT));}

if (OrderType()==OP_SELL)
{n = n+1;
pastpips[n] = MathRound((OrderOpenPrice()-OrderClosePrice())/MarketInfo(Symbol(),MODE_POINT));}
}
}
}
.... in MT4.

But PositionProfit(1) means the yesterday profit and PositionProfit(2) the before yesterday profit. Instead with your MT4 code, there is contr_plus=1 when I have 2 consecutive negative profit trades and not when I have 2 consecutive negative profit days.
Can you change the MT4 code for this purpose?
Thanks

Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 05-30-2006, 02:21 PM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Hi Bolla, I'm not a programmer so I don't thing that I can help you. But I have a question since you a tradestation user. How accurate is backtest in tradestation? we're all know that MT4's backtest is somehow terrible, how about tradestation?

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 05-30-2006, 02:42 PM
Senior Member
 
Join Date: May 2006
Posts: 123
gbolla is on a distinguished road
Hi Devil, I like TS because is user friendly, EasyLanguage is very "easy" and the back testing is affidable more than MT4. It's possible to make a perfect debug with the Commentary Expert, a function built in TS.
My project is to create a profitable trading system in TS, backtest in TS, translate in MT4, backtest in MT4 (if it's possible) and forward test in MT4 on demo account: if all this step will be positive, I'll try to trade on live account.
My big problem is the MT4 enviroment: I have difficult to translate in mql4 language (I need help...... ), and backtest the EA on MT4.
Bye.

Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 05-30-2006, 03:18 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 800
igorad is on a distinguished road
Hi,
PositionProfit(num) is not profit for past days, it's profit for a previous position.
In your strategy 1 Position = 2 contracts (or 2 lots in MT4), which open simultaneously. So Position(1) = pastpips[1]+pastpips[2] and Position(2) = pastpips[3]+pastpips[4].

Concerning backtesting: in MT4 with 1M data we receive very good coincidence
with real trade.

Igor
__________________
Let's improve trade skills together
http://finance.groups.yahoo.com/group/TrendLaboratory

Last edited by igorad; 05-30-2006 at 03:22 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 05-30-2006, 04:21 PM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Quote:
Originally Posted by gbolla
Hi Devil, I like TS because is user friendly, EasyLanguage is very "easy" and the back testing is affidable more than MT4. It's possible to make a perfect debug with the Commentary Expert, a function built in TS.
My project is to create a profitable trading system in TS, backtest in TS, translate in MT4, backtest in MT4 (if it's possible) and forward test in MT4 on demo account: if all this step will be positive, I'll try to trade on live account.
My big problem is the MT4 enviroment: I have difficult to translate in mql4 language (I need help...... ), and backtest the EA on MT4.
Bye.

Bolla
Hi Bolla, thanks for your respond
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 05-31-2006, 08:46 AM
Senior Member
 
Join Date: May 2006
Posts: 123
gbolla is on a distinguished road
Hi Igorad, whta's mean with:"Concerning backtesting: in MT4 with 1M data we receive very good coincidence with real trade." ?
Do you use EA on M1 time frame for backtest? Or you use tick analisys with 1M data time frame but the EA is tested on M30 TF?

Thanks.

Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 05-31-2006, 08:51 AM
Senior Member
 
Join Date: May 2006
Posts: 123
gbolla is on a distinguished road
Sorry Igorad, I have another question for you.
I would like to stop trade when there are X consecutive negative trades, enter in emulated mode and restart live trade when there are Y consecutive positive trades. I think it's a good idea!
Do you could program this function on our EA?

Thanks a lot.

Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 05-31-2006, 02:29 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 800
igorad is on a distinguished road
Quote:
Originally Posted by gbolla
Hi Igorad, whta's mean with:"Concerning backtesting: in MT4 with 1M data we receive very good coincidence with real trade." ?
Do you use EA on M1 time frame for backtest? Or you use tick analisys with 1M data time frame but the EA is tested on M30 TF?

Thanks.

Bolla
You can test it : trade couple of days and then make the same on a tester with every tick analysis.

Concerning 2nd question: Good idea, but not simple in realization.

Igor
__________________
Let's improve trade skills together
http://finance.groups.yahoo.com/group/TrendLaboratory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please translate my idea Indonesian to english version harryhid Expert Advisors - Metatrader 4 4 10-18-2006 09:59 AM
EasyLanguage to Mql3 harrywd Metatrader 3 2 12-01-2005 02:58 PM


All times are GMT. The time now is 12:07 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.