ATR Position sizing EA
The function of EA is to assist and handle trades based on a manually executed system.
I rely heavily on ATR multiples (much like Turtles Trend following system) for stop losses and on partial take profit once a position is executed.
For now I trade with Oanda through their MT4 platform, but I would like the EA to work universally across other brokers” MT4 platforms.
Before executing a position, I calculate the position’s SL and therefore the lot size based on % of current capital and the pip value of the currency (Eg. In EURGBP, Lot size = Capital * Risk% / SL points / Pip Value = USD5000 * 1% / 200 / [url removed, login to view] = [url removed, login to view] Lots).
SL is calculated based on a certain period’s ATR, defined as [ATR 1], multiplied by a multiplier, and defined as [Multiplier 1].
(Eg. SL points = [ATR (14) 1] * [Multiplier 1] = [url removed, login to view] * 2 = [url removed, login to view])
Starting SL should be adjusted for BUY/SELL, Bid/Ask Prices and spreads.
SL is adjusted only after 1R is reached (2xATR). For the EA I would like this to be a modifiable variable.
(Eg. SL adjusted at 2R, [url removed, login to view], etc, defined as [Moving SL Start Line])
When price reaches above 1R, new SL is calculated using the New Price High, current ATR (period), defined as [ATR 2], and another multiplier defined as [Multiplier 2].
(Eg. SL Price = New Price High – SL points
SL Points = [ATR 2] * [Multiplier 2] = [url removed, login to view] * 3 = [url removed, login to view])
When a New Price High is reached, the whole process is repeated again with the New Price High and that moment’s ATR value.
SL Price is always in favor of the position, and can never move against a position even though it is calculated to do so. When such a scenario occurs, the EA is supposed to ignore that new SL calculation and maintain previous SL price.
New Price High is confirmed only after the close of each candle.
The EA is to continuously look for a new price high, and subsequently adjust the M-SL accordingly based on a higher New Price High and updated ATR Value 2.
At 2R I close 50% of my position and reduce the multiplier of the moving SL to [Multiplier 3].
Eg. At 2R, 50% * [url removed, login to view] = [url removed, login to view] Lots is closed.
SL Points = [ATR 2] * [Multiplier 3] = [url removed, login to view] * 2 = [url removed, login to view])
However on top of that I would like to have the following additional parameters placed:
Able to take profit at 3 levels. Example below:
%of position TP level
TP1 50% ATR x1.5 [Multiplier 3]
TP2 30% ATRx2 [Multiplier 4]
TP3 20% ATRx3 [Multiplier 5]
Whereby Multiplier 3, 4, 5 are supposed to take effect (in calculating Moving SL) when the TP levels are hit.
After trade is executed, the EA is expected to execute either a full TP/SL or partial TP and SL based on ATR levels, hence automating my take profit/stop loss/partial close strategies.
- SL always move in favor of entry, ie. Starting from Starting SL, always increasing in Buy position, never decreasing
- Able to toggle each stage individually (Like Quik Trailing) [url removed, login to view], moving SL, partial TP,
- TP and SL hidden.
- Must be able to work on microlots([url removed, login to view] lot size)
- EA active on all positions, not just specific charts.
- Email and sound alert when TP/SL/Partial TP is hit.
- Able to summarize a closed position into a row of information to export into Microsoft Excel, as a form of trading journal. Preferably sent together with the email alert.
- Does not interfere with other programs accessing the MT4 account Eg. [url removed, login to view] or client access.
Similar to the following EAs:
MT4 ATR Trade Manager
[url removed, login to view]
Quik Trailing EA
[url removed, login to view]
Please message with a price quote and an estimated project timeline.
Do clarify with me if you’re confused on any of the description above.
I communicate proficiently in English and would prefer that you are too.