Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 05-19-2006, 02:04 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 963
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, 464 views)
Attached Files
File Type: mq4 VolExExpert_v1.mq4 (17.3 KB, 250 views)
File Type: rar volexeur_m5.rar (671 Bytes, 179 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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #12 (permalink)  
Old 05-19-2006, 03:08 PM
Senior Member
 
Join Date: May 2006
Posts: 128
gbolla is on a distinguished road
THANKS IGORAD!!!!!

Bye


Bolla
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #13 (permalink)  
Old 05-30-2006, 01:18 PM
Senior Member
 
Join Date: May 2006
Posts: 128
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #14 (permalink)  
Old 05-30-2006, 03:21 PM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 348
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #15 (permalink)  
Old 05-30-2006, 03:42 PM
Senior Member
 
Join Date: May 2006
Posts: 128
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #16 (permalink)  
Old 05-30-2006, 04:18 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 963
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 04:22 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #17 (permalink)  
Old 05-30-2006, 05:21 PM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 348
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #18 (permalink)  
Old 05-31-2006, 09:46 AM
Senior Member
 
Join Date: May 2006
Posts: 128
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #19 (permalink)  
Old 05-31-2006, 09:51 AM
Senior Member
 
Join Date: May 2006
Posts: 128
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #20 (permalink)  
Old 05-31-2006, 03:29 PM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 963
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
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 10:59 AM
EasyLanguage to Mql3 harrywd Metatrader 3 2 12-01-2005 03:58 PM


All times are GMT. The time now is 12:13 AM.



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