Double MA Grid EA Input Parameters: General Magic Number Comment – user defined Show info panel – T/F Close All button on chart Money Management for entries: Initial lotsize method: fixed, or lotsize per 1000 free margin Initial lotsize fixed: lot size (all orders will be this lot size) lotsize per 1000 free margin: (free margin X this input=initial lotsize) pyramid lotsize coefficient: (previous lotsize X this input, >1 to increase, <1 and >0 to decrease, 1 to make all pyramid lots the same as initial lot) Grid lotsize coefficient: multiplier for grid orders Max Open Orders: limit on total number of orders to open Rules for entries: 1. For initial buy orders: a. fast MA is above slow MA b. price closes above fast MA 2. For initial sell orders: a. fast MA is below slow MA b. price closes below fast MA 3. Entry Filter: in points difference between fast and slow MAs 4. Use pyramid? T/F a. Pyramid Method: (3 choices) by distance, by ATR, by margin requirement (open new position when profits=margin requirement for next order) b. Pyramid distance: in points c. Pyramid by ATR: coefficient (Draw lines on chart of future entry points if pyramid=true) 5. For Grid Orders: If initial order goes to loss, open follow up orders in same direction with these parameters a. Grid distance in points b. Max number of grid orders c. Grid order number to overlap (when reaching this number of grid orders, the last order will close together with the first grid order when just those two orders reach profit points in (d.). This reduces total grid exposure and margin requirements. d. Overlap points The goal here is to open an order (or series of orders) when price closes above (for buy) the fast MA when the Fast MA is above the slow MA and then to manage that order(s) by trailing the stop loss and adding to it if it continues to move up and eventually closing all the buy orders in profit by the trailing SL, or when price crosses back below the fast MA while the order is in profit. As long as the fast MA stays above the slow MA, a new initial order will open if the previous buy orders were closed by either of these methods, and the candle closes above the fast MA. If the initial order crosses below the fast MA in a loss, it will not close but will open a grid order when the distance parameter is met, and then the grid will continue to be managed by adding orders if it continues to move against or by trailing SL if the total grid goes into profit. In the meantime, if the MAs reverse the whole process will start in the other direction, even if orders remain open. Rules for exits: 1. Price crosses fast MA (live bar) 2. Virtual Trailing stop: T/F show virtual SL on chart—trigger level and trailing level a. Trailing method: points or ATR b. Start Trailing: in points c. Trailing step: in points d. Trailing ATR coefficient: 3. Grid profit trailing SL start in points: (when total grid reaches n points profit, begin trailing) 4. Grid profit trailing SL step: distance to allow reversals before closing These entry and exit rules could result in simultaneous opposite orders, ie. A buy grid open at the same time as sell orders are open. Indicators: FastMA: period, method, applied price, shift (same parameters as MT4 standard indicator) SlowMA: period, method, applied price, shift (same parameters as MT4 standard indicator) ATR: period Info Panel: (border medium blue, background black, font color white, placement in top left corner below price data line) EA Name Open Lots Buy Open Lots Sell Current Profit on open positions (green if positive, red if negative) Account Balance Free Margin Margin level % Profit Today Profit This Week Profit This Month in currency and percent Drawdown in % current/maximum Fast MA Period Slow MA Period Adapt to 4 or 5-digit quote currency pairs, use any time frame. Need strategy tester version to optimize parameters. Let me know if you have questions or suggestions.