# Metatrader 4 EA - ATR Position sizing

ATR Position sizing EA

Criteria:

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.

Stop Loss

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 / 1.55 = 0.161 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] = 0.00100 * 2 = 0.00200)

Moving SL

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] = 0.00150 * 3 = 0.00450)

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.

Partial Profit

At 2R I close 50% of my position and reduce the multiplier of the moving SL to [Multiplier 3].

Eg. At 2R, 50% * 0.161 = 0.08 Lots is closed.

SL Points = [ATR 2] * [Multiplier 3] = 0.00150 * 2 = 0.00300)

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(0.01 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:

Quik Trailing EA

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.

Apologies - The budget is meant for IDR 750,000 to 1,500,000. Added too many zeroes

( 0 reviews ) Jakarta, Indonesia

Project ID: #4518693

## 4 freelancers are bidding on average Rp10643274 for this job

matharpa

HI, I am expert in making EA and CI for MT4. Check PMB for details.

Rp7894736 IDR in 5 days
(54 Reviews)
5.7
jitendraparmar07

Hello sir,I can help [url removed, login to view] check [url removed, login to view]

Rp15789473 IDR in 3 days
(4 Reviews)
3.4
fastcoder3000

Hello, your explanation is clear, and I can start to working right away.

Rp7500000 IDR in 3 days
(4 Reviews)
2.6
pureflame

Hello Sir, I am a professional trader on mt4 and have designed a lot mt4 trading systems:)

Rp11388888 IDR in 10 days
(0 Reviews)
0.0