Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course
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
  #1 (permalink)  
Old 05-12-2006, 10:17 AM
Senior Member
 
Join Date: May 2006
Posts: 128
gbolla is on a distinguished road
For Codersguru!

Hi Codersguru can you help me to translate this EA from Easylanguage to mql4?
Thanks

Bolla

{*****************************************
Description : VOLEX (Volatility Expansion)
******************************************}

Inputs:
MultClosesLong(10),
MultClosesShort(8),
MoltL(2.2),
MoltS(3.6),
FilterLong(0),
FilterShort(4),
StopLoss(330),
StopTarget(120),
StopFactor(60),
ProfitTarget(560),
GainPlusLong(5),
GainPlusShort(4),
StartTime(1200),
EndTime(1630),
breakTime(1400);

Variables:
CounterLong(0),
CounterShort(0),
trade(1),
sll(0),
sls(999999),
sl(StopLoss),
contr_plus(0);


if (PositionProfit(1)<0 and PositionProfit(2)<0) then
begin
contr_plus=1;
sl=sl-contr_plus*10;
end
else contr_plus=0;

SetStopLoss(sl);

if marketposition=0 and time>=StartTime and time<=EndTime and time<>breakTime then begin
Buy ("Long") (2+contr_plus) contracts Next Bar at Close + Average(Range,4)*MoltL + FilterLong points on Stop;
Sell ("Short") (2+contr_plus) contracts Next Bar at Close - Average(Range,4)*MoltS - FilterShort points on Stop;
trade=1;
sll=0;
sls=999999;
sl=StopLoss;
CounterShort = 0;
CounterLong = 0;
end;



If MarketPosition = -1 Then Begin
ExitShort ("Stop_S") Next Bar at sls on Stop;
If Close < EntryPrice - (Commission+Slippage) / BigPointValue Then CounterShort = CounterShort + 1;
If CounterShort = MultClosesShort Then ExitShort ("Prft_S") Next Bar at Market;
End;



If MarketPosition = 1 Then Begin
ExitLong ("Stop_L") Next Bar at sll on Stop;
If Close > EntryPrice + (Commission+Slippage) / BigPointValue Then CounterLong = CounterLong + 1;
If CounterLong = MultClosesLong Then ExitLong ("Prft_L") Next Bar at Market;
End;


if OpenPositionProfit>=ProfitTarget and trade=1 then begin
ExitLong ("1_G_L") (1+contr_plus) contracts Next Bar at Market;
ExitShort ("1_G_S") (1+contr_plus) contracts Next Bar at Market;
trade=trade+1;
sll=EntryPrice + (Commission+Slippage) / BigPointValue + GainPlusLong points;
sls=EntryPrice - (Commission+Slippage) / BigPointValue - GainPlusShort points;
end;

if OpenPositionProfit<=-StopTarget and trade=1 then begin
ExitLong ("1_L_L") (1+contr_plus) contracts Next Bar at Market;
ExitShort ("1_L_S") (1+contr_plus) contracts Next Bar at Market;
trade=trade+1;
sl=sl-StopFactor;
end;

if time=2130 then begin
ExitLong ("EoDL") Next Bar at Market;
ExitShort ("EoDS") Next Bar at Market;
end;
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

Tags
codersguru


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
I Love Codersguru Sadly Metatrader 4 mql 4 - Development course 27 05-30-2009 08:00 PM
A question to Codersguru and other coders alp General Discussion 3 10-25-2006 08:24 PM
Contest - Codersguru forexts General Discussion 10 06-02-2006 08:14 AM


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



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