Willing to trade solid trading strategy for simple EA

Hello friends,
I have a solid trading strategy that works great manually, but I would require a simple EA to automate it. If someone has this EA or would be willing to code it I would in turn fork over my trading strategy…

The EA needs to do the following…
There will multiple orders open on one chart, each with a stop loss and trailing stop set manually.
Once the stop loss has been reached on any order, the EA must reopen the same exact order that was just closed and set the trailing stop to the same level that it was at originally.

Simple EA… but maybe not so simple to code. I’m not a coder so I have no Idea… If someone could help that would be great. Like I said, The trading strategy is solid and works in almost all market conditions. Thanks!!!

Hello

It does not seem difficult to codify. I Could do next week, this week I’ve got enough work.
If I understand correctly, you want to enter:
number of trades
stop loss
trailing stop
One question: if for example you fixed number of orders = 10, which should the EA do? open 10 buy orders and 10 sell?

Another thing, if you are interested in EAs, I’ve opened a thread where I put an EA for download. It is also very simple and works well on EURUSD H1. Just look at the market trend and put a sell stop or buy stop near the maxi or minimum of the previous day.
If you edit you can see that the code is quite simple.

Best Regards
cendros

Thanks for the reply Cendros,
My last post was a little vague, let me try to explain better what I’m looking for.

-On a chart I will have placed several ‘pending’ buy orders. These orders I will have placed manually and NOT by the EA.

-Each of these orders will have a stop loss of, lets say, 50 pips. Each of these orders will also have a trailing stop of 50 pips.

The Market now moves and opens one of the pending buy orders at price, 1.2345(example), then moves down 50 pips to close at 1.2295. The order then goes away.

This is where the EA needs to kick in. What I need the EA to do is re-open the order that just closed. It needs to re-open it as a pending order at price 1.2345 with stop loss of 50 pips and trailing stop of 50 pips.

So basically the EA needs to re-open ‘pending’ orders exactly the way they were originally after they have reached stop loss.

I don’t think this EA would need to have any inputs because the only information it needs to know is the OPEN AT PRICE, STOPLOSS, and TRAILING STOP values of the order that just closed.

Thanks for your help, I look forward to giving this thing a test run.

Hello

Now I understand what you want. When an order is closed (by stoploss or takeprofit) I have no problem to get the open price, the stoploss and takeprofit, but I can not get the traling stop (not saved in the history.)
Thus there are two options:
a / I put a parameter to set the trailing stop (manually into EA)
b / Let us take the trailing stop = the stoploss (from de closed order)

When the EA opens a trade, it do not put the trailing stop on it (embeded). The EA itself is that each tick checks whether it is necessary to move the stop loss.

Tell me which of the two options you prefer.

Best Regards
Cendros

I think option A would be more appropriate. If I am able to manually enter in the Trailing Stop it would give me more flexiblility.

Thanks Again

Hello
oks
well, I have a first version of EA you were looking for.
I describe the parameters:

name_to_check: there content must match the comment of orders you wish to control. For example, if name_to_check = mcgrup, in the comment field you must put mcgrup01, mcgrup02, mcgrup03 …

slippage: tolerance around the stoploss to reopen the order. I think 2 is a correct value, if not reopen an order should be increased

num_of_trades: number of orders to control (max 10)

trstop01: trailing stop for the order with cometary mcgrup01
trstop02: idem …

If trstop0x = 0 then no trailing stop running

The trailing stop running immediately, for example if trailingstop = 50, when the order is gaining 10 pips the EA starts to move the stop loss according to the price.
Another option would be for the trailing stop will not begin to run until the difference between market price and the purchase is greater than the trailing stop. I have no problem in changing this behavior if you’re interested.
Try it on a demo account and tell me that this works.

Best regards
Cendros

Cendros, The trailing stop function seems to be working fine, but when StopLoss is reached the order will not re-open. I tried increasing the slippage but still no luck.

Hello

I’ve tried on a demo account and reopen orders.
I can think of two possibilities:
a / you have posted a very tight stops for testing and the broker fails in this case.
b / I have set the EA to reopen the order if it is closed by stoploss and lost, not if it ends with stoploss and profit. should reopen the operation in this case?

if there is none of these cases you should look at the folder journal messages o find any idea that is failing.
Best regards
Cendros

I was testing with with a trailing stop of only 5 pips, perhaps that is why it wasn’t working.

It does need to reopen if the order closes with stoploss and profit as well as loss.

Thanks