Forex Factory (https://www.forexfactory.com/)
-   Platform Tech (https://www.forexfactory.com/forum/69-platform-tech)
-   -   reverse martingale (https://www.forexfactory.com/thread/140365-reverse-martingale)

Jim4x Dec 24, 2008 4:45am | Post# 1

reverse martingale
 
1 Attachment(s)
Hi all
I have attached an ea which is basically a martingale that will open a new position every x pips when the price goes against the previous order... etc.

What I would like to do is to do the exact opposite.

I would actually like to open a new position every x pips in the same direction as the trend, so that say i buy at 1.4000 and my pip distance is set to 20, then a new buy will be placed when the price gets to 1.4020.

I hope that's clear and that someone can point me in the right direction.
Cheers
Jim
35x20 BUY7L200SL.mq4

athalon7 Dec 24, 2008 8:05pm | Post# 2

Make Grid 193
 
1 Attachment(s)
Here is a grid EA with many settings. You should be able to program to your liking. Trade small with grid trading, lots will eventually add up. There are also EA's to close all positions based on criteria you choose. Can be helpful. As much as Good luck.
MakeGrid193_1.mq4

Jim4x Dec 26, 2008 2:31am | Post# 3

grid but not martingale
 
Here is a grid EA with many settings. You should be able to program to your liking. Trade small with grid trading, lots will eventually add up. There are also EA's to close all positions based on criteria you choose. Can be helpful. As much as Good luck.
Thanks for your consideration, but this grid EA doesn't have the option to increase lotsize as it moves along...... - anyone else able to help??

IamTHAT Dec 26, 2008 2:49am | Post# 4

1 Attachment(s)
I was also thinking on those lines and I edited this EA provided by nanningbob. I do not know anything about programming yet but I tested this EA and it does place orders in the way you mentioned. Put the Reverse condition to True to place sell orders. Optimum settings needs much experimenting.
Please provide any info on the progress.
100x80 BUY 8L .02-edit.ex4

Jim4x Dec 26, 2008 4:20am | Post# 5

thanks
 
I was also thinking on those lines and I edited this EA provided by nanningbob. I do not know anything about programming yet but I tested this EA and it does place orders in the way you mentioned. Put the Reverse condition to True to place sell orders. Optimum settings needs much experimenting.
Please provide any info on the progress.
That's great thanks.
Could you tell me what coding changes you made? I had a good look (as a non-programmer) but couldn't find where to make the changes.
Any particular reason you posted an ex4 and not an mq4?

I'll test it once the markets are back to normal spreads and volumes.

IamTHAT Dec 26, 2008 9:01am | Post# 6

1 Attachment(s)
That's great thanks.
Could you tell me what coding changes you made? I had a good look (as a non-programmer) but couldn't find where to make the changes.
Any particular reason you posted an ex4 and not an mq4?

I'll test it once the markets are back to normal spreads and volumes.
I changed the Open Market order section somewhere towards the end of the program. It was purely trial and error and I could get hardly time to test it due to market closure. It was opening orders in the correct order when I tested last on GBPJPY. It works in the Reverse only now. We need to change the SELL EA also and work in tandem. How to handle multiple closing when TP is reached?
There are many possibilities here, we can use this during trending time or as a hedge along with regular EA. We have arrive at TP and Pips.
My idea is to use use 1.0 as multiplication and/or use equal TP and Pips.
When market is ranging regular EA is better.
There are many unwanted portions which needs to be trimmed and I am looking forward to playing with it.
100x80 BUY 8L .02-edit.mq4

pejo Dec 26, 2008 10:51am | Post# 7

Hi All,

Jim4x, I back test your ea but it does not open any position. By the way if you want to reverse, you just need to change

if ((LastPrice-Ask)>=Pips*Point || OpenOrders<1)
to if ((Ask - LastPrice)>=Pips*Point || OpenOrders<1)

and

if ((Bid-LastPrice)>=Pips*Point || OpenOrders<1)
to if ((LastPrice - Bid)>=Pips*Point || OpenOrders<1)

sorry i didn't read all your code but it should be work when you change that.

Thanks

michgrad1996 Jan 13, 2009 8:50am | Post# 8

performance
 
Regarding all of the these EA's, is there any performance data on how they do and on what currency pair? How many positions can they open before they crash your account or do they have a max loss % built in? I love the idea of these martingale style EA's, but I'm a little concerned about crashing an account.

AsianTiger Jan 14, 2009 2:40pm | Post# 9

This is exactly what I was looking for, but is it me or it it only allowing buy positions?

Thanks

IamTHAT Jan 15, 2009 1:13am | Post# 10

2 Attachment(s)
This is exactly what I was looking for, but is it me or it it only allowing buy positions?

Thanks
You an set it to SELL by changing the Reverse condition to True in the properties section.
Here I am posting again both Buy and Sell separately.
Change TP, Pips (Steps for successive orders), Multiply (Increase in lotsize for successive orders) etc. to suit your requirement. You can experiment for different pairs, running both buy and sell simultaneously.
ReverseMartingale BUY.mq4
ReverseMartingale-SELL.mq4

constin Feb 8, 2009 2:52am | Post# 11

Hi all
I have attached an ea which is basically a martingale that will open a new position every x pips when the price goes against the previous order... etc.

What I would like to do is to do the exact opposite.

I would actually like to open a new position every x pips in the same direction as the trend, so that say i buy at 1.4000 and my pip distance is set to 20, then a new buy will be placed when the price gets to 1.4020.

I hope that's clear and that someone can point me in the right direction.
Cheers
Jim
I've got a similar EA but we need a coder to fix it.
It's on this thread:
http://www.forexfactory.com/showthread.php?t=151355

Thanks,

Soendoros May 23, 2010 9:12pm | Post# 12

Hi all
I have attached an ea which is basically a martingale that will open a new position every x pips when the price goes against the previous order... etc.

What I would like to do is to do the exact opposite.

I would actually like to open a new position every x pips in the same direction as the trend, so that say i buy at 1.4000 and my pip distance is set to 20, then a new buy will be placed when the price gets to 1.4020.

I hope that's clear and that someone can point me in the right direction.
Cheers
Jim
Hi Jim,

What would you do when the market goes against your order? Take a cut losss or do the Martingale avg down?

Soendoro Soetanto

T4Trade Apr 21, 2019 5:18am | Post# 13

{quote} You an set it to SELL by changing the Reverse condition to True in the properties section. Here I am posting again both Buy and Sell separately. Change TP, Pips (Steps for successive orders), Multiply (Increase in lotsize for successive orders) etc. to suit your requirement. You can experiment for different pairs, running both buy and sell simultaneously. {file} {file}
I cant download these experts,any idea?

goodways100 Apr 22, 2019 1:55am | Post# 14

Subs. Thanks and
Regards


© Forex Factory