Position Trader EA Manual

Position Trader EA Manual

13 March 2024, 16:01
LEE SAMSON
3
942


Below you will find a list of all inputs for the position trader EA and an explaination of what they do.
MT4 Version Available Herehttps://www.mql5.com/en/market/product/113677

MT5 Version Available Here: https://www.mql5.com/en/market/product/115359/

The Two Main Strategy Auto Entries Explained:

RSI Mean Reversion

This strategy is designed to be a multi timeframe strategy meaning you use a higher timeframe than the entry to monitor for a condition in the market and you enter on a lower timeframe. A good example would be H1 and M5. H1 would be the timeframe you monitor for an extension of the RSI and then you would enter on the M5 timeframe when the market starts to move in the opposite direction it has been pushing, mean reverting the move that just occurred. The logic for the strategy is as follows:

1. Every time a candle closes on the current timeframe the EA is running on we take a reading of the RSI on the higher timeframe.

2. If the RSI reading is above or below the set levels we set the RSI trigger to long or short and wait for an entry signal.

3. When price opens above/below the MA we have set the EA enters a trade.

 

ADR Reversal

The ADR reversal strategy takes advantage of strong intraday price movements and is designed to get in on the pullback of the move. The logic for this strategy is as follows:

1. We wait for price to have pushed above or below the ADR level set and when that candle has closed (on the timeframe the EA is running on which should be M5 or M15 ideally) we set a trigger to enter a trade.

2. We then wait for the entry signal which is a candle opening one side of our moving average trigger and closing the opposite side. So for a long the open is below the MA and the close is above.

3. The trade is then entered.


