cBots

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
How to install
DescriptionSubmited byDateCategoryPreviewDownloadsCommentsRating
Adaptive Center of Gravity Robot. Based on Adaptive CG Indicator. Similar to Stochastic Center of Gravity. The algorithm references Cycle Period Indicator.   http://ctdn.com/algos/indicators/show/128
14 Jan 2014
Downloads
2194
Comments
1
Rating
0
Download
Symbol: EURUSD Time frame: Minute5 Backtesting period: 01/04/2011-12/01/2014 (almost 3 years) Robot is based on Bollinger Bands indicator which combines moving averages and standard deviation. The main purpose of Bollinger Bands is to provide price range. If you know the range you can buy at minimum price level and sell at maximum price level. Robot is listening to following Bollinger Bands signals: close price is above top Bollinger Bands line. Actions: close long position, open short position close price is bellow bottom Bollinger Bands line. Actions: close short position, open buy position Backtesting report: Balance-equity chart:  
by Quant
12 Jan 2014
Downloads
3772
Comments
2
Rating
0
Download
For an example we use Bollinger Bands.  We assume, that if bargains do not cross the top and bottom strip we are in chaos(weak balance across Nish). Further it is necessary for us to define the leader or a dominant. It depends on band height and  periods of domination. If the strip is crossed, and the given period of domination achieves, it means formation of a direction on growth(buy) or falling (sell).   Using more difficult calculations (in this example they aren't present), we can predict formation of a trend and its size. // ------------------------------------------------------------------------------- // // Simple example with use of "Games Theory". // Vsoft(c). // // ------------------------------------------------------------------------------- using System; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Requests; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC)] public class SampleBreakoutRobot : Robot { [Parameter] public DataSeries Source { get; set; } [Parameter("Band Height", DefaultValue = 1.0, MinValue = 0)] public double BandHeight { get; set; } [Parameter("Stop Loss", DefaultValue = 10, MinValue = 1)] public int StopLossInPips { get; set; } [Parameter("Take Profit", DefaultValue = 10, MinValue = 1)] public int TakeProfitInPips { get; set; } [Parameter("Volume", DefaultValue = 10000, MinValue = 1000)] public int Volume { get; set; } [Parameter("Bollinger Bands Deviations", DefaultValue = 2)] public int Deviations { get; set; } // BB [Parameter("Bollinger Bands Periods", DefaultValue = 20)] public int Periods { get; set; } // BB [Parameter("Bollinger Bands MA Type")] public MovingAverageType MAType { get; set; } // BB [Parameter("Domination Periods", DefaultValue = 1)] public int DominationPeriods { get; set; } // Definition a dominant. private BollingerBands bollingerBands; private int Domination; protected override void OnStart() { bollingerBands = Indicators.BollingerBands(Source, Periods, Deviations, MAType); } protected override void OnBar() { double top = bollingerBands.Top.LastValue; double bottom = bollingerBands.Bottom.LastValue; if ((top - bottom)/ Symbol.PipSize <= BandHeight) { Domination= Domination+1; } else { Domination=0; } if ( Domination >= DominationPeriods) { if (Symbol.Ask > top && MarketSeries.Close[MarketSeries.Close.Count - 2]> MarketSeries.Open[MarketSeries.Close.Count - 2]) { var request = new MarketOrderRequest(TradeType.Buy, Volume) { Label = "SampleGameTheory", StopLossPips = StopLossInPips, TakeProfitPips = TakeProfitInPips }; Trade.Send(request); Domination = 0; } else if (Symbol.Bid < bottom && MarketSeries.Close[MarketSeries.Close.Count - 2]< MarketSeries.Open[MarketSeries.Close.Count - 2]) { var request = new MarketOrderRequest(TradeType.Sell, Volume) { Label = "SampleGameTheory", StopLossPips = StopLossInPips, TakeProfitPips = TakeProfitInPips }; Trade.Send(request); Domination = 0; } } } } }  
by vito
09 Jan 2014
Downloads
1342
Comments
0
Rating
0
Download
Strategy using ZigZag Indicator.  The zigzag is an Indicator that is usually used as a filter of small price momements. http://ctdn.com/algos/indicators/show/157
09 Jan 2014
Downloads
4216
Comments
13
Rating
2.5
Download
Robot based on  crossings between Third Gen Moving Average and Exponential Moving Average. Input: Source Period Sampling Period Moving average type Improvement suggestions are welcome Backtesting 06/03/2013 04/10/2013
09 Jan 2014
Downloads
1496
Comments
4
Rating
0
Download
The algorithm uses Stochastic Momentum Index (SMI). A Buy is created when The SMI crosses above the Buy Line and a Sell when it crosses below the Sell Line. The Buy and Sell Lines are also components of the SMI Indicator.
09 Jan 2014
Downloads
2388
Comments
2
Rating
0
Download
Still under active development and highly experimental. A polynomial regression channel trading system loosley based upon Mostafa Belkhayate's trading system. Uses the BelkahayatePRC and Hull Moving Average custom indicators (versions used are included - please remember to install and compile them and update the inclusion references in the Golden Dragon before compiling the bot). Many additional functions have been included to facilitate fine-tuning. This can be traded on anything from a 1 minute chart upwards. I've found 5-15 minute chart periods tend to work best. Remember to update the two references in this robot before compiling it for the first time.  It will not work if it cannot find the compiled custom indicators. UPDATED to v1.3 - Slight logic change to avoid concurrent martingales. Updated parameter defaults to those which I use as a benchmark starting point when testing new charts (normally 5 minute). Click here to watch a YouTube video of this bot executing a single trade on EURUSD. Parameter Reference Dragon Number - Used to track trades associated with a Dragon instance. Only required if running multiple instances on the same instrument. Assign a unique number to each. [ Default = 1 ] COG Degree - Degree for the polynomial regression centre-of-gravity line. A setting of 1 uses a linear regression. 2-4 produce progressively tighter fitting curves [ Default = 3, Range = 1-4, Typically = 3-4 ] COG Period - Number of bars that the polynomial regression should be calculated over. [ Default = 260 ] 1st Channel Offset - Offset distance for the first (inner) channel lines. These lines may be optionally used as target lines for trades. [ Default = 1.4 ] 2nd Channel Offset - Offset distance for the second (intermediate) channel lines. These lines are used for trade entry selection and may be optionally used as target lines for trades originating on the opposite side of the centreline. [ Default = 2.4 ] 3rd Channel Offset - Offset distance for the third (outer) channel lines. These lines are used for trade entry selection and may be optionally used as target and/or stop loss lines for trades. [ Default = 3.4 ] COG Trade Biasing - When enabled, trades are filtered according to whether the COG is rising (long trades only) or falling (short trades only). [ Default = No ] Adaptive Trade Biasing - When enabled, the maximum permitted number of long and short trades will be automatically adjusted based on performance. If a long trade is lost then the maximum number of long trades will be decremented by 1 and the maximum number of short trades will be increased by 1 (up to the specified maximum), and vica-versa. [ Default = No ] Hull Trade Biasing - Uses a Hull Moving Average to filter trade entry direction. If enabled, will only enter long positions if the HMA is rising, and short positions if it is falling. [ Default = Yes ] Hull Period - Hull Moving Average period in bars. The HMA is used to aid trade entry timing. Long trades are entered when the HMA passes upwards through either of the lowest two channel lines (and price is within the Entry Window distance above the entry line). Short trades are entered when the HMA passes downwards through either of the uppermost two channel lines (and price is within the Entry Window distance below the entry line). Longer HMA periods result in more reliable entry points, but reduced profit per trade due to later entry. [ Default = 5, Typical Range = 4 - 10 ] ATR Filter 1| 2 Period - If both of these are non-zero, then trades will only be opened when the ATR1 value is lower than ATR2. Acts as a volatility filter. [ Default = 0 | 0 ] ATR Filter 1| 2 MA Type - Specify the type of smoothing to be used for each of the average true range indicators. [ Default = Simple | Simple ] Long Trades - Maximum number of long positions which may be simultaneously opened. Higher values increase both profitability and risk. Some markets trade profitably in one direction only. [ Default = 1, Off = 0 ] Short Trades - Maximum number of short positions which may be simultaneously opened. Higher values increase both profitability and risk. Some markets trade profitably in one direction only. [ Default = 1, Off = 0 ] Buy Wait - Minimum number of bars to wait between entering trades. Used primarily to prevent trade "bunching" and manage risk levels. [ Default = 20, Off = 0 ] Buy Wait on Loss - Additional number of bars to wait after losing a trade. New trades will not be entered until the wait period is complete. Useful for dealing with occasional high-volatility. Allows the market time to settle before resuming trading. Values slightly higher than the COG period seem to work quite well. [ Default = 260 ] Stop Loss - Fixed stop loss position relative to trade entry points. [ Default = 100 pips ] Target Level - Specifies which of the polynomial regression channels will be used for setting the trade targets. By default the centreline (0) will be used, but any of them may be specified, with the 1st channel line on the opposite side from entry being 1, and the 3rd channel line on the opposite side from entry being 3. Higher numbers result in greater proftability and greater risk. [ Default = 0 (centre), Range = -1, 0, 1, 2, 3 ] Dynamic Targets - Enabling this will causes the targets for open trades to be adjusted to track the specified Target Level with each new bar. Overrides the default fixed target. Useful in some rare circumstances. [ Default = No ] Opening Lot Size - Starting order volume per trade. If the Money Management or Martingale functionality is enabled then this specifies the minimum trade volume allowed. [ Default = 10000 ] Maximum Lot Size - Maximum lot that can be placed on any one trade. Zero disables. [ Default = 0 ] Minimum Profit - Specifies the minimum number of pips to be won on any trade. Trades with dynamic targets will be automatically closed if the target price moves within the minimum profit specified here. [ Default = 1 ] Maximum Slippage - Specifies the spread allowable per trade entry. [ Default = 2, Attempt Limit Order = 0 ] Entry Window - Minimum distance (in pips) that price must be from an entry line before a trade can be entered. This has been added to compensate for the entry lag created by the Hull moving average. Trades are no longer entered immediately when the HMA crosses an entry line - the bot will wait for price to be within the Entry Window distance of the entry channel line before opening the trade. Smaller values here will reduce the number of trades entered, but will also increase average profit per trade. [ Default = 5, Range >= 0 ] Dynamic Stops - Stop Loss positions are dynamically adjusted to track the relevant 3rd channel line on every bar. Seldom of use, but may be useful in some configurations. [ Default = No ] Trailing Stops - Enables trailing stops. [ Default = No ] Trailing Stop Trigger - Distance in pips that price must move from entry before the trailing stop is enabled. [ Default = 20 ] Trailing Stop Distance - Distance from the current price (in pips) for a triggered trailing stop. [ Default = 20 ] Balance Stop Loss - Proportion of account balance that must be maintained after a loss. Any losses which cause the account balance to drop below this threshhold will result in all losing trades to be closed immediately to preserve the account balance at the current level. For example, if this is set to 0.5, the current account balance is $1000, all losing positions will be closed immediately and the Dragon will exit if the account balance drops below $1000x0.5 = $500 on close of any trade. [ Default = 0.5, Range = 0-1 ] Equity Stop Loss - If account equity drops below this proportion of the account balance, then all losing open trades are closed immediately and the Dragon will exit. [ Default = 0.5, Range = 0-1 ] Equity Trade Filter - Will prevent any new trades from being entered into whilst account equity is less than this proportion of the account balance. [ Default = 0.5, Range = 0-1 ] Trade on Fridays - Does exactly what it says. Provides a means to prevent the opening of new trades on Fridays. Useful in some markets which frequently gap when markets open on a Monday. [ Default = Yes ] Money Management - Will proportionally increase lot sizes based upon account equity, ie. if the account equity at start of trade is $1000 and the lot size is 10k, then the lot size will be incremented to 20k when the equity reaches $2000, to 30k at $3000, and so on. [ Default = Yes ] Martingale Enabled - Specifies whether the Martingale-derived loss recovery strategy will be used. This can be extremely succesful because of the high win proportion achievable. When the bot is stopped, either manually or automatically, the current martingale level is saved to a text file in the user's default documents folder (so that the bot can be restarted without "forgetting" it's martingale duties). The level will be restored on start up. Delete or edit the file to reset or preset the martingale level. [ Default = Yes ] Reversingale Enabled - Enables instant position reversals upon lost trades. Ignores the Buy Wait and Buy Wait on Loss periods altogether. Uses the Martingale Multiplier to calculate the lot size and target distance required in order to recover from a loss. Only works if the Martingale functionality is enabled. Particularly useful in markets (such as gold) that tend to make large rapid moves after long periods of consolidation. [ Default = No ] Martingale Multipler - When a trade is lost, then the next trade will increase the lot size by the factor specified by this parameter. eg. if the Multiplier is 2, then the lot size will be doubled and the target distance will be roughly half of the lost pips. If set to 4, then the lot size will be quadrupled and the target distance will be roughly one quarter of the lost pips. [ Default = 2 ] Martingale Recursions - Limit the number of times that consecutive Martingale multiplications may occur. [ Default = 2 ] Debug Level - Specifies the amount of operational information that will be output to the log. [ Default = 0, Range = 0-2 ] Together, all of these parameters make for a flexible trading system which has the potential to achieve relatively steady profitability with minimal drawdown in every market that I've tested it on. That said, it can take A LOT of backtesting to tune it to a particular market. Have fun, and please share your profitable parameters, bug fixes, optimizations, enhancements or improvements. This is my first time working with C#, so I'm sure there are plenty of areas which can be optimized.    
09 Jan 2014
Downloads
5853
Comments
86
Rating
4.17
Download
This is a Robot based on the GannHighLow Indicator.  If close price rises above the GannHighLow indicator a buy is triggered and if the prices falls below the GannHighLow  indicator a sell is triggered. There is only one position open at a time. So, if a buy is triggered and a sell is open the sell will be closed. The default parameters use no SL/TP (Default to zero) If SLTrigger and TrailingStop are greater than zero then Trailing stop is used. Any suggestions for optimization are welcome. 
by adaled
09 Jan 2014
Downloads
1859
Comments
0
Rating
0
Download
#DONT FORGET TO REFERENCE THE TWO FILES IN THE CODE This robot trades the fibonacci bands.    I had sucess trading 4H GBPJPY with  AtrPeriod = 21 ; emaPeriod = 54 ; velperiod = 10 With a little optimization you can get good results for others symbols and timeframe. If you find something good, please share! If the trend is bullish the robot place a buy order in the first fibo band and a sell in the second band and vice-versa.
09 Jan 2014
Downloads
3958
Comments
17
Rating
3
Download
This is a sample trend robot This code is a cAlgo API sample. The "Sample Trend Robot" will buy when fast period moving average crosses the slow period moving average and sell when  the fast period moving average crosses the slow period moving average. The orders are closed when an opposite signal  is generated. There can only by one Buy or Sell order at any time.
by alexk
18 Dec 2013
Downloads
3118
Comments
0
Rating
0
Download
​    The "Sample SAR Trailing Stop Robot" will create a market Buy order if the parabolic SAR of the previous bar is      below the candlestick. A Sell order will be created if the parabolic SAR of the previous bar is above the candlestick.       The order's volume is specified in the "Volume" parameter. The order will have a trailing stop defined by the      previous periods' Parabolic SAR levels. The user can change the Parabolic SAR settings by adjusting the "MinAF"      and "MaxAF" parameters.      
18 Dec 2013
Downloads
1403
Comments
2
Rating
0
Download
    The "Sample RSI Range Robot" will create a buy order when the Relative Strength Index indicator crosses the  level 30,      and a Sell order when the RSI indicator crosses the level 70. The order is closed be either a Stop Loss, defined in      the "Stop Loss" parameter, or by the opposite RSI crossing signal (buy orders close when RSI crosses the 70 level      and sell orders are closed when RSI crosses the 30 level).      The robot can generate only one Buy or Sell order at any given time.
18 Dec 2013
Downloads
2272
Comments
3
Rating
0
Download