Forex
Google

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register FAQ Members List Calendar Today's Posts


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

View Poll Results: you will use a martingale in live account?
yes 43 71.67%
no 17 28.33%
Voters: 60. You may not vote on this poll

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2007, 12:12 AM
pelele79's Avatar
pelele79 pelele79 is offline
Senior Member
 
Join Date: Mar 2006
Location: Venezuela
Posts: 316
pelele79 is on a distinguished road
Martingale Optimization

Hello in attach file you can view a martingale expert, my only suggestion is if anyone can change the code to take operation in this way;

.- if the first position is buy the second will be sell and thir buy and fourth sell etc etc (all depend of the max trades variable)

.- if the first position is sell the second will be buy and third sell and fourth buy etc etc. (all depend of the max trades variable)

Thanks in advance


Pedro Echenagucia
Attached Files
File Type: mq4 martingale.mq4 (4.9 KB, 128 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-04-2007, 02:48 AM
pelele79's Avatar
pelele79 pelele79 is offline
Senior Member
 
Join Date: Mar 2006
Location: Venezuela
Posts: 316
pelele79 is on a distinguished road
hello anyone can help with this optimization? thanks in advance

Pedro Echenagucia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-04-2007, 03:17 AM
wibitiens's Avatar
wibitiens wibitiens is offline
Senior Member
 
Join Date: Dec 2006
Posts: 260
wibitiens is on a distinguished road
Quote:
Originally Posted by pelele79
Hello in attach file you can view a martingale expert, my only suggestion is if anyone can change the code to take operation in this way;

.- if the first position is buy the second will be sell and thir buy and fourth sell etc etc (all depend of the max trades variable)

.- if the first position is sell the second will be buy and third sell and fourth buy etc etc. (all depend of the max trades variable)

Thanks in advance


Pedro Echenagucia
Hi Pedro,
I don't really understand about your strategy. If the first is buy, second is sell, then third is buy, then ... once the TP is reach, how is the calculation the overall P/L?
For instance: pip=20 tp=25 no progression (always 0.1lot):
BUY-SELL-BUY = +5
BUY-SELL-BUY-SELL = -30
BUY-SELL-BUY-SELL-BUY = -25
BUY-SELL-BUY-SELL-BUY-SELL = -80

Thus, the end result is always minus
Could you explain it in more detail please? Thanks.

Cheers,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-04-2007, 04:01 AM
pelele79's Avatar
pelele79 pelele79 is offline
Senior Member
 
Join Date: Mar 2006
Location: Venezuela
Posts: 316
pelele79 is on a distinguished road
Well the idea is this, for example

the first buy (0,1 lot), sell(0,2 lot) and so on, believe me the only modification will be that the expert dont take only buys or only sell, i want that anyone change the code ... for me this will be the an excelent system. Manually work perfectly but is very dificult follow it.

thanks for your reply.

Pedro Echenagucia


Quote:
Originally Posted by wibitiens
Hi Pedro,
I don't really understand about your strategy. If the first is buy, second is sell, then third is buy, then ... once the TP is reach, how is the calculation the overall P/L?
For instance: pip=20 tp=25 no progression (always 0.1lot):
BUY-SELL-BUY = +5
BUY-SELL-BUY-SELL = -30
BUY-SELL-BUY-SELL-BUY = -25
BUY-SELL-BUY-SELL-BUY-SELL = -80

Thus, the end result is always minus
Could you explain it in more detail please? Thanks.

Cheers,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-04-2007, 08:43 AM
dunhill dunhill is offline
Junior Member
 
Join Date: Apr 2007
Posts: 15
dunhill is on a distinguished road
these are lines 107 and 108 of the EA

if(OrderType()==OP_BUY) MyOrderType=2;
if(OrderType()==OP_SELL) MyOrderType=1;

if you will just reverse the MyOrderType= (2 reversed to 1, 1 reversed to 2)
it might just work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-04-2007, 08:58 AM
fxgear fxgear is offline
Member
 
Join Date: Mar 2007
Posts: 48
fxgear is on a distinguished road
show statement if this works...at least 1 month forward test
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-04-2007, 09:25 AM
pghiaci pghiaci is offline
Senior Member
 
Join Date: Oct 2006
Posts: 21
pghiaci is on a distinguished road
Quote:
Originally Posted by pelele79
Hello in attach file you can view a martingale expert, my only suggestion is if anyone can change the code to take operation in this way;

.- if the first position is buy the second will be sell and thir buy and fourth sell etc etc (all depend of the max trades variable)

.- if the first position is sell the second will be buy and third sell and fourth buy etc etc. (all depend of the max trades variable)

Thanks in advance


Pedro Echenagucia
HI
here you are.I modifyed and attached the ea for you.if you want to the ea start with sell ,set "firstorder=1" and if you want the ea to start with buy ,set "firstorder=0"
Attached Files
File Type: mq4 martingale.mq4 (5.0 KB, 75 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-04-2007, 11:58 AM
pelele79's Avatar
pelele79 pelele79 is offline
Senior Member
 
Join Date: Mar 2006
Location: Venezuela
Posts: 316
pelele79 is on a distinguished road
Let me explain better (my english is not good), for example:

currency eur\usd

price: 1,3000

buy 1 lot 1,3000 the price goes to 1,2985 then sell 2 lot 1,2985 the price move to 1,3000 again then buy 4 lot 1,3000 the number of trades depend of the variable MAXTRADES and the pips into buy and sell depend of the variable PIPS.

i hope that anyone can change the code.

regards

Pedro Echenagucia




Quote:
Originally Posted by pghiaci
HI
here you are.I modifyed and attached the ea for you.if you want to the ea start with sell ,set "firstorder=1" and if you want the ea to start with buy ,set "firstorder=0"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-04-2007, 12:43 PM
pghiaci pghiaci is offline
Senior Member
 
Join Date: Oct 2006
Posts: 21
pghiaci is on a distinguished road
Quote:
Originally Posted by pelele79
Let me explain better (my english is not good), for example:

currency eur\usd

price: 1,3000

buy 1 lot 1,3000 the price goes to 1,2985 then sell 2 lot 1,2985 the price move to 1,3000 again then buy 4 lot 1,3000 the number of trades depend of the variable MAXTRADES and the pips into buy and sell depend of the variable PIPS.

i hope that anyone can change the code.

regards

Pedro Echenagucia
ok
but that's not a martigale any more.
I attached an ea for you.this ea has a topic in this site.you can find it.
Attached Files
File Type: mq4 sam_step.mq4 (12.1 KB, 73 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-04-2007, 11:51 PM
pelele79's Avatar
pelele79 pelele79 is offline
Senior Member
 
Join Date: Mar 2006
Location: Venezuela
Posts: 316
pelele79 is on a distinguished road
i need help

anyone can see the code in the first post and change it, the experts take only buys or only sells usng martingale progression, i need that the expert using the same code put intercalate positions.

please thanks in advance

Regards

Pedro Echenagucia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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

vB 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
Backtesting/Optimization newdigital Expert Advisors - Metatrader 4 428 06-29-2008 03:21 PM
Phoenix optimization Prankie Phoenix 173 10-17-2007 07:24 AM
Optimization cpu usage, need help Big Joe Indicators - Metatrader 4 4 08-16-2007 10:46 PM
How do I use the optimization? huhenyo Metatrader 4 1 03-15-2007 08:39 AM
Optimization cardio Metatrader 4 1 01-25-2006 12:30 PM


All times are GMT. The time now is 08:24 PM.