Collector v1.00

 

Here is a new EA I've been working on which functions similarly to Terminator and others in that it using a Martingale-style doubling progression to keep the account in the market until a win can be achieved. The difference is that instead of continuing to trade in one direction when the market goes against the initial trade, it alternates trade directions - switching from long to short if the price goes down, and from short to long if the price then goes back up. If the price stays in a certain range, it will add trades until the price breaks from the range, at which point it will take a pre-determined profit and close all open orders. In a way, it trades an opposite strategy to Terminator type EAs, and instead of getting into trouble if the market makes a long move in one direction, it just takes profit after profit.. I think it could be a great complement to a Terminator-style strategy.

The problem is that I can't get the code to work right, so I need someone to look at it and test it and see if you can help me find the problems. It seems to crap out after the third trade and won't make any more in the progression, and also sometimes it trades in the wrong place and/or uses the wrong TP.. It's hard to know exactly what it's doing with the minimal debugging (basically none) capabilities of MetaEditor.

With default settings, it should take an initial position based on an indicator, and if the price moves against that position by 10 pips, it takes a second position - twice as big - in the opposite direction. If the price then moves agains the second position by 10 pips it will take a third position in the opposite direction of the second one (the same direction as the first one) again at twice the size. In this way, the EA is defining a range of 10 pips and keeps making trades at the same place until the range is broken. Once the price moves out of this range by a certain amount, all trades are closed and profit is taken.

The indicator I'm using is a slightly modified i_trend called i_trend_s.mq4, which is just a two-bar slope of the original i_trend. I've attached this indicator as well as the EA. I hope this description is adequate... any help you guys can provide would be great!!

Files:
 

that is what im searching for, near the idea from discussing thread.

it could be profitable when we fix some things.

good work

 

ZTrader, I think what you are attempting to incorporate into your EA are excellant ideas. May I suggest to contact BLUTO, what you are attempting to do and what he is attempting would probably compliment each other very well. He started the thread "Here's the new "Goblin" ea...little brother to Predator" cheers, Goldensight

 

Yeah, I've been keeping up with Bluto's progress.. I was in fact thinking of this as a way to help the Terminator/Predator type of program out by providing an EA that excels where they struggle and vice versa. I just can't figure out why my code won't do what it's supposed to do...

 

Great idea ZTrader. Have you thought about sending Bluto a PM and telling him what you have going on and ask him if he would be interested in a win/win by joining forces? I think the two of you could have a more productive EA by joining hands. My two cents.

ZTrader:
Yeah, I've been keeping up with Bluto's progress.. I was in fact thinking of this as a way to help the Terminator/Predator type of program out by providing an EA that excels where they struggle and vice versa. I just can't figure out why my code won't do what it's supposed to do...
 

now it can trade 6 times but then it dont trade anymore.

where is the problem?

Files:
 

Here's another try... I've made a few minor changes to try to get it working better...

Files:
 

excellent idea.......hope someone can help you code it...

 

I'd be more than happy to contribute to this. I'm a bit tied up at the moment with some other projects but should have some time during the later part of December. I'll take a look at the code in the meantime.

 
bluto:
I'd be more than happy to contribute to this. I'm a bit tied up at the moment with some other projects but should have some time during the later part of December. I'll take a look at the code in the meantime.

Great, Bluto.. I'd appreciate any help you can provide. I feel really good about the concept, but getting the code right is driving me crazy...

Here's yet another stab at it.. I've taken a more direct approach to storing info about trade directions and number of previous trades, etc. in an attempt to be certain that it's not being calculated wrong, but it still seems to have problems. I would prefer to use server info to recalculate vital progression info so that the EA can easily recover if interrupted (computer crashed, MT4 re-started, etc.), but I wanted to try doing it by brute force to see if that was where the problem lay..

Anyway, here's my latest attempt..

Files:
 

This sounds great, I'll be watching this thread with some interest.

By my understanding, this ea should always profit so long as you have enough capital to keep the multiplications going.

I would make it enter trades often and take a small take profit, say 30 pips. That way you will always profit (even if it is a small profit) and will have a lot of trades generated.

I would probably also include a time limiter to the code so that you could trade it during the hours when the market is making the largest movements.

It probably doesn't really matter what type of entry signal you are using as the system is not profitable because of the entry signal, in fact it is more profitable if the entry signal is incorrect and it reverses a couple of times...

My two cents...

Reason: