My Trading Assistant
This is a semi-automatic Expert Advisor for maintaining deals opened manually. The EA has a functions of moving a trade to breakeven, closing positions at the given maximum drawdown or profit as a percentage of the balance, pips based trailing, trailing based on the previous bar extrema. The EA maintains positions of the current financial instrument not depending on the magic number or types of trades. It displays information on the chart of the chosen currency pair, showing the current profit in percentage, drawdown, today's profit in the deposit currency, yesterday's profit, profit for the the current and the previous month.
The Expert Advisor also displays two quick trading buttons on the chart - Buy and Sell, even if you open orders in the terminal panel, the EA will also work with them, no matter whether they are market or pending orders. It works with 4-5 digit quotes. Before starting to trade, adjust the EA to your needs, and then it will perform the specified functions.
- Breakeven - enable/disable the breakeven option;
- StartBreakeven_1,2 - the number of points that the price has passed in the profit direction, after which the position is moved to breakeven;
- StepBreakeven_1,2 - distance in points, where the breakeven level is set;
- Trailing - enable/disable point based trailing;
- TrailingStart - the minimum number of points passed from the order opening price for trailing;
- TrailingStop - the number of points to start trailing stop;
- TrailingStep - step of the trailing stop;
- TrailingHiLow - enable/disable trailing by Hi - Low за previous bars;
- TimeFrame - timeframe for finding extrema of the previous bars;
- BarCount - number of previous bars to find extrema;
- IndentHiLow - indent from Hi - Low of the highest/lowest value;
- ShowButton - show/hide quick trading buttons;
- BayColor - the color of the Buy button;
- SellColor - the color of the Sell button;
- TypeOrderExecution - order execution : Market Execution or Instant Execution;
- BalanceRisk - lot calculation based on the balance/free margin;
- Lots - fixed lot if BalanceRisk == 0;
- TakeProfit - profit in points;
- StopLoss - loss of points;
- MaxAttempts - the maximum number of attempts to open an order;
- DelaySeconds - a pause in seconds between attempts;
- Slippage - the maximum slippage;
- ShowInfo - show/hide trading information;
- TextColor - the color of the info text.
Expert Advisor Testing
Warning! The Expert Advisor does not start trading independently, to launch the EA you need to specify trade direction by pressing the appropriate button on the chart - Buy or Sell. To do this, select the trading interval (testing start and end date) in the strategy tester, mode "Every tick" and tick "Visual mode". After the start of the EA testing process, trading info will appear with two buttons - Buy and Sell. After the target is reached, the EA returns to the initial standby mode.
- Added anti requote functions for fast manual trading.
- Added choice between types of orders execution: Market Execution or Instant Execution.
- The code is completely rewritten. The EA works faster now.