Auftrag beendet
Spezifikation
The rights and ownership of MQL5 EA and it's source code will belong 100% will belong to me. I will need the source code and when compiled, the EA must return no error.
Requirements:
The EA must use and trigger sound alerts and trades on the break outs of the price channel (Donchian channel) as described below.
The EA must use the ATR (Average True Range), 10 Price Channel (Upper and Lower channel only) and 20 price channel (Upper and Lower channel only) to make it’s calculations as described below.
Note: Price Channel is the same as the Donchian channel.
The EA must have the ability to alert
EA must work on a 8 hours chart
EA must leave detailed information in the journal and entry/exit on the chart
If there are any errors, it must print a message describing the error in the journal.
Trading behavior - First in first out (FIFO) must apply to each trade.
Entry is calculated from <Entry_target> +/- of 20 price channel (based on the last candle closed).
+ for buying into the market
- for selling into the market
Take profit
Take profit is calculated by 2 x ATR - <ATR_Factor>.
ATR_Factor is a numeric variable described in the input section.
Stop loss (A)
All Price Channel measurements are taken from the last candle closed (aka the candle BEFORE the entry).
If the 10 Price Channel measure less than 200 pips (from Upper channel to Lower channel), the Initial Stop Loss is 80 pips away from the entry price. Verify that you are not within 30 pips of a local candle support/resistance, if so move the ISL 5-15 pips further away from the support/resistance. ***If local resistance/support is more 130 pips away then ISL is 100 pips. Local/support is determine by last 3 to 8 pips. ***
If the 10 Price Channel measure more than 200 pips (from Upper channel to Lower channel), the ISL is 175 pips away from the entry price. Verify that you are not within 50 pips of a local candle support/resistance, if so move the ISL 10-25 pips further away from the support/resistance. ***If local resistance/support is more 250 pips away then ISL is 200 pips. Local/support is determine by last 3 to 8 pips. ***
If the 10 day Price Channel measure more than 400 pips (from Upper channel to Lower channel), you can use one of 3 ISLs:
(A) 175 pips
(B) The chart's support/resistance; or
(C) 2/3rds of the PC measurement.
If the Initial Stop Loss is more than 225 pips away from price, use 1/2 of your normal lot size for the entry.
If the Initial Stop Loss is more than 300 pips away from price, use 1/4 lot size.
Stop loss (B)
Stop loss is Y pips beneath the 10 price channel (Y is configurable).
Trailing Stop Loss (A)
The Initial Stop Loss doesn't become the Trailing Stop Loss until the 10 Price Channel has moved more than 30 pips away from the Initial Stop Loss, in the direction of the trade.
If, in between any two candles, the 10 Price Channel moves between 30 and 60 pips, then move the Trailing Stop Loss to the 10 Price Channel (+/-) 1/2 of the pip move. The Trailing Stop Loss should be farther away from price than the 10 Price Channel.
If the 10 Price Channel plateaus for 6 candles, then move the Trailing Stop Loss to the 10 Price Channel (+/-) 5 pips.
Trailing Stop Loss (B)
Trailing Stop Loss <TSL_value> pip below the 10 Price Channel
Entry target = The number of pips above or below the 20 price channel. If the Entry value was set to 20. Entry would be 20 pips above the 20 price channel for buy orders and 20 pips below for sell orders.
Entry percentage (On/Off) = When selected, entry target value is the percentage multiplied by the distance from current 20 price upper channel (20UPC) - 20 price lower channel (20LPC) add to the 20 price channel (20PC) is the entry. Formula: (20UPC-2LPC)x<Entry target>+/-(20PC)=Entry.
ATR_Factor = Take profit is determined by the formula 2 x ATR - ATR_Factor. ATR_Factor is number of pips subtracted from this formula.
Stop Loss Rules A (On/Off) = When selected, Stop Loss is determine by rules in Stop Loss A.
Stop Loss Rules B (On/Off) = When selected, Stop Loss is determine by rules in Stop Loss B.
Trailing Stop Loss A (On/Off) = When selected, Trailing Stop Loss is determine by rules in Trailing Stop Loss (A) Rules.
Trailing Stop Loss B (On/Off) = When selected, Trailing Stop Loss is determine by rules in Trailing Stop Loss (B) Rules.
Debug_mode (On/Off) = Pauses trading and alerts me so that I can evaluate traded before it is executed. This should bring up a dialog to “Execute Trade or Continue Monitoring”