Showing posts with label moving average. Show all posts
Showing posts with label moving average. Show all posts

RobotFX TDI

The TDI expert advisor was designed for traders using the Traders Dynamic Index indicator. This (TDI) is a Metatrader indicator that uses RSI (Relative Strength Index), its moving averages and volatility bands (based on Bollinger Bands) to offer a full picture of the current Forex market situation. Although it might look complicated at first, trading using the TDI expert advisor will prove to be very simple as soon as the indicator's capabilities are understood.
Forex TDI Expert Advisor
Metatrader traders dynamic index expert advisor that can trade with the trend based on the TDI indicator and (optional) moving averages, stochastic and price action.
TDI EA main functions:

  • Identify the trend using the TDI indicator (or moving averages)
  • Enter and close trades based on the TDI indicator (or moving averages)
  • Manage the lotsize, trail the price, restrict trading by days/sessions etc


In the chart above it is displayed one of the general interpretations of the TDI indicator:

  1. The yellow line represents the trend
  2. The trade entry is given by the red/green intersection
There are multiple ways to determine the trend: the yellow moving average slope, its position towards the 50 level or the red/green lines position regarding the yellow line.
Within the EAs settings, there a 3 ways to determine the trend: the yellow slope, the green/yellow position and the price positions towards a moving average. The trade entries are given by a multitude of criteria that can be individually disabled, as explained further in the settings section. Beside the trend settings and the trade entry criteria, trading signals can also be filtered by the Stochastic's oversold/overbought levels or a swing zone confirmation (this the price distance from the latest highest high or lowest low). It is worth to mention that both the trend detector or the signal confirmation can be disabled, leaving the EA trade only based on the TDI settings.
In the chart above, the TDI EA determines the trend by MA Trend and uses Stochastic as the confirmation filter. The entries are triggered by the TDI's red and green moving averages. As seen in the picture there are at least six TDI signals ignored because of the confirmation criteria. In the end, the Stochastic rises above the overbought level (60) and the TDI red line drops below the red line (entry signal) - only then the EA is allowed to open a sell, that later closes when the green line crosses the red one.
In the chart above, the TDI EA determines the trend by MA Trend and uses Stochastic as the confirmation filter. The entries are triggered by the TDI's red and green moving averages. As seen in the picture there are at least six TDI signals ignored because of the confirmation criteria. In the end, the Stochastic rises above the overbought level (60) and the TDI red line drops below the red line (entry signal) - only then the EA is allowed to open a sell, that later closes when the green line crosses the red one.
In the chart above the TDI EA is instructed to follow the trend based on the MA Trend moving average (sell below the MA) and open trades based on the TDI green moving average slope; when the green line falls instead of rising, the EA opens a short trade. If there'd be an uptrend, the EA would open a buy instead of a sell whenever the green line would start rising. A maximum number of three trades is allowed. The exit criteria is the intersection between the TDI's green and red lines. Notice how the latest basket of three sells closed when the exit signal happened. Although it might look like it is a loss in profit due to the first trade closing in negative profit, this is compensated by the profits from the other two trades, because the EA is set to close trades only when their profits reach the Minimum Profit. In this case, this is set to a positive value, so actually the basket of trades closed in profit.
In the chart above the TDI EA is instructed to follow the trend based on the MA Trend moving average (sell below the MA) and open trades based on the TDI green moving average slope; when the green line falls instead of rising, the EA opens a short trade. If there'd be an uptrend, the EA would open a buy instead of a sell whenever the green line would start rising. A maximum number of three trades is allowed. The exit criteria is the intersection between the TDI's green and red lines. Notice how the latest basket of three sells closed when the exit signal happened. Although it might look like it is a loss in profit due to the first trade closing in negative profit, this is compensated by the profits from the other two trades, because the EA is set to close trades only when their profits reach the Minimum Profit. In this case, this is set to a positive value, so actually the basket of trades closed in profit.
In this example, the EA is instructed to trade with the trend (green candles = buy) and to enter trades when the traders dynamic index green moving average rises above the TDI red moving average. The trade exits when the Stochastic leaves its overbought area, set for this example at 95.
In this example, the EA is instructed to trade with the trend (green candles = buy) and to enter trades when the traders dynamic index green moving average rises above the TDI red moving average. The trade exits when the Stochastic leaves its overbought area, set for this example at 95.
This trade was accomplished following the trend (notice the red candles - this means that the price is below the trend moving average). The swing zone confirmation is used and the trade entry signal is the TDI green MA crossing the upper volatility band (blue) down. For the simplicity of this explanation, the same signal is used to exit the trade. When the TDI green moving average is crossing the lower volatility band, raising above it, the EA closes the trade.
This trade was accomplished following the trend (notice the red candles - this means that the price is below the trend moving average). The swing zone confirmation is used and the trade entry signal is the TDI green MA crossing the upper volatility band (blue) down. For the simplicity of this explanation, the same signal is used to exit the trade. When the TDI green moving average is crossing the lower volatility band, raising above it, the EA closes the trade.

In this chart, the EA does not use the trend detector or the confirmation and it is set to open and close trades when the TDI green line crosses the volatility (blue) bands. For a better visual, the entries have been also marked with the white vertical lines, while the exits are black. Trading this signal (green/blue cross) may allow the trades to capture the big moves in the market. When the TDI's green moving average falls back, crossing from above the higher volatility band, the EA places a short order. When the green line crosses the lower volatility band from down to up, the EA places a long order. In this example, the first two trades are closed by the trailing stop, while the third is closed by the 'Close trade/s at opposite signal' - and after closing it, the EA places the next order which this time is a buy.
In this chart, the EA does not use the trend detector or the confirmation and it is set to open and close trades when the TDI green line crosses the volatility (blue) bands. For a better visual, the entries have been also marked with the white vertical lines, while the exits are black. Trading this signal (green/blue cross) may allow the trades to capture the big moves in the market. When the TDI's green moving average falls back, crossing from above the higher volatility band, the EA places a short order. When the green line crosses the lower volatility band from down to up, the EA places a long order. In this example, the first two trades are closed by the trailing stop, while the third is closed by the 'Close trade/s at opposite signal' - and after closing it, the EA places the next order which this time is a buy.

RobotFX TDI Settings

RobotFX TDI
Since the TDI expert advisor uses the TDI indicator, all the indicator's settings can be found in the EA's settings.
  • Enter your Client Email - fill this with your email IF you are using a paid version of this EA on a LIVE account
  • Sunday to Friday - Indicate whether or not you want to trade each specific day.
  • NFP Friday - Whether or not you want to trade on volatile Non-Farm payroll Friday, first Friday of the month.
  • Thursday Before NFP - Whether or not you want to trade on the Thursday before the volatile Non-Farm Payroll Friday.
  • Christmas Holidays - Whether or not you want to trade during a custom defined period in December, during the low liquidity of the Christmas Holidays.
  • Christmas Holidays Start (20th Dec) - This is the day in December you will start to filter out, as the beginning of the Christmas Holiday. Default is 20th, you can enter any date instead of 20.
  • New Years Holidays - Whether or not you want to trade during a custom defined period in the beginning of January, the low liquidity of the New Years Holidays.
  • New Years Holidays End (5th Jan) - This is the day in January you stop the filter, the end of the New Years holiday period. Default is 5th January, you can enter any date instead of 5.
  • Auto GMT Offset - Indicate if you want auto GMT offset turned on or off. Turn off during back testing.
  • Manual GMT Offset - If AutoGMTOffset is turned off, indicate what your manual GMT offset would be.
  • Enable Trading Session - Set to false to ignore the below trading sessions, or to true to trade within the sessions.
  • Trade Tokio Session - Whether or not to trade Asian session.
  • Start Tokio Session - Do not trade before this time. If you include Australia, Sydney starts at 21.00, and Tokyo starts at 23.00 GMT.
  • Finish Tokio Session - Do not trade after this time. Defaulted at 07.00, the start of the European Session. Note: The Tokyo session continues on for 1 more hour to end at 08.00, so if you are interested in trading this session in its entirety, you should indicate from 23:00 to 08.00.
  • Trade London Session - Whether or not to trade European session
  • Start London Session - Do not trade before this time. Defaulted at 7.00 GMT, the start of the London Session, though Germany does not open till 08.00.
  • Finish London Session - Do not trade after this time. Note: The European Session continues till 16.00, so if you are interested in trading this session in entirety, you should have your defaults from 7.00 to 16.00.
  • Trade New York Session - Whether or not to trade the New York session.
  • Start New York Session - Do not Trade before this time. Note that the NY stock exchange does not open till 9:30 EST, or 13.30 GMT, and the first hour and half (from 9:30 to 11:00 EST, or 13:30 to 15:00 GMT) is heavy trading, lots of liquidity.
  • Finish New York Session - Do not Trade after this time.
Lotsize, Money etc.
  • Buy Trades - Enable/disable long trades
  • Sell Trades - Enable/disable short trades
  • Lotsize - set the lotsize, as fix amount or equity percent
  • Enable Money Management - set to true to use the Lotsize as equity percent instead on fixed amount
  • Stop Loss - set the stoploss in pips
  • Take Profit - set the take profit in pips
  • Slippage - the slippage in pips
  • Minimum Profit - set the minimum profit needed to close a trade or a basket; this applies to the following trade closing criteria:
- Close basket of opposite trades when Minimum Profit is reached
- Close trade/s at opposite signal
- Close trade/s at same signal
- all the other Close at ...
MA Indicator Trend
  • Settings for the moving average indicator (MA Trend) that can be used to determine the trend in enabled in the Determine the Trend by
MA Indicator Signal
  • Settings for the moving average indicator (MA Signal) that can be used to enter a trade in enabled in the Trade by MA Signal price cross and/or Close at Price/MA Signal cross
Stochastic Indicator
  • Settings for the stochastic indicator if enabled in the Confirm Entry by
TDI Indicator
  • Settings for the Traders Dynamic Index that can be used to determine the trend, the trade entries and also to exit opened trades
  • RobotFX TDI Indicator Name (without .ex4) - do not change this, as this is the name of thee RobotFX TDI indicator that is needed by the expert advisor to function properly
Determine the Trend by
  • MA Trend Indicator - if selected, it establishes an uptrend if the price is above the MA Trend, and a downtrend if the price is below the Ma Trend
  • TDI Green/Yellow position - if selected, the EA considers an uptrend when the TDI green moving average is above the yellow line, and a downtrend when it is below it
  • TDI Yellow slope - if selected, the TDI's yellow moving average slope is used to determine the price trend; rising slope means an uptrend, falling is a downtrend
  • No Trend - disables the trend detector
Confirm Entry by
  • Stochastic Overbought/Oversold - if chosen, the EA will sell only when the price is in the Stochastic's overbought area, and buy only if oversold
  • Swing Zone Price Position - if chosen, the EA will enter a trade only if the price is at a distance of at least the Pips Away From Last Swing (in pips) from the latest highest high or lowest low (depending on the trend) that happened during the latest Swing Zone Bars (candlesticks)
  • No confirmation - disables the confirmation filter
Entry Conditions
  • Settings for the EA to enter a trade based on the TDI moving averages and/or the MA Signal
Exit Conditions
  • Break Even/Trailing Stop - sets the breakeven and the trailing stop in pips
  • Trailing Step (pips) - sets the trailing step in pips; set to a very high value if there is no need to trail the price
  • Trailing Buffer - buffer, in pips, used by the stoploss
  • Close at ... - Various settings for the EA to exit trades based on the TDI moving averages and/or the MA Signal
  • Close at opposite signal - Close opened trades whenever an opposite signal occurs
  • Close at same signal - Close opened trades whenever a similar signal occurs
  • "Close at..." obeys the Minimum Profit - Set to true and the EA will close the trades only if their profits reached the Minimum Profit
  • Example: if you instruct the EA to close the opened trades if an opposite trades signal occurs (Close at opposite signal = true), and the "Close at..." obeys the Minimum Profit is set to true, the EA close the opened trade/s whenever there is an opposite signal, but only if its/their profit already reached the Minimum Profit.
  • Close basket of opposite trades when Minimum Profit is reached - if there are both long and short trades on the same chart and this is enabled, the EA will attempt to close all as soon as their cumulative profit reaches Minimum Profit
Loss management
  • Enable Martingale - enable/disable the next trade's lotsize multiplier, if the previous trade closed with negative profit
  • Martingale Multiplier - if the above scenario occurs, the next trade's lotsize will be equal to the previous trade's lotsize multiplied by this number
  • Retry Martingale - how many times to enable the multiplier, if the next trades are also negative profit; set this to a realistic number, because increasing the lotsize over and over might lead to your account hitting a margin
  • Trades' Comment - used for monitoring opened/closed trades
  • Magic Number - set a different number if you want to use the EA multiple times on the same chart/pair

Watch how RobotFX TDI works

RobotFX Heiken Ashi

The RobotFX Heiken Ashi expert advisor is an all-in-one trading solution for traders trading with the trend, so we can safely say that the Heiken Ashi expert advisor is a trend trader. It can detect the trend - if the trader chooses so - and trade accordingly, meaning that the EA will only buy if the trend is up and/or only sell if the trend is down. The trend itself is decided by the Heiken Ashi color on the higher or current timeframes. It should be noted however that the trend detector can also be disabled and that the Heiken Ashi EA can be allowed to trade by simply following the Heiken Ashi signals on the current timeframe.

To better understand better how this trend trader with hedging abilities works, please take a look at the picture below.
RobotFX Heiken Ashi
Heiken Ashi expert advisor with advanced trailing options (Trailing Stop)
In the trading chart above, the Heiken Ashi is in uptrend on H1 and H4, meaning that the Heiken Ashi color is green (up) on both of these timeframes.
The type of Heiken Ashi candles can be customized by the trader, who has the possibility to set the moving averages' method (smoothed, exponential, simple, linear), period or shift, for the trend detection as well as trade entry signals. When one or both trend detectors are used, the uptrend or downtrend is determined by the Heiken Ashi color on their respective timeframes. When any of the Trend A or Trend B are enabled, they are displayed in the lower-left corner of the chart. Note that if the trader enabled both these trend detectors (A and B), the EA will consider entering a trade only if they both coincide and it will ignore trading signals if one trend is up while the other is down.

When the Heiken Ashi candles change their color from down (red) to up (green) the EA will open a long trade; opposite happens for short trades. This entry signals can be validated by another safety feature - if the trader wants to use it - that is the swing zone confirmation. This swing zone is also used by both the Fluid and the NonLagMA expert advisors, and it has the purpose to ensure that the EA will not open buy trade when higher-highs are formed, or sell trades when the price forms a lower-low.

After a trade is opened, the Heiken Ashi EA has the ability to place a classic stop-loss and/or tkae-profit, and also trail the price using various methods (using the Tailing Stop EA algorithm) including trailing by Heiken Ashi candles, moving average, PSAR, ATR and others. This Heiken Ashi EA can even martingale if the previous trade closed in negative profit. Below are some examples of trades opened and closed with different trailing stop options.
Heiken Ashi EA trailing the price by candlestick

Heiken Ashi Expert Advisor
Heiken Ashi EA trailing the price by Fractals indicator

Heiken Ashi Expert Advisor
Heiken Ashi EA trailing the price by HA indicator

Heiken Ashi Expert Advisor
Heiken Ashi EA trailing the price by Moving Average indicator

Heiken Ashi Expert Advisor
Heiken Ashi EA trailing the price by HA indicator

Heiken Ashi Expert Advisor
Heiken Ashi EA trailing the price by PSAR indicator
Money management is also possible by setting the EA to use a percentage of the equity as lotsize, or by using a fixed lotsize.

RobotFX Heiken Ashi EA settings

Heiken Ashi Settings
Heiken Ashi indicator is used to spot the trend and enter/exit trades
Take your time to understand what each of these settings does. After you’ve done that, try to optimize the default settings based on the pairs you are trading, the time-frame you trade on, your equity and initial LotSize etc.
  • ClientEmail - fill this with your email IF you are using a paid version of this EA on a LIVE account
  • Enable lotsize management - set to true to automatically calculate the lotsize based on the “Percentage of equity to trade”
  • Percentage of equity to trade - see above
  • Lot Size - trade lotsize if “Enable lotsize management” set to false
  • Stop Loss (pips) - stoploss value set in pips
  • Take Profit (pips) - takeprofit value set in pips
  • Maximum orders allowed - how many orders is the EA allowed to have opened at the same time, on the same chart
  • Slippage (pips) - distance allowed for the price to move from the open/close/trail order to the execution
  • Close trades at opposite Heiken Ashi signal - whether or not to close opened trade/s if the Heiken Ashi candle changes color
  • Do not close at Heiken Ashi if negative profit - if above is set to true and this to false, the EA will close the trade/s regardless of the profit. Set to true to close only if the profit is positive
  • Close trades at opposite Heiken Ashi trend+signal - whether or not to close the trade/s if the trend changes and there is a buy or sell signal, depending on the trend
  • Close opened winning trades if same signal occurs - if another trade signal occurs and existing trade/s is positive, the EA can close it before starting a new one (if instructed to do so)
  • Do not close trades (if same signal) if negative profit - if above is set to true but the profit of the trade/s is negative, the EA can be instructed not to close the trade. Set to true to close an existing trade only if there is profit at the moment of changing the candle color
  • Display chart info - whether or not to show information on the chart
  • Information color - the chart info color Trades' comment - assign a comment for trades opened by this EA, for easy monitoring
  • MagicNumber - assign a unique number to trades opened by this EA so they can be managed by other EAs or allow this EA to manage trades opened by other EAs
  • Open Next Trade (bars) - this the number of bars/candles between a previously opened trade and the next signal, and it is used a filter to restrict the EA from opening too many trades in a small interval
  • Heiken Ashi signal & trend settings - choose the Heiken Ashi signal settings
  • Number of bars/candles to consider the swing - choose the number of candles to consider the “swing zone” used to confirm the entry signals
  • Pips away from the last swing - set to 0 pips to deactivate the swing zone. 
Example: when using a “Pips away from last swing” of 30 pips the EA will enter a trade when the Heiken Ashi signal changes color AND the price (at that moment) is at least 30 pips away from the swing zone upper level (when buying) or lower level (when selling). This should be used to reject buy signals that might occur on overbought areas or sell signals that happen in oversold areas.
  • FOLLOW TREND A / FOLLOW TREND B - if set to true, the trader can also choose the Heiken Ashi settings used to detect the trend. Both, one or none of these option can be used.
  • Enable Martingale - whether or not to multiply the next trade’s lotsize if the previous one/s closed in loss
  • Martingale if sum of last 2 orders negative - whether or not to consider the lotsize of the last 2 closed trades instead of only the last 1
  • Martingale multiplier - lotsize multiplier is martingale is enabled
  • Martingale consecutive trades - maximum number of times a trade lotsize is multiplied, if martingale is enabled and the loss not yet recovered
  • Price Trailing Method - choose how the EA trails the winning trade/s
  • Trailing Step (pips) - trailing step used to trail the price
  • Trailing Stop Buffer (pips) - trailing buffer used to trail the price
  • Minimum Profit if Trailing Stop Points - the trailing stop will be placed this distance away from the opened price
  • Trail from Breakeven - whether or not to start trailing only if the price is in profit. Set to false to trail the price as soon as the trade opens, if that is allowed by the trailing option
  • Trailing indicators settings - settings for some indicators used to trail the price (if that option is chosen to trail). For the Heiken Ashi trailing option, the same settings with the signal are used
  • Print more logs (disable for normal use) - set to true for testing and for when something doesn’t seem to work as described. Careful as it will write too many logs and slow down your computer

Watch how RobotFX NonLagMA works (video)

RobotFX Trailing Stop

The Trailing Stop expert advisor has been created to help traders manage winning trades and baskets of trades, by trailing the price once it goes in the trader’s favor. The main idea that led to this Trailing Stop EA was that many traders are not so good at managing winning trades. While sooner or later every trader learns how to spot the trend, when to enter a trade, what forex news to trade and so on, many traders are closing their trades when they shouldn’t.
It often happens that traders get too greedy or too scared and so they poorly manage an opened trade. Unfortunately, managing an opened trade is much harder than opening a trade. When this happens, the winning trade is usually closed:
  • Too late, after the profit decreased considerably or even became negative profit (loss)
  • Too early, before the trade’s profit will reach its highest amount possible
RobotFX Trailing Stop
By trailing the price with the stop-loss, traders ensure that profit has been locked at certain levels
Using the RobotFX Trailing Stop expert advisor for Metatrader, traders can cash in safer without having to continuously monitor their trades.
So the purpose of the Trailing Stop EA is to eliminate those frustrating situations when you close a trade earlier than you should and the price continues to go in your favor, or when you wait for to long and the price reverses, so your winning trade becomes a losing trade.
The expert advisor trails the price using various methods:
  • After a number of pips or points (the classic trailing method)
  • At the last candlestick’s end (+ a buffer in points)
  • Trails using Metatrader’s indicators: MA (moving average), PSAR (parabolic stop and reverse), fractals, ATR (average true range)
  • Trails using a percentage of the profit
Below are few examples how the EA trails the price using these methods.
ATR Trailing Stop
Trail the price using the ATR indicator

Chandelier Trailing Stop
Trail the price using the previous candle

Pips Trailing Stop
Trail the price using a fix amount of pips

Fractals Trailing Stop
Trail the price using the Fractals indicator

Moving Average Trailing Stop
Trail the price using a moving average

PSAR Trailing Stop
Trail using the PSAR indicator

RobotFX Trailing Stop Settings

It is important to specify that the trader has the ability to change (within the expert advisor’s settings) the indicators values as well as the timeframe they are applied to. Also, that the expert advisor can trail multiple trades (basket) of the same kind.
Trailing Stop Settings
Trailing Stop Expert Advisor Settings

  • ClientEmail - if you already purchased this EA and want to trade it live, enter your email here
  • Virtual Trailing - enable/disable virtual trailing
  • Trailing Method - choose the preferred trailing method
  1. Candlestick (aka chandelier) - trails the price using the last candle, placing the stoploss at the end of this candle
  2. Fractals - trails the price using the fractals indicator, placing the stoploss at the fractal indicator level
  3. ATR - trails the price using the ATR indicator, placing the stoploss at the ATR indicator level
  4. Parabolic - trails the price using the PSAR indicator, placing the stoploss at the PSAR indicator level
  5. MA - trails the price using the moving average indicator, placing the stoploss at the MA indicator level
  6. Profit % - trails the price using the profit’s percentage (example: if profit is 500 pips and Profit % = 50, the stoploss will be placed at 50%*500, meaning 250 pips)
  7. Points - trails the price using the points; use with Minimal Profit if Trailing Stop Points below (example: when profit reaches Minimal Profit if Trailing Stop Points, trailing will start and the stoploss will be placed)
  • Trailing Stop Buffer - the stoploss will be placed at this distance from the signal (MA, PSAR, fractals etc.)
  • Trailing Stop Step - the stoploss will be moved when the price will move this distance from the previous stoploss
  • Minimal Profit if Trailing Stop Points - trailing will start after this amount is passed
  • Trailing Stop from Breakeven - the stoploss will be placed and trailing will start only after price reached the breakeven level
  • MagicNumber to Trail (-1 all) - if you want to trail trades opened by other EAs, enter their MagicNumber here
  • Indicator Settings - set the values for the indicators used to trail the price, if any of them is chosen as Trailing Method
  1. Timeframe - the indicators’ timeframe
  2. ATR Period - Average True Range period settings
  3. Parabolic Step - PSAR indicator step settings
  4. Parabolic Maximum - PSAR indicator maximum settings
  5. MA Period - Moving Average period settings
  6. MA Method - Moving Average method settings
  7. MA Price - Moving Average price settings
  8. Profit Percent - profit percent settings
An expert advisor that can trade and trail all the above plus Heilen Ashi is the RobotFX Heiken Ashi EA.

Watch how the RobotFX Trailing Stop EA works