![]()
YOUR IDEAL AVERAGE Worker Place BUY and SELL LIMIT pending orders on AVERAGE line so it would be moved on opening of any candle! NOW YOU CAN do this on any kind of an AVERAGE available in MetaTrader. EA manages a scenario of an AVERAGE CROSSING.
EA WORKS ON ANY INTERVALL. The chart interval determines what kind of candles will EA base upon its actions.
EA places LIMIT pending order (Buy or Sell Limit) on ANY MOVING AVERAGE that is available in MetaTrader Platform. After placement EA moves a pending order on every candle opening. Order has specified SL, BE, TP levels, which are also adjusted along with the order price level change on any candle opening.
EA manages an average crossing scenario – if price breaks through the specified average, EA places an opposite pending order on the same average after given number of candles have closed during the time price was on the opposite side of the average. E.g. – EA should place SELL LIMIT orders on an AVERAGE, but price broke through the indicated average. On the other side price has spent enough time, as specified in the parameter of number of candles that have to close after average crossing. When this parameter is met, EA will place a BUY LIMIT with adjusted SL, BE, TP levels` distances.
Places pending orders with fixed lots value or – if parameter left with zero – with lots calculated upon a risk factor – a percentage of capital risked on a total SL distance. (E.g. – for a trading account of 10 000 USD a pending order of 5% over 100 points and of 1% over 500 points will have the same lot value.) Note that when using a risk factor YOU FOCUS ON RISK MANAGEMENT, NOT ON LOT MANAGEMENT. When your account grows, all you have to do is switch off the EA, cancel all orders and switch the EA on – TA DA – same order types, same places BUT new lot calculation for ALL orders. This is A VERY TIME SAVING option.
EA can handle more than one order on one average. Next order on specified average will be placed after given number of candles has passed after activation of the previous order. So it is possible to have more than one order placed on one average if TP was far away enough to give space for the previous, activated, order to work. If enough candles are closed after first activation, the second order is placed – now EA manages two orders and it can iterate on and on.
EA moves SL to BE only once. If user would move SL before BE distance occurs, EA will not manage BE anymore. The same is with TP – if user will move it, EA won`t move it back.
Opts:
Risk – percent lots valuefixedLots – fixed lots valuerobotName – user defined name of EA
avgOptions – header for average parametersbarsForAvg - specified by user number of candles that the average is calculated onavgMethod – user can choose average method from: simple, exponential, smoothed and linerWeightedavgPrice – user can choose price that is taken for calculations from: open, high, low, close, HL/2, HLC/3, HLCC/4
s1Options – header for s1 indicator parameters; at some point I wanted to use this indicator as a line to place limit orders as well. If you do not have this indicator, than this option will not be of any use.t3Period – default value that I uset3Price - default value that I useb - default value that I use
line0 – header for order parametersop0 - select an order type – user can choose only a BUY or SELL LIMIT, STOP orders are inactivestartOffset0 – starting offset – distance from the average; this value is changed for the opposite automatically when EA places order after average price crossing. For example – a +20 points offset for BUY LIMIT will result in -20 offset for SELL LIMIT; a -20 offset for BUY LIMIT will result in +20 offset for SELL LIMITlineWidth0 – user can specify a maximal distance between the price and the average that will allow EA to work – if price will be above this distance – EA will not place a pending ordertp0 – take price distance from activation pricedistSL0 – stop loss distance from activation pricedistBE0 – break even distance from activation pricewaitBarsAfterActivation0 – number of candles that EA will wait before placing next pending order after activation of previous onenMaxOpenOrders – how many orders EA is allowed to manage.
autoFlip0 – true / falsewaitBarsAfterCrossingAvg0 - number of candles that EA will wait before placing pending order after price crossed the average