Lavoro terminato
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specifiche
Hi coders,
This is not an easy EA to code, so please only apply if you are among the best coders out there. Below you will find most of the description of the EA, but contact me and I will send you a detailed document with visuals and detailed explanations. Thanks.
Description
The EA uses yesterday’s highest high/lowest low to determine trade zones. When today’s highest high is in the Sell Trade Zone it looks to sell and when today’s lowest low is in the Buy Trade Zone it looks to buy –> reversal/pullback trading. The price can obviously be in both Buy and Sell Trade Zones within the same day. When this is true, then EA is looking for both sells and buys.
It uses ATR value to determine Entry Lines. SL is always highest high / lowest low of the day + spread and TP = 1:1 risk to reward ratio.
The Trade Zones are areas defined by a Trade Zone Limit on one side, and no limit on the other side. This means that all trades above/below the Trade Zone Limits are valid, no matter how far the price goes beyond yesterday’s highest high/lowest low.
Trade Zone Limits (TZL) are defined as a % of the difference between yesterday’s highest high and lowest low in the EA input. Let’s say that TZL is = 10% and the difference between yesterday´s highest high and lowest low is 1000 points. Then each of the two Trade Zone Limit lines are placed 100 points (10% of 1000) away from yesterday´s highest high and lowest low towards each other. Use server time to determine day beginning/end.
Entry Lines
The EA uses the ATR value to define the Entry Lines for which a trade is triggered when price opens above it and crosses it from above (sell trade) or price opens below it and crosses it from below (buy trade).
The ATR value from last candle-close determines the new Entry Lines, so the Entry Lines (potentially) change location frequently. The Entry Lines are placed the number of points derived from the ATR indicator respectively below the current highest high of the day and above the current lowest low of the day – However, the Entry Lines need to be “attached” to a candle-open, so it needs to find the candle-open of the day where the distance from highest high/lowest low to candle-open comes closest to the ATR value at last candle-close, and never less than the ATR value. It is okay to enter a trade if the Entry Line is not in the Sell/Buy Trade Zones as long as the highest high/lowest low is.
Trade management
Given the nature of the trade management for this EA, it is necessary to create a log file that captures trade history for each currency pair and total account- and currency pair profit/loss. The EA will read from this file in order to determine next lot size.
The file should be automatically created by the EA and the file should be manually editable. If log file does not already exist when EA wants to read from it, then the EA should create the file and all trades on all pairs will start by the initial lot size listed in EA input.
Account- and currency pair profit/loss is calculated from the time the log file is created. So if for example the log file is manually deleted, the EA will generate a new log file and profits will be reset to 0 for both the account and each currency pair.
When a trade is about to be opened on any given currency pair, the lot size will be determined by the steps outlined below:
....will be explained in the detailed document.
Movement of Stop Loss when Stop Loss/Take Profit ≤ XX points
When Stop Loss/Take Profit ≤ XX points, Stop Loss must always be moved to breakeven (covering spread, commission, swap) + X points when Y% of Take Profit is reached. So if X points = 10, then the trade will net 10 points if Stop Loss is hit.
“X points”, “XX points” and “Y%” are defined in EA input.
Movement of Stop Loss when Stop Loss/Take Profit > XX points
In cases where Stop Loss/Take Profit is greater than XX points, Stop Loss is moved two times:
1. Stop Loss is moved to breakeven + X points when Z% of Take Profit is reached.
2. Stop Loss is moved to YX% of Take Profit when YY% of Take Profit is reached.
“X points”, “XX points”, “Z%”, “YX%” and “YY%” are defined in EA input.
Visuals
Trade entries and exits and a connecting dotted line must be permanently marked on the charts for trade analysis.
It must be possible to show Trade Zone Limits and the dynamic Entry Lines on the charts.
Upload of EA to MQL5.com
The EA/code must meet the criteria needed to be uploaded to the MQL5 marketplace.
Source code
EA must be delivered with source code (negotiable).
Backtesting
It must be possible to backtest the EA in MT4.