ArgoAverager

krool1980

Trader
Oct 27, 2014
2
0
17
ARGOLab_net
This is an Expert Advisor designed to automatically average out trading positions opened manually or by another EA.
ArgoAverageEA_8.png


Description:

ArgoAverager can be used for averaging out an open position (consisting of one or several trading orders), by opening new order(s) in the same direction at a better price(s), typically with a larger volume. If price continues moving against the position, EA will open a grid of additional orders with specified parameters (grid step distance, lot multiplication factor, etc). EA assigns a common take-profit level to all trading orders, which is adjusted automatically when new trading orders are opened.

When the price pulls back, ArgoAverager closes the basket of trading orders by the common take-profit. If the price continues moving against the basket and the maximal number of grid levels are opened, EA “locks” the position, by opening a hedging order of such volume that the total position becomes neutral, thus preventing escalation of drawdown further.

ArgoAverager has an option of closing all trading orders at a prescribed drawdown.

ArgoAverager can be used for averaging only some of the orders on the given currency pair. For example, it can average only Buy or only Sell orders. It can average only one trading order (with the specified ticket number). It can average a group of orders with a specified magic number (e.g., orders opened by another EA).

ArgoAverager assigns the take-profit level to all orders and modifies it accordingly to the number of market trading orders. There are two different logics for calculating the take-profit: (i) take-profit (in pips) is calculated from the price of the last order in the basket and (ii) take-profit (in pips) is calculated from the break-even level of the basket.

Possible variants of use:

You are opening a trading order. Instead of setting a stop-loss, you let ArgoAverager to average your order if the price moves against it.
Your EA has opened several trading orders that are in drawdown now. You can remove this EA from the chart and let ArgoAverager to average out the leftover trading orders.
You need to leave your terminal and cannot supervise your trade for a while. You may let ArgoAverager to take care of your position while you are away.


Settings:

Order Selector Section:

These settings select the orders that will be averaged by EA. With the default settings, EA will average all orders for this currency pair.
BuySell (Buy/Sell/All): Buy – select only Buy orders; Sell – select only Sell orders; All – select Buy and Sell orders.
Ticket: Select only order with this ticket. If 0, not active.
Magic: Select only orders with this magic number. If 0, not active.



Grid parameters:

GridStepPips: grid step (in 4-digit pips).
TakeProfitType (FixedTakeProfit/DistanceFromBE): select how the take-profit is calculated. FixedTakeProfit – take-profit is calculated from the last order (order with the best price); DistanceFromBE – take-profit is calculated from the breakeven level.
TakeProfitPips: take-profit value (in 4-digit pips).
LotMult: lot multiplication factor.
MaxGridLevel: maximal number of grid orders.
SetTPAtOnce (TRUE/FALSE): If TRUE, EA will set the common take-profit to all orders at once; if FALSE, EA will set the common take-profit when the first pending order is triggered.


Lock parameters:

These settings activate the Lock feature of the EA: if the maximal number of grid levels is opened and the price moves another LockDistPips pt against the basket, EA opens the locking order that makes the whole position neutral and removes all take-profits. After that, EA does nothing.
UseLock (TRUE/FALSE): Enable the lock feature.
LockDistPips: locking distance (in 4-digit pips).


MaxDD parameters:
This feature closes all open orders if the maximal drawdown is reached.
MaxDD: Maximal open drawdown allowed, in units of the base currency. If the open drawdown of the open orders exceeds MaxDD, all market orders are closed immediately, all pending orders are deleted, and trading is stopped. If MaxDD is set to 0, this option is disabled.

MaxDDPerCent: The same as MaxDD, but in percents of the account balance. E.g., if MaxDDPerCent =30, the trading will be stopped when the drawdown exceeds 30% of your account balance. If MaxDDPerCent is set to 0, this option is disabled.


Misc parameters:
MagicEA: magic number of averaging orders.
MagicLock: magic number of the locking order.
comment_color: color of the text in the information box.
box_color: background color of the information box.
colBE: color of the breakeven line.


Download ArgoAverager ver. 2.4: https://yadi.sk/d/3O9tSWcSe2MK9