Tâche terminée
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spécifications
The Trading Program starts with a horizontal line that is manually placed at any desired price level by the user. While the user is placing the horizontal line where he wants, the program should not be allowed to actively trade yet. I would like a button on the chart that when pressed, allows the EA to start watching for potential trades. The button should visually change, by text and color, whether active trading is turned ON or OFF.
Here is how the EA should place trades, once the horizontal line has been set, and the "active trading" button pressed:
1) For a Long Position: If price closes (on time frame x), within x pips above the horizontal line, the EA will enter a long position. A stoploss will immediately be placed x pips below the horizontal line and a take profit x pips above the horizontal line.
2) For a Short Position: Just the opposite of the long position. If price closes (on time frame x), within x pips below the horizontal line, the EA will enter a short position. A stoploss will immediately be placed x pips above the horizontal line and a take profit x pips below the horizontal line.
I want the option of adding a simple moving average as a filter (or to not have it used - turned on or off in the inputs). For example, if the price closes above the horizontal trend line, within the allowable x pips distance above the line, then the EA checks to make sure that the current price is not too far from moving average x. If price has moved too far from the moving average at the time it closes above the horizontal line, then a trade is not entered. The Max distance allowed from moving average will be one of the inputs.
If a long position is entered, and then any future candle closes below the horizontal trend line, but not far enough to get stopped out, then the EA closes the long position and enters a short position (as long as it's within the allowable distance of pips below the horizontal line (and near enough to the moving average - if this filter is turned on). If any future candle closes above the line and meets all the criteria, then the short position is closed and a long position entered. Of course, each of these trades would have their corresponding SL and TP automatically placed and deleted as positions are taken and reversed. Also, I would like to be able to have the option (in inputs) to have EITHER the same position size for each successive trade OR for each successive trade to increase in position size by x amount, up to a limit. If position size exceeds margin, then no trade is to be entered.
If (in inputs) the option of increasing trade size for each trade reversal is selected, and a position then hits the TP level, position size should reset to original beginning position size.
If price moves too far, too fast, and closes beyond the allowable distance above (or below) the horizontal line, then no trade is entered until a later candle closes within the allowable distance from the horizontal line. In other words, the price must reverse and close closer to the line for a trade to be entered.
I want the option (in inputs) for the stop loss to turn into a trailing stop loss after a trade is in the profit x pips
I want to be able to manually move the stop loss and take profit lines if needed. If the stop loss is a trailing stop loss, but then is moved manually, the EA should automatically turn off the trailing stop loss feature in "inputs" (so it doesn't try to correct the manual change). A manual change in the TP should not be changed back to the initial value set in "inputs".
I would like to be able to have the EA run only at specified times of the day (entered in inputs). I would like the times to correlate to the time on my computer, rather than the time on my chart.
I'd like to be able to customize the horizontal line color and thickness
In case of loss of connection to server happens, EA should continue active trading when reconnected. It would be nice if the EA could send my phone a text when there is a loss of connection.
EA should completely ignore all other positions that it did not open and not interfere with other EA's.
I will want source code of final product
I need a programmer that will offer technical support if I want to make small changes, within weeks or months of final product. How much would small improvements cost? How long would I need to wait for technical support?
If done well, I have another robot that needs building. Please tell me why I should pick you. What sets you apart from the competition?
Inputs (Here are some of the inputs the EA will require)
Trading time frame: M1, M5, M15, M30, H1, H4, D1
Horizontal Line Properties: color, thickness
Allowable distance from horizontal line to enter trade: x pips
Take profit long position: x pips above horizontal line
Take profit short position: x pips below horizontal line
Stop loss long position: x pips below the horizontal line
Stop loss short position: x pips above the horizontal line
Ability for trailing stoploss: on or off
if on: trail stoploss by x pips away
Moving Average: on or off
if on: x periods
Max distance from moving average for EA to enter trade: x pips
Number of consecutive losing trades: on or off
if on: x number of losers before EA stops trading (button on chart will show that trading has stopped if this number is reached)
Constant lot size: Yes or No
If Yes: x lot size
Increase lot size after a loss: Yes or No
If Yes: Starting Position size: x lot size
Position size increase after each trade reversal loser: x amount
Days and times EA can trade:
Sunday: 0-23:59
Monday: 0-23:59
Tuesday: 0-23:59
Wednesday: 0-23:59
Thursday: 0-23:59
Friday: 0-23:59