Description
always use 1 minute or 5 minute chart (candlestick)
always use 0.01 lot for good returns
only work on XAUUSD
open and close bot on same day after 24 hours or after sufficient profit
close the bot after the target is achieved
using cAlgo.API;
using cAlgo.API.Indicators;
using System;
using System.Linq;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.None)]
public class NdnghiaMACD : Robot
{
private MacdCrossOver _MACD;
[Parameter("Initial Volume Percent", DefaultValue = 0.01, MinValue = 0.01)]
public double InitialVolumePercent { get; set; }
[Parameter("Period", DefaultValue = 1100)]
public int Period { get; set; }
[Parameter("Long Cycle", DefaultValue = 2)]
public int LongCycle { get; set; }
[Parameter("Short Cycle", DefaultValue = 1)]
public int ShortCycle { get; set; }
[Parameter("Stop Loss", DefaultValue = 200)]
public int StopLoss { get; set; }
[Parameter("Take Profit", DefaultValue = 200)]
public int TakeProfit { get; set; }
[Parameter("Signal-line crossover true:if Signal-line crossover false: Zero crossover", DefaultValue = true)]
public bool IsSignalLineCrossover { get; set; }
protected override void OnStart()
{
_MACD = Indicators.MacdCrossOver(LongCycle, ShortCycle, Period);
}
protected override void OnBar()
{
var volumne = Math.Floor(Account.Balance * 0 * InitialVolumePercent / 100) + 1;
{
if (_MACD.MACD.Last(2) < _MACD.Signal.Last(2) && _MACD.MACD.Last(1) > _MACD.Signal.Last(1))
{
var position = Positions.Find("NdnghiaMACD");
if (position != null && position.TradeType == TradeType.Sell)
{
}
ExecuteMarketOrder(TradeType.Buy, Symbol.Name, volumne, "NdnghiaMACD", 0, 60);
// ExecuteMarketOrder(TradeType.Buy, Symbol.Name, volumne, "NdnghiaMACD", StopLoss, TakeProfit);
}
if (_MACD.MACD.Last(2) < _MACD.Signal.Last(2) && _MACD.MACD.Last(1) > _MACD.Signal.Last(1))
{
var position = Positions.Find("NdnghiaMACD");
if (position != null && position.TradeType == TradeType.Buy)
{
}
ExecuteMarketOrder(TradeType.Sell, Symbol.Name, volumne, "NdnghiaMACD", 0, 60);
// ExecuteMarketOrder(TradeType.Sell, Symbol.Name, volumne, "NdnghiaMACD", StopLoss, TakeProfit);
}
{
{
}
}
}
}
}
}
sameershaikh.ss13477
Joined on 01.08.2021
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Gold cbot no Loss.algo
- Rating: 5
- Installs: 3014
- Modified: 30/07/2022 11:53
Comments
Nice bot - Note that SL and TP are not taken into account as the code has // in front of the logic.
Enjoy
Do you think you will make money on a free bot? Don't be naïve
Hello, could you please ad Include Trading Hours and a Profit Target in % and $. Thanks
I am testing this bot on a demo account but its not profitable. Anything I am missing. I run the bot at the start of Tokyo session and wait for 5-10 percent profit on a $1000 ac with .01 lot but it never achieves it.
Any help would be appreciated.
Thanks nd Regards!
tjhurry well, that doesn't work, but if in each instance it operates with 0.01 lots what you can do is start two or three instances at the same time, it's the same
tjhurry If you cannot directly from the settings you can duplicate the bot and replace the default values from the code. Find the number that matches the lots you are buying and simply change the number (Duplicate it and rename the copy, try not to break anything)
But let me tell you something, if you set the tp to 10pips the profit is much more sustained and healthy. Stop holding many failed trades throughout the day, hold much less, that allows you to have a much healthier floating drowdown and always have liquidity to open new trades during the day. Also being able to always follow the price closely and have a profit when you turn off at any time, without waiting. And the profit in the end will be similar, you are taking profit from all the micro movements continuously the same. Just replace the "60s" with "10s" and you're good to go. And don't use the automatic backtest. Use it for a few days in demo better. Looks very different. :)
Hi, how can you increase the lot size to 0.02, 0.05, and so on? Nice cbot by the way thanks.
Man, this is great, it really works no matter what the price does. Floating drowdown stays more or less the same throughout the day, but the gains add up over time and always outweigh it. With an account of 10,000 and 0.01 lots it works perfectly. Starting with the Tokyo session and turning it off an hour or two before the next one. It's really great. Thank you (I have been using it for 10 days and all of them have been a significant gain)
Wendy's is one of America's favorite fast-food restaurants, it was founded in 1969, and since then, it has been looking for the best mechanisms to keep its customers happy. However, Apple Pay is not part of their payment methods - does wendy's take apple pay
Any chance to limit the open orders with max open positions or something like that?
Great bot thank you..:)
Anything multiplied by zero would equal zero
Your formula for volume is a bit flawed "Account.Balance * 0 * InitialVolumePercent" - The zero should be 1
Nice bot, thanks. I use it to spend less time and to automate the process. This link will also help you to enjoy the process
celsodonini profits have to be closed after target achieved manually
and bot is running well any problem
sameershaikh.ss13477 Congratulations on the robot, I've been running it for a week without loss. One question, can you insert into the schedule a command to close all orders when you reach profit?
The stop loss activates itself at the set value. Test a few days days and you will see how the account is reset.
Orders are coming in without stop loss, how do I activate stop in bot?
Is the stop loss hidden from the broker or is it removed / sent?
if
account size is 10000 Dollar lot size 0.50 lot max
means 0.50percent risk per cbot trade
Rule: Daily closing at 5 percent or 10 percent gain
start cBot at tokyo session or as per your risk no 1 cbot happy journey
Problem is, it keeps on booking small profits...and at the same time, it will be accumulating loosing trades as Floating Negative Balance. It will eventually blow the account. Daily reset of the Bot is something to test.
its hedging strategy
Looks like a Martingale system?
only use on 1 minute and 5 minute
only XAUUSD
use 0.01 lot size
Hi.can anyone help my code bot to my mt5 please..I have always wanted to own a bot