Description
A simple cBot that uses hedging ans scalping.
Notes
- Can make you nice profits in consolidating markets.
- It can blow your account in trending markets.
- Use always in context.
- Volume intensive. Use brokers with low commisions and tight spreads for better results.
- Use at your own risk
Backtesting based on EURUSD and h1 for last two years in which EURUSD are in a rather consolidating state.
// -------------------------------------------------------------------------------------------------
//
// This code is a cAlgo API sample.
//
// This cBot is intended to be used as a sample and does not guarantee any particular outcome or
// profit of any kind. Use it at your own risk
//
// The "Sample Martingale cBot" creates a random Sell or Buy order. If the Stop loss is hit, a new
// order of the same type (Buy / Sell) is created with double the Initial Volume amount. The cBot will
// continue to double the volume amount for all orders created until one of them hits the take Profit.
// After a Take Profit is hit, a new random Buy or Sell order is created with the Initial Volume amount.
//
// -------------------------------------------------------------------------------------------------
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class HedgingandScalpingAlgo : Robot
{
[Parameter("Volume", DefaultValue = 1000, MinValue = 1000, Step = 1000)]
public int Volume { get; set; }
protected override void OnStart()
{
}
protected override void OnBar()
{
ExecuteMarketOrder(TradeType.Buy, Symbol, Volume, "BUY");
ExecuteMarketOrder(TradeType.Sell, Symbol, Volume, "SELL");
foreach (var position in Positions)
{
if (position.Pips > 2)
{
ClosePosition(position);
}
}
}
}
}
skoutz.rothchild
Joined on 13.03.2017
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Hedging and Scalping Algo.algo
- Rating: 0
- Installs: 6661
- Modified: 13/10/2021 09:54
Comments
It's fake. It increases total balance by closing on the profits never worries about the losses. If you check equity it's always in loss.
Good to play game with...
"Experts in cbots, rack your brains and inform if this cbot is a miracle or a fake one !!!
For investment of 10K, net profit is 75,168 with zero loss !!!"
Not quite on Expert... But this cBot works perfectly... just check your drawdown and leveage amounts while the bot is running...... these will both be very high....
If you let the cBot run long enough in a ranging market it will more than cover the drawdown.... in tests I have run, 24 hours appears to be sufficent ( USDCAD T5 Chart)
Its software like this that has the FX industry pushing the regulators to cut leverage ratios and outlaw hedging.
Brokers cannot protect themselves against their own system if you use against them....
Hi, im backtesting with 0.01 and 0.05 PIPS but its the same Profit? can you please ad Stop Loss? Its also possible to make a max trade pairs? Thanks a lot
Experts in cbots i have a challenge for you !!!
I have backtested "Hedging and Scalping cBot" for the period 01/04/2011 to 13/07/2018 for GBPUSD @ 1 HR time frame. The most startling revelation i could draw from the backtest result is there is not even a single losing trade during this period.
Experts in cbots, rack your brains and inform if this cbot is a miracle or a fake one !!!
For investment of 10K, net profit is 75,168 with zero loss !!!
Hi,
Have you ever run a robot on a live account or demo account?
Looking forward your answer.
Best
SML
It alot of Drowdown 100%
if we can make minimum just 20-30% it could be run on real account soon.
Some one can help me add stop lost in this robot, I try to add this codes but it doesn't work
// -------------------------------------------------------------------------------------------------
//
// This code is a cAlgo API sample.
//
// This cBot is intended to be used as a sample and does not guarantee any particular outcome or
// profit of any kind. Use it at your own risk
//
// The "Sample Martingale cBot" creates a random Sell or Buy order. If the Stop loss is hit, a new
// order of the same type (Buy / Sell) is created with double the Initial Volume amount. The cBot will
// continue to double the volume amount for all orders created until one of them hits the take Profit.
// After a Take Profit is hit, a new random Buy or Sell order is created with the Initial Volume amount.
//
// -------------------------------------------------------------------------------------------------
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class HedgingandScalpingAlgo : Robot
{
[Parameter("Stop Loss", DefaultValue = 10)]
public int StopLoss { get; set; }
protected override void OnStart()
{
[Parameter("Volume", DefaultValue = 1000, MinValue = 1000, Step = 1000)]
public int Volume { get; set; }
protected override void OnStart()
{
}
protected override void OnBar()
{
ExecuteMarketOrder(TradeType.Buy, Symbol, Volume,StopLoss ,0, "BUY");
ExecuteMarketOrder(TradeType.Sell, Symbol, Volume,StopLoss ,0,0 "SELL");
foreach (var position in Positions)
{
if (position.Pips > 2)
{
ClosePosition(position);
}
}
}
}
}
am using it in a 5 minute time frame and works so much better
got to give u credit for this. amazing algo really is. gonna tkae it to real account soon
When Hedging and Scalping cBot close loss position? Where stop-loss?
Hi cant see this on my ctrader account, Indicators - Custom. Any workaround for this, thank you. Tested on cAlgo but cant be seen on cTrader.
Hi,
In which timeframe to you trade? Positions close on bar change
hi,
if (position.Pips > 2) doesnt seems to work correct .... I have position already 15 pips in profit, but the cBot doesnt close the the position. why?
Hi, seems to take up 20+ positions at a time. What is the max it will take on?
Also - what are your stop loss limits? and how do you stop them all?
Profit is taken when a position earns more than 2 pips
hi . when it TP for Order? EA. or User ? i Dont see in code to Take Profit. ?
Thank you ^ ^
Don't use this robot with real money. It will eventually blow your account.