- Home
- Algorithms
- cBots
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 installHow to install cBots & Indicators
- Download the Indicator or cBot.
- Double-click on the downloaded file. This will install all necessary files in cAlgo.
- Find the indicator/cbot you want to use from the menu on the left.
- Add an instance of the indicator/cBot to run.
- Download the Indicator
- Double-click on the downloaded file. This will install all necessary files in cTrader.
-
Select the indicator from Custom in the functions (f) menu in the top center of the chart
- Enter the parameters and click OK
free
22 Jan 2023
I downloaded a simple Macd crossover algo that was free because I'm trying to learn. Everything seems fine but what do I know right? It compiles but places no trades.
Please help. Code below. I also cut out the trading hours thing, just to be sure it wasn't somehow interfering. There was also a reference to Trade.Executing or something similar that was deprecated and had to be removed. The original file sans changes is attached.
Thanks a million
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.None)]
public class MACDMarketTimerV2 : Robot
{
[Parameter("Sentiment: Buy", DefaultValue = true)]
public bool Buy { get; set; }
[Parameter("Sentiment: Sell", DefaultValue = true)]
public bool Sell { get; set; }
[Parameter("MME Slow", Group = "MA", DefaultValue = 16)]
public int mmeSlow { get; set; }
[Parameter("MME Fast", Group = "MA", DefaultValue = 12)]
public int mmeFast { get; set; }
[Parameter("Source", Group = "RSI")]
public DataSeries Source { get; set; }
[Parameter("Periods", Group = "RSI", DefaultValue = 19)]
public int Periods { get; set; }
// [Parameter("Start Hour", DefaultValue = 10.0)]
// public double StartTime { get; set; }
// [Parameter("Stop Hour", DefaultValue = 12.0)]
// public double StopTime { get; set; }
[Parameter(" Period", Group="MACD",DefaultValue = 9)]
public int Period { get; set; }
[Parameter(" Long Cycle",Group="MACD", DefaultValue = 26)]
public int LongCycle { get; set; }
[Parameter(" Short Cycle",Group="MACD", DefaultValue = 12)]
public int ShortCycle { get; set; }
[Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 0.01, MinValue = 0.01, Step = 0.01)]
public double Quantity { get; set; }
[Parameter("Stop Loss ", DefaultValue = 100)]
public int StopLoss { get; set; }
[Parameter("Take Profit", DefaultValue = 100)]
public int TakeProfit { get; set; }
private MovingAverage i_MA_slow;
private MovingAverage i_MA_fast;
private RelativeStrengthIndex rsi;
// private DateTime _startTime;
// private DateTime _stopTime;
private MacdCrossOver macd;
private double volumeInUnits;
protected override void OnStart()
{
i_MA_slow = Indicators.MovingAverage(Bars.ClosePrices, mmeSlow, MovingAverageType.Exponential);
i_MA_fast = Indicators.MovingAverage(Bars.ClosePrices, mmeFast, MovingAverageType.Exponential);
rsi = Indicators.RelativeStrengthIndex(Source, Periods);
macd=Indicators.MacdCrossOver(LongCycle, ShortCycle, Period);
volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);
{
// _startTime = Server.Time.Date.AddHours(StartTime);
// _stopTime = Server.Time.Date.AddHours(StopTime);
// Print("Start Time {0},", _startTime);
// Print("Stop Time {0},", _stopTime);
}
}
protected override void OnBar()
{
var MACDLine = macd.MACD.Last(1);
var PrevMACDLine = macd.MACD.Last(2);
var Signal = macd.Signal.Last(1);
var PrevSignal= macd.Signal.Last(2);
//var currentHours = Server.Time.TimeOfDay.TotalHours;
// bool tradeTime = StartTime < StopTime
// ? currentHours > StartTime && currentHours < StopTime
// : currentHours < StopTime || currentHours > StartTime;
// if (!tradeTime)
// return;
if (rsi.Result.LastValue > 25 && rsi.Result.LastValue < 70)
{
if ((MACDLine > Signal && PrevMACDLine <PrevSignal && default==Sell) && (i_MA_fast.Result.LastValue > i_MA_slow.Result.LastValue))
{
ExecuteMarketOrder( TradeType.Buy ,SymbolName,volumeInUnits, "MACDMarketTimerV2,RSI,MACD",StopLoss,TakeProfit);
}
else if ( (MACDLine < Signal && PrevMACDLine >PrevSignal && default== Buy)&(i_MA_fast.Result.LastValue < i_MA_slow.Result.LastValue))
{
var result = ExecuteMarketOrder( TradeType.Sell ,SymbolName,volumeInUnits, " MACDMarketTimerV2,RSI,MACD",StopLoss,TakeProfit);
if (result.Error == ErrorCode.NoMoney)
Stop();
}
}
}
protected override void OnStop()
{
}
}
}
moving average
1
0
138
free
19 Jan 2023
from datetime import datetime
import backtrader as bt
# Create a subclass of Strategy to define the indicators and logic
class SmaCross(bt.Strategy):
# list of parameters which are configurable for the strategy
params = dict(
pfast=10, # period for the fast moving average
pslow=30 # period for the slow moving average
)
def init(self):
sma1 = bt.ind.SMA(period=self.p.pfast) # fast moving average
sma2 = bt.ind.SMA(period=self.p.pslow) # slow moving average
self.crossover = bt.ind.CrossOver(sma1, sma2) # crossover signal
def next(self):
if not self.position: # not in the market
if self.crossover > 0: # if fast crosses slow to the upside
self.buy() # enter long
elif self.crossover < 0: # in the market & cross to the downside
self.close() # close long position
cerebro = bt.Cerebro() # create a "Cerebro" engine instance
# Create a data feed
data = bt.feeds.YahooFinanceData(dataname='MSFT',
fromdate=datetime(2011, 1, 1),
todate=datetime(2012, 12, 31))
cerebro.adddata(data) # Add the data feed
cerebro.addstrategy(SmaCross) # Add the trading strategy
cerebro.run() # run it all
cerebro.plot() # and plot it with a single command
Martingale with Trailling Stop
2
0
291
by willbs
free
13 Jan 2023
It uses several parameters such as Initial Volume, Stop Loss, Take Profit, Trailing Stop Loss, and Spread Limit to execute trades on the market.
The robot has a random trade type generator that can either select a buy or sell trade. The robot also has a closed position event handler that will execute a new trade if the previous one closed with a profit, or will double the volume of the previous trade if the previous one closed with a loss. Additionally, it stops the bot if it runs out of money.
Tip: Run extended optimization to get better parameters, at least 2 years. The print values are for only 1 week.
Usain Bot - Day Trader
1
0
306
by willbs
free
08 Jan 2023
The most faster Bot for Day Trader
Indicators in Bot: RSI + ParabolicSAR + OBV
With Trailing Stop
Bot close positions if has been open for more than 2 hour.
Bot open new positions only between 6AM and 7PM (server hour).
(Fx4U) Notify orders to Telegram
1
0
11147
by Fx4U.net
free
22 Jan 2023
Functions of the robot:
- Check the change in the account within a preset period to notify the group or channel Telegram. Including, announcement of opening and closing positions, opening and closing pending orders, Account is low....
- The robot runs on any currency pair, any time frame. You just launch it and it will notify you.
- Please learn how to create Telegram bot, get Telegram HTTP API and get Telegram channel or group chat ID before operating the robot.
- Please visit http://fx4u.net/robot/notify-orders-to-telegram/ to download.
- Visit https://ctrader.com/users/profile/55833 to see my other robots.
Parameter setting
Progressive Stoch
1
5
392
free
22 Dec 2022
- This cBots works with EURUSD, AUDUSD, EURAUD, EURGBP, GBPUSD, NZDUSD, USDCAD, USDCHF, USDJPY
- TimeFrame 4h
- Not use StopLoss and for this reason you need to set lots carefully
Here some example screen of backtesting
Here the settings
EurUsd
takeProfit: 15
stopLoss: 100000
hourEnter: 2
hourExit: 23
fastPeriod: 55
slowPeriod: 250
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 19
stochParams: 2
AudUsd
takeProfit: 7
stopLoss: 100000
hourEnter: 5
hourExit: 19
fastPeriod: 45
slowPeriod: 210
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 16
stochParams: 2
EurAud
takeProfit: 31
stopLoss: 100000
hourEnter: 6
hourExit: 20
fastPeriod: 65
slowPeriod: 250
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 23
stochParams: 6
EurGbp
takeProfit: 19
stopLoss: 100000
hourEnter: 2
hourExit: 23
fastPeriod: 45
slowPeriod: 260
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 7
stochParams: 2
GbpUsd
takeProfit: 15
stopLoss: 100000
hourEnter: 0
hourExit: 21
fastPeriod: 45
slowPeriod: 110
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 9
stochParams: 3
NzdUsd
takeProfit: 9
stopLoss: 100000
hourEnter: 9
hourExit: 23
fastPeriod: 20
slowPeriod: 210
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 19
stochParams: 3
UsdCad
takeProfit: 11
stopLoss: 100000
hourEnter: 9
hourExit: 18
fastPeriod: 25
slowPeriod: 240
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 24
stochParams: 3
UsdChf
takeProfit: 17
stopLoss: 100000
hourEnter: 8
hourExit: 19
fastPeriod: 45
slowPeriod: 260
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 17
stochParams: 5
UsdJpy
takeProfit: 8
stopLoss: 100000
hourEnter: 4
hourExit: 17
fastPeriod: 50
slowPeriod: 130
lots: check in lots section
maxOrder: 2 (depends how many MAX orders you want to have open in the same time)
stochLength: 15
stochParams: 3
Lots to use by your account balance:
from: 100$ to: 500$ use 0.01 lots
from: 500$ to: 1.000$ use 0.03 lots
from: 1.000$ to: 2.000$ use 0.06 lots
from: 2.000$ to: 5.000$ use 0.1 lots
from: 5.000$ to: 10.000$ use 0.3 lots
from: 10.000$ to: 15.000$ use 0.5 lots
from: 15.000$ to: 20.000$ use 1 lots
from: 20.000$ + use 2 lots and add 1 lot for each 10k
To respect this rules it's important for your money management! Don't rush, let the money work for you!
(Fx4U) AUDCHF - high profit-250%/year
3
5
15394
by Fx4U.net
free
02 Feb 2023
- The robot only works on AUDCHF M15 timeframe.
- Please visit http://fx4u.net/robot/audchf-m15-price-action/ to download Platinum backtest version.
Price Action Strategy:
There are 3 signals to open a BUY order (opposite for a SELL order):
1. In a large uptrend, open an order when a small uptrend appears and add some sufficient conditions.
2. When the price is fluctuating in an uptrend band, open an order when the price returns to the old bottom and add some sufficient conditions.
3. In a marked uptrend, open an order when the price breaks above the top of a neighboring price and add some sufficient conditions.
- Stop loss: All trades have a stop loss. It relies on the Fractal indicator or the Supertrend indicator or the neighboring price zone.
- Take profit: All transactions have a set takeprofit. It is based on the Fractal indicator or the neighboring price zone or an optimal ratio.
- Capital management: Each entry signal is only one order. With 1 stop loss, and multiple take profit levels to maximize profits. Also relies on Kelly's capital management method to bet higher amounts on orders that are likely to yield larger returns.
- Robots are improved every day for better performance.
- I provide a FREE version for all my robots. With the Free version: The maximum loss amount in 1 order is 50usd and the number of orders is limited. To not be limited, please contact https://t.me/vnfx4u to purchase the full version.
- Visit https://ctrader.com/users/profile/55833 to see my other robots.
Backtest data: Version: Platinum; Broker: Icmarkets; Data: Tick data from server (accurate); Commission: 30
- 9 consecutive years of profit. if trading with 2.5% risk, the profit is about 250% per year.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data.We have a profit of about 2,428,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 15%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data.We have a profit of about 2,428,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 15%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data.We have a profit of about 2,428,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 15%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data. We have a profit of about 193,000 usd if we place a fixed 500 usd/order (equivalent to 386R for 9 years). This profit is equivalent to 3.5R per month.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data. We have a profit of about 193,000 usd if we place a fixed 500 usd/order (equivalent to 386R for 9 years). This profit is equivalent to 3.5R per month.
- Backtest From 19 Jan 2014 - 29 Jan 2023 with tick data. We have a profit of about 193,000 usd if we place a fixed 500 usd/order (equivalent to 386R for 9 years). This profit is equivalent to 3.5R per month.
(Fx4U) CADJPY - high profit-250%/year
1
5
15196
by Fx4U.net
free
22 Jan 2023
- The robot only works on CADJPY M15 timeframe.
- Please visit http://fx4u.net/robot/cadjpy-m15-price-action/ to download Platinum backtest version.
Price Action Strategy:
There are 3 signals to open a BUY order (opposite for a SELL order):
1. In a large uptrend, open an order when a small uptrend appears and add some sufficient conditions.
2. When the price is fluctuating in an uptrend band, open an order when the price returns to the old bottom and add some sufficient conditions.
3. In a marked uptrend, open an order when the price breaks above the top of a neighboring price and add some sufficient conditions.
- Stop loss: All trades have a stop loss. It relies on the Fractal indicator or the Supertrend indicator or the neighboring price zone.
- Take profit: All transactions have a set takeprofit. It is based on the Fractal indicator or the neighboring price zone or an optimal ratio.
- Capital management: Each entry signal is only one order. With 1 stop loss, and multiple take profit levels to maximize profits. Also relies on Kelly's capital management method to bet higher amounts on orders that are likely to yield larger returns.
- Robots are improved every day for better performance.
- I provide a FREE version for all my robots. With the Free version: The maximum loss amount in 1 order is 50usd and the number of orders is limited. To not be limited, please contact https://t.me/vnfx4u to purchase the full version.
- Visit https://ctrader.com/users/profile/55833 to see my other robots.
Backtest data: Version: Platinum; Broker: Icmarkets; Data: Tick data from server (accurate); Commission: 30
- 9 consecutive years of profit. if trading with 2.5% risk, the profit is about 250% per year.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data.We have a profit of about 3,000,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 19%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data.We have a profit of about 3,000,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 19%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data.We have a profit of about 3,000,000 usd with an initial capital of 1,000 usd if we place a 2.5% risk per order. The maximum Balance Drawdown is about 19%. This profit is equivalent to 250% per year.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data. We have a profit of about 223,000 usd if we place a fixed 500 usd/order (equivalent to 446R for 9 years). This profit is equivalent to 4.1R per month.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data. We have a profit of about 223,000 usd if we place a fixed 500 usd/order (equivalent to 446R for 9 years). This profit is equivalent to 4.1R per month.
- Backtest From 19 Jan 2014 - 24 Dec 2022 with tick data. We have a profit of about 223,000 usd if we place a fixed 500 usd/order (equivalent to 446R for 9 years). This profit is equivalent to 4.1R per month.
(Fx4U) GBPUSD - high profit-450%/year
10
3.75
15700
by Fx4U.net
free
22 Jan 2023
- The robot only works on GBPUSD M15 timeframe.
- Please visit http://fx4u.net/robot/gbpusd-m15-price-action/ to download Diamond backtest version.
Price Action Strategy:
There are 4 signals to open a BUY order (opposite for a SELL order):
1. In a large uptrend, open an order when a small uptrend appears and add some sufficient conditions.
2. When the price is fluctuating in an uptrend band, open an order when the price returns to the old bottom and add some sufficient conditions.
3. In a marked uptrend, open an order when the price breaks above the top of a neighboring price and add some sufficient conditions..
4. When the price reaches the bottom of a large area, open an order when the price breaks above the top of a minor trend and add some sufficient conditions.
- Stop loss: All trades have a stop loss. It relies on the Fractal indicator or the Supertrend indicator or the neighboring price zone.
- Take profit: All transactions have a set takeprofit. It is based on the Fractal indicator or the neighboring price zone or an optimal ratio.
- Capital management: Each entry signal is only one order. Move stop loss dynamically when price moves in the right direction. Take profits continuously when the price moves in the right direction to maximize profits. Also relies on Kelly's capital management method to bet higher amounts on orders that are likely to yield larger returns and vice versa.
- Robots are improved every day for better performance.
- I provide a FREE version for all my robots. With the Free version: The maximum loss amount in 1 order is 50usd and the number of orders is limited. To not be limited, please contact https://t.me/vnfx4u to purchase the full version.
- Visit https://ctrader.com/users/profile/55833 to see my other robots.
Backtest data: Version: Diamond; Broker: Icmarkets; Data: Tick data from server (accurate); Commission: 30
- 9 consecutive years of profit. if trading with 2% risk, the profit is about 450% per year (You can backtest every year to see the annual profit)
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 14,236,000 usd with an initial capital of 1,000 usd if we place a 2% risk per order. The maximum Balance Drawdown is about 17.3%. This profit is equivalent to 450% per year.
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 14,236,000 usd with an initial capital of 1,000 usd if we place a 2% risk per order. The maximum Balance Drawdown is about 17.3%. This profit is equivalent to 450% per year.
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 14,236,000 usd with an initial capital of 1,000 usd if we place a 2% risk per order. The maximum Balance Drawdown is about 17.3%. This profit is equivalent to 450% per year.
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 346,600 usd if we place a fixed 500 usd per order (equivalent to 693R for 9 years). This profit is equivalent to 6.4R per month.
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 346,600 usd if we place a fixed 500 usd per order (equivalent to 693R for 9 years). This profit is equivalent to 6.4R per month.
- Backtest From 19 Jan 2014 - 11 Jan 2023. We have a profit of about 346,600 usd if we place a fixed 500 usd per order (equivalent to 693R for 9 years). This profit is equivalent to 6.4R per month.
Copyright © 2023 Spotware Systems Ltd. All rights reserved.