Main Functionality:

  • Fully automated trading of RSI based mean reversion strategy.
  • Fully automated trading of ADR based mean reversion strategy.
  • Settings to fine tune each of the above strategies based on your requirements.
  • Simple, configurable entry condition using any moving average to trigger trades when strength is detected in the direction the strategy will trade.
  • Manual trade buttons to take initial entries or place manual additional trades in any existing position as well as close out trades.
    (Use these to trade any strategy and let the EA automatically turn trades that don't work into position trades).
    v1.2 - Buttons now work in the strategy tester too!
  • Perform automatic drawdown control (scaling out of losing trades) as they hit specific percentages in drawdown on your account.
  • Perform aggressive drawdown control (full size trades with stop losses) when your total position hits a specific percentage of your account in drawdown.
  • Total control over the minimum distances between trades in each position and the lot size increment (if required) for additional trades.
  • Risk auto calculated based on percent of your account size or a fixed lot size.
  • Individual exit targets based on a percentage of your account for individual trades, positions in a single direction and all trades open on each instrument traded.
  • Trade time filter to ensure no trades are taken during swaps where high spreads occur.
  • Can trade on any timeframe using the RSI mean reversion strategy (M5 timeframe recommended for ADR strategy)

EA Functionality & Logic:

The EA monitors the market for extended conditions on RSI or ADR depending on the strategy you are trading and will then, once the conditions for a trade are met, monitor the timeframe it is running on for an entry into the market. The entries are all taken using a moving average on the timeframe the EA is running on. e.g. if you run the EA on the M5 timeframe it will take a trade when the price closes above or below the MA you set in the inputs on that timeframe. The moving average entry logic is that price needs to open above the moving average and close below it to take a short entry and the opposite for longs. The EA monitors the last candle closed.

Recommended Setup For The EA:

As with all EAs it is advisable to have the EA running on a machine that is left on 24/7 so the EA can work constantly and monitor the market for you. It is recommended to run the EA on the M5 timeframe for the ADR strategy and if you are trading using RSI it is advisable to also use M5 or M15. The EA enters the market using a moving average as the entry signal and that is on the timeframe it is running on. Bear in mind if you set the EA to manual mode where it uses the trading buttons only, it will still manage any entries you take with the buttons on the version of the EA running on your VPS/trading PC. Run each strategy you trade on a seperate terminal and seperate trading account so the EA doesn't not get confused with multiple entries using multiple strategies on the same account/terminal. This is best practice for all trading.

My setup: I have multiple terminals running on my own VPS, each terminal is logged into a different trading account and each account is only running one strategy. This way I know exactly what is and is not working at any time. Each terminal has every chart I want to trade opne (all FX pairs in my case) and the EA is set on each chart on the M5 timeframe and will auto enter for me based on RSI or ADR depending on which acocunt it is.
On my trading PC that I use for analysis in my office I also have the EA running on a chart but set to "button trading only" mode. This means I can manually add trades into a position and then the EA running on that chart on my VPS will take over, adjust the next entry level and lot size for me.

Inputs for EA:

Button trading ONLY (disables ALL other functionality below) - When this is set to TRUE there will be no auto trading done by the EA on the chart you have the EA loaded onto. This includes new entries with RSI or ADR and additional enries, no drawdown control, aggressive drawdown control or closes of trades in profit. The idea behind this button is as follows:
The EA should be set on a VPS on every instrument you want to trade with it. You can set the EA on that machine to have button trading set to false (default) and it will then trade automatically for you with whatever auto strategy settings you have setup. So if you have RSI or ADR entries set to TRUE (next inputs down) the EA will take initial trades and additional trades for you automatically. It will also get you out of the positions and do DD control etc as you have it setup in the inputs.
If you have NOT set the EA to take auto entries on RSI and ADR it will still kick in and trigger additional entries for you and do DD control and exit in profit based on any trades you take with the manual buttons.
The manual buttons can also be used on your local terminal OR VPS to take your own manual trades whenever you like even if there are existing trades open on an instrument, the EA will automatically re-calculate the next trade entry to scale into after this manual trade is taken.

BUY BUTTONS - The buy buttons will initiate an instant market buy/sell trade at the next correct lot size. If this is an initial entry into the market it will use either fixed lot or percentage risk as you have set in the risk inputs covered a little further down. If this is an additional entry into a position the lot size will be the next correct lot size to take based on the lot size multiplier used and whether the EA is to use an aggressive entry or not. You cannot over-ride the lot sizing as this is handled by the EA.

PENDING BUTTONS - Logic for these buttons is the same as above for sizing but it will place a pending order at either the high or low of the current candle + an offset which you can specify in the inputs towards the bottom. This is ideal if you are looking to add a new trade but price has not got to the next trade entry level yet.
IMPORTANT: The pending entries will also trail with price as the market moves. This is designed so when you take a pending trade on your chart the EA running on your VPS will then take over trailing that pending order for you. So if you enter a pending order short and price keeps pushing up the EA will delete your pending order and then re-place it at the next candle low and the opposite for longs. This is designed so if you want to enter short and price pushes up you will get the best possible entry you can rather than waiting for price to push all the way back down to where you initially wanted to enter. You can manually delete the pending orders and the EA will then ignore them if you no longer want them.
NOTE: If you have the EA running on a VPS and also on a local terminal you use for analysis the EA will trail your pending orders on both VPS and local machine, just be aware of this if using different timeframes on your VPS and local machine!

CLOSE BUTTON - This will close ALL open trades on the currency pair you are currently on only.

--- AUTO STRATEGY ENTRY --- (USE ONLY ONE)

It is strongly recommended to trade only one strategy on an account. If you set both conditions to true and they are both met the EA will take 2 trades and may not function as you intend as it will double up the first entry.

ADR reversal strategy - When set to TRUE the EA will automatically take trades in line with the ADR reversal strategy based on whatever ADR level you have set in the inputs below.

RSI mean reversion strategy When set to TRUE the EA will automatically take trades in line with the RSI mean reversion strategy based on whatever ADR level you have set in the inputs below.

Take auto trades short (MT5 VERSION ONLY) - When true the EA will take short trades. If you would like to only trade long set this to false.

Take auto trades long (MT5 VERSION ONLY) - When true the EA will take long trades. If you would like to only trade short set this to false.

NOTE: The above long and short inputs are for MT5 only. The MT4 version of Metatrader has this functionality built into the EA system in the common tab when you look at the EA inputs.

--- RISK --- (USE ONLY ONE)

Fixed lot size to use (0 = disable) - Input here the initial lot size you would like the EA to use. This will be used for the first trade taken either manually with the trading buttons OR any auto strategy you have enabled.

Percent to risk over 1 ADR movement (0 = disable) - Input here the percentage of your account you would like to risk on the initial trade. This will be calculated using a fake stop loss placed 1 X ADR away from the entry.

--- ADDITIONAL TRADE ENTRY SETTINGS ---

Lot multiplier for add on trades - This will increase/decrease the lot size of the add on entries taken in each position by the multiple you enter.

Distance between trades (percent of ADR) - The distance as a minimum between each trade in a position. The is a multiple of the ADR (average daily range) of the instrument.

--- EXIT TARGETS --- (as percent of balance)

Single trade target (0=disable) - This is the percentage of your account you want to target if there is just one single trade taken. This is a "one shot" trade where the price moves in your favour without requiring additional entries.

Multi trade (position in single direction) target (0=disable) - This is the percentage of your account you want to target for a position (more than one trade in the same direction). 

Multi trade (long & short combined) target (0 = disable) - This is the percentage of your account you want to target if all combined trades (longs and shorts) get into profit.

--- DRAWDOWN CONTROL SETTINGS ---

Perform drawdown control automatically - If set to true the EA will automatically scale out of your trades when they hit a percentage in drawdown which you set below.

Percent of account for single trade to start dd control - This is the percent of your account you want to start partially closing the individual trades at. This is done per trade and not on combined positions.

Percent of trade size to close out - This is the percent of the trades lot size you want to close out when the drawdown target you set above is hit. e.g. if you have a trade with 0.50 lot size and elect to close out 50% of it the EA will close 0.25 lots.

--- AGGRESSIVE DRAWDOWN CONTROL SETTINGS ---

Take aggressive drawdown control trades - If set to true the EA will attempt to get out of a position using aggressive drawdown control. This will make the EA take the next trade using a percentage of the total lots you have open and it will use a traditional stop loss placed 1/2ADR away from the entry price, this allows the trade room to breathe. You can manually adjust the stop loss if required once the EA has placed it for you. The idea of these trades is to get you out of the positino quickly using a move in your favour.

Percent of open lot size to use for aggressive positions - This is the percent of open lots the EA will use to place the aggressive DD control trade. If you have 4 trades open totallying 1.00 lot and the setting is to use 50% then the next trade will not use the normal lot scaling system and enter a trade at 0.50 lots (50% of the total open lot size).

Percent of account in DD to start aggressive dd control - This is the percentage of your account balance you would like the EA to start doing aggressive DD control entries. This if the total drawdown on this one position (instrument).

--- RSI MEAN REVERSION STRATEGY SETTINGS ---

The RSI strategy is designed to use a higher timeframe RSI as a market condition and then an entry on a lower timeframe when the market is stretched or extended. The RSI reading is updated every candle on the lower timeframe using the settings below and works on the current candle on the timeframe selcted.

RSI period - The RSI period to use for the RSI strategy

RSI type The RSI type to use for the RSI strategy

RSI timeframe The timeframe to monitor for RSI extensions with the RSI strategy. This would typically be a higher timeframe than the EA is trading on but you can also use the same timeframe although entries will be harder to achieve.

RSI high trigger The RSI high level for entering short trades with the RSI strategy

RSI low trigger The RSI low level for entering short trades with the RSI strategy

--- ADR REVERSAL STRATEGY SETTINGS ---

Percent of ADR to take trades - The percent of ADR price must have moved today for the ADR reversal strategy to start monitoring for trade entries.

--- MA ENTRY SIGNAL SETTINGS ---

The EA uses a very simple entry method to enter trades based on a moving average. This is a proven method of identifying strength and weakness over a short period of time and you can fine tune it using these inputs.

MA method - The MA method you would like to use for entering trades

MA type - The MA type you would like to use

MA period - The MA period you would like to use

--- AUTO TRADING TIMES ---

The EA will only operate between the times set here which should match your brokers candle times. The idea of this input is to stop the EA taking trades or doing drawdown control when there are large spreads in the market, typically around the overnight swaps. You could also use these inputs to only trade specific instruments when there is expected volatility. e.g. only trage GBP pairs from 8am UK time to 6pm when the markets in the UK are open.

Market open time on brokers chart - The start time you want the EA to monitor for trading activity

Stop trading time on brokers chart - The end time to stop monitoring for trading activity

--- MISC SETTINGS ---

Allow multi direction trading (hedging) - If set to true the EA will look for ANY trade that matches the entry critera and scale in accordingly to positions. If this is set to false and there are trades in one direction it will not take trades in the opposite direction until all trades are closed.

Delete objects on chart when EA is removed - Then the EA stops working all drawing is removed from the chart.

Shift text labels forward (candles) - This shifts the text labels drawn at certain lines on the chart either forward or back.

Offset for pending orders - The offset for pending orders that you take manually with the trade buttons and will be above or below the candle high and low depending on direction.

Update data on bar not tick (much faster backtesting) - If set to true this will only monitor for profit and loss every time a candle closes rather than on each tick.
IMPORTANT NOTE: Results here will vary from testing without this set to true and it's advised not to use it for reliable backtesting but can give you a very good indication quickly if a strategy is worth pursuing further. Use this set to false and test at tick level for more reliable results.

Data update interval - Set the time interval between checking for updates.

Export a daily summary to files folder - This will place a csv export file in the files folder of your terminal with various data about the days activites including the open trades, drawdown, ADR readings and account balance information. If you are running on a live account it will be in the MT4 > files folder and if you are running in the strategy tester it will be in the tester > files folder.
NOTE: This only works in live trading in MT5, the MT5 tester is unable to generate exports. If you would like to use that functionality you can download the demo version for MT4 to do that.

Name applied to export file - This is the name that will be used for your export. The format will be [INSTRUMENT] + [NAME]. e.g. if you run a test on GBPUSD and in this input name the file "my test" the exported file will be called GBPUSD - my test.

ADR number to use for ADR calculations - The ADR number used for calculating ADR. This is used in the ADR strategy for initial entries and also for scaling into trades and calculation of lot sizing. 10 is the default but you can test different settings and use this along with the export functionality to see how ADR changes over time.

Show buttons for use in tester - When true you can use the trading buttons in the strategy tester to take trades and close positions out which allows you to test your own strategies you would like to position trade with. 

Show the speed buttons in tester (MT4 ONLY - NOT REQUIRED IN MT5) - When set to true this will display 8 small buttons on the bottom left of the chart when in visual mode in the strategy tester. These buttons will speed up or slow down the strategy tester (8 = fast, 1 = slow) and are designed to give you more control when you have the speed slider set to the default top speed (32) in the strategy tester. This speed is often too fast to manually test your strategy using the trading buttons and gives you more control over the speed in the tester.

Magic Number, (leave default unless multi pair/one terminal) - This is not required and should be left as default unless you are trading on two charts in the same currency but that is NOT recommended as it may cause the EA to operate erratcally. If you would like to trade more than one strategy then it is recommended to use different trading accounts for each strategy.



Share it with friends: