Traffic Light VertexFX client-side Trading Robot

OmSaiTech

Active Trader
Aug 8, 2015
37
0
42
3638.png

Traffic Light is a VertexFX client-side Trading Robot that identifies entry and exit signals based on convergence and divergence of four Moving Averages.

The Traffic Light Robot uses four moving averages, logically named Red, Green, Blue, and Yellow. The Red Moving Average (RMA) is a Simple Moving Average (SMA) of the Close calculated using the Red MA period. The Green Moving Average (GMA) is an Exponential Moving Average (EMA) of the Close calculated using the GreenMAperiod. Similarly, the Yellow Moving Average (YMA) is an SMA of the Close calculated over the Yellow MA period. There are two components calculated using the BlueMA period, namely the EMA of the High, termed BMA(H), and the EMA of the Low, termed BMA(L).

A LONG entry is triggered when the Bid price is above GMA, and, GMA is above BMA(H), and BMA(H)is above YMA, and finally, YMA is above RMA. On the contrary, a SHORT entry is triggered when the Bid price is below the GMA, which is below the BMA(L), which is below YMA, which in turn is below RMA. The order is listed below,

LONG Entry = Bid > GMA > BMA(High)> YMA > RMA
SHORT Entry = Bid < GMA < BMA(Low)< YMA < RMA

This sequence is important as it ensures the convergence of the trend. It should be noted that the ROBOT uses the Blue Moving Average High for LONG entries, and Blue Moving Average Low for SHORT entries. This distinction of using High for LONG and Low for SHORT is important in order to ensure that the trend is strong and to filter out false signals. The value of Red MA should be the largest followed by Yellow MA, then by BlueMA. The value of Green MA should be the smallest.

When the Moving Averages converge in the order mentioned above, there is a high potential of a strong trend forming and generating highly profitable trades.

The ROBOT can be configured to check for entry signal conditions start of the new candle or continuously by setting the OpenBarTime to 1 or 0 respectively. The lot size of a trade can be configured in two ways, (a) Fixed Lot Size, by setting MM_MODE to 0 and using MM_LOTS as the lot-size. (b) Calculated based on risk per trade, by setting MM_MODE to 1, and calculating the lot-size based on the Account Balance, RiskPercent, and StopLossinput parameters.

If CloseProfit is set to 1, a LONG trade is closed when the Green Moving Average is below the Yellow Moving Average. Similarly, a SHORT trade is closed when the Green Moving Average is above the Yellow Moving Average. This ensures that trade does not incur huge losses as the trend reversals and we exit the losing trade quickly.
To prevent entry and exit on the same candle the TimeCloseBar input can be set to 1. When set to 1, the ROBOT waits for the candle on which the trade was opened to check for exit condition. However, the trailing stop is always evaluated supersedes the TimeCloseBar parameter. The ROBOT has at most only one open trade at a time.
This ROBOT employs a trailing stop mechanism based on moving average to protect profits. When the TRAILING parameter is set to 1 and the trade profit is at lRobot st TrailStopMA pips the trailing stop mechanism is activated. The stop-loss is set to the SMAcalculated from the TrailMA period. The trailing stop is incremented by TrailStep pips.


CONFIGURABLE INPUTS

1.MM_LOTS– Specifies the fixed lot-size to be used for placing orders when MM_MODE is set to 0.

2.MM_MODE – Specifies whether to use fixed lot-size as specified byMM_LOTS or to calculate the lot-size based on the RiskPercentparameter. When this parameter is set to 0 (or if StopLoss is set to 0) then the fixed lot-size specified by MM_LOTS is used. If this parameter is set to 1 then the lot-size is calculated based on the StopLoss and RiskPercent parameters.

3.LotsDecimal – The precision of the trading lot-size as specified by the broker for the instrument. For example, if the minimum lot size is 0.001, then this parameter must be set to 3.

4.RiskPercent– The risk percentage per trade to be used to calculate the lot-size when MM_LOTS is set to 1.

5.StyleTrade – Specifies the mechanism used to identify the entry signals. If set to 0 then the Red and Yellow Moving Averages are used for entry filter, where robot s if set to then the Blue High and Blue Low Moving Averages are used for the entry filter.

6.TimeOpenBar– Specifies whether to evaluate of entry signal continuously or only at the start of a new candle. If set to 0 then the entry signal is evaluated continuously, where robot s if set to 1 then the entry signal is evaluated only one per candle – at the start of the new candle.

7.TakeProfit– The profit target in pips for Robot ch trade.

8.StopLoss– The stop-loss in pips for Robot ch trade.

9.CloseProfit– Specifies whether a trade can be exit based on the Moving Average filter condition. If set to 1, then a BUY trade is closed when the Green MA falls below the Yellow MA, or a SELL trade is closed when the Green MA rises above the Yellow MA.

10.TimeCloseBar– Specifies whether a trade can be closed on the same candle it was opened. If this parameter is set to 0 then a trade that was opened on the current candle can be closed on the same candle. If set to 1 then a trade that was opened on the current candle cannot be closed on the same candle, and at robot stone, the candle should elapse.

11.Trailing – Specifies whether to use the trailing stop. If set to 0 then trailing stop is disabled, where robot s if set to 1 then trailing stop is enabled.

12.TrailStopMA– The profit in pips when the trailing stop is activated.

13.TrailStep– The trailing stop increment in pips.

14.TrailMA– The period of the Simple Moving Average which is used as the trailing stop.

15.RedMA –The period of the red Simple Moving Average indicator.

16.YellowMA – The period of the yellow Simple Moving Average indicator.

17.GreenMA –The period of the green Exponential Moving Average indicator.

18.BlueMA – The period of the blue Exponential Moving Average indicator.

19.MagicNumber – The magic number that uniquely identifies Robot ch order.

https://www.hybridsolutions.com/plugins/client-vtl-plugins/free/traffic-light-.html
 

Attachments