C TRADER

Shehata Kamel

Trader
Nov 9, 2022
1
0
6
47
If anyone has an experience about c trader platform , Can you tell us the advantages and disadvantages of the platform?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
cTrader's main advantage is that many features that require third-party apps in MT4/MT5 are built-in there. It is also a lot more user-friendly and modern-looking piece of software.

cTrader's main disadvantage is that its algorithmic part isn't as advanced as that of MT4/MT5 and the code base of apps is much smaller.
 

HeavenLeighGill

Active Trader
Aug 5, 2021
389
35
44
28
Envid made some good points.
In comparison to MT4, cTrader is not nearly as popular. The platform is very accessible and has a good design, along with a lot of trading indicators and graphical objects. I think it's a good platform, but for some it may or may not be the right platform.
If you're into custom indicators or robots that can be a downside. I think avalibility of certain materials is just smaller compared to some of the other more popular platforms. It's also seen as difficult for beginners to use, but I think that's something that can be learned so it isn't necessarily a disadvantage.
 

farid_ava

Trader
Sep 15, 2023
3
0
6
48
How can we set multiple Take Profits with different volumes on cTrader newstrader cbot ?
For example I have a 1 lot postion on EurUsd.
I want to set Muliple Take Profits as following:
0.5 lots at 10 pips profit.
0.2 lots at 20 pips profit.
and so on.

I have these instructions but I don't know how to put them in newstrader cbot. Thank you for helping me.

using cAlgo.API;
using System;
using System.Collections.Generic;

C:
namespace cAlgo.Robots
{
    /// <summary>
    /// Allows setting multiple take profit levels for positions
    /// Set a take profit volume parameter value to 0 if you don't want to use it
    /// </summary>
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MultiTPBot : Robot
    {
        private double _firstTakeProfitVolumeInUnits;
        private double _secondTakeProfitVolumeInUnits;
        private double _thirdTakeProfitVolumeInUnits;
        private double _fourthTakeProfitVolumeInUnits;
 
        private List<long> _firstTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _secondTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _thirdTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _fourthTakeProfitTriggeredPositionIds = new List<long>();
 
        [Parameter("1st TP", DefaultValue = 0.01, MinValue = 0, Group = "Volume (Lots)")]
        public double FirstTakePrfitVolumeInLots { get; set; }
 
        [Parameter("2nd TP", DefaultValue = 0.03, MinValue = 0, Group = "Volume (Lots)")]
        public double SecondTakePrfitVolumeInLots { get; set; }
 
        [Parameter("3rd TP", DefaultValue = 0.05, MinValue = 0, Group = "Volume (Lots)")]
        public double ThirdTakePrfitVolumeInLots { get; set; }
 
        [Parameter("4th TP", DefaultValue = 0.1, MinValue = 0, Group = "Volume (Lots)")]
        public double FourthTakePrfitVolumeInLots { get; set; }
 
        [Parameter("1st TP", DefaultValue = 10, MinValue = 0, Group = "Pips")]
        public double FirstTakePrfitPips { get; set; }
 
        [Parameter("2nd TP", DefaultValue = 20, MinValue = 0, Group = "Pips")]
        public double SecondTakePrfitPips { get; set; }
 
        [Parameter("3rd TP", DefaultValue = 30, MinValue = 0, Group = "Pips")]
        public double ThirdTakePrfitPips { get; set; }
 
        [Parameter("4th TP", DefaultValue = 40, MinValue = 0, Group = "Pips")]
        public double FourthTakePrfitPips { get; set; }
 
        protected override void OnStart()
        {
            _firstTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(FirstTakePrfitVolumeInLots);
            _secondTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(SecondTakePrfitVolumeInLots);
            _thirdTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(ThirdTakePrfitVolumeInLots);
            _fourthTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(FourthTakePrfitVolumeInLots);
        }
 
        protected override void OnTick()
        {
            foreach (var position in Positions)
            {
                if (!position.SymbolName.Equals(SymbolName, StringComparison.OrdinalIgnoreCase)) continue;
 
                TriggerTakeProfitIfReached(position, _firstTakeProfitVolumeInUnits, FirstTakePrfitPips,
                    _firstTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _secondTakeProfitVolumeInUnits, SecondTakePrfitPips,
                    _secondTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _thirdTakeProfitVolumeInUnits, ThirdTakePrfitPips,
                    _thirdTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _fourthTakeProfitVolumeInUnits, FourthTakePrfitPips,
                    _fourthTakeProfitTriggeredPositionIds);
            }
        }
 
        private void ModifyPositionVolume(Position position, double newVolume)
        {
            if (position.VolumeInUnits > newVolume)
            {
                ModifyPosition(position, newVolume);
            }
            else
            {
                ClosePosition(position);
            }
        }
 
        private void TriggerTakeProfitIfReached(Position position, double takeProfitVolumeInUnits, double takeProfitPips,
            List<long> triggeredPositionIds)
        {
            if (triggeredPositionIds.Contains(position.Id)) return;
 
            if (takeProfitVolumeInUnits > 0 && position.Pips >= takeProfitPips)
            {
                triggeredPositionIds.Add(position.Id);
 
                ModifyPositionVolume(position, position.VolumeInUnits - takeProfitVolumeInUnits);
            }
        }
    }
}
 
Last edited by a moderator:

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
How can we set multiple Take Profits with different volumes on cTrader newstrader cbot ?
For example I have a 1 lot postion on EurUsd.
I want to set Muliple Take Profits as following:
0.5 lots at 10 pips profit.
0.2 lots at 20 pips profit.
and so on.

I have these instructions but I don't know how to put them in newstrader cbot. Thank you for helping me.

using cAlgo.API;
using System;
using System.Collections.Generic;

C:
namespace cAlgo.Robots
{
    /// <summary>
    /// Allows setting multiple take profit levels for positions
    /// Set a take profit volume parameter value to 0 if you don't want to use it
    /// </summary>
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MultiTPBot : Robot
    {
        private double _firstTakeProfitVolumeInUnits;
        private double _secondTakeProfitVolumeInUnits;
        private double _thirdTakeProfitVolumeInUnits;
        private double _fourthTakeProfitVolumeInUnits;
 
        private List<long> _firstTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _secondTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _thirdTakeProfitTriggeredPositionIds = new List<long>();
        private List<long> _fourthTakeProfitTriggeredPositionIds = new List<long>();
 
        [Parameter("1st TP", DefaultValue = 0.01, MinValue = 0, Group = "Volume (Lots)")]
        public double FirstTakePrfitVolumeInLots { get; set; }
 
        [Parameter("2nd TP", DefaultValue = 0.03, MinValue = 0, Group = "Volume (Lots)")]
        public double SecondTakePrfitVolumeInLots { get; set; }
 
        [Parameter("3rd TP", DefaultValue = 0.05, MinValue = 0, Group = "Volume (Lots)")]
        public double ThirdTakePrfitVolumeInLots { get; set; }
 
        [Parameter("4th TP", DefaultValue = 0.1, MinValue = 0, Group = "Volume (Lots)")]
        public double FourthTakePrfitVolumeInLots { get; set; }
 
        [Parameter("1st TP", DefaultValue = 10, MinValue = 0, Group = "Pips")]
        public double FirstTakePrfitPips { get; set; }
 
        [Parameter("2nd TP", DefaultValue = 20, MinValue = 0, Group = "Pips")]
        public double SecondTakePrfitPips { get; set; }
 
        [Parameter("3rd TP", DefaultValue = 30, MinValue = 0, Group = "Pips")]
        public double ThirdTakePrfitPips { get; set; }
 
        [Parameter("4th TP", DefaultValue = 40, MinValue = 0, Group = "Pips")]
        public double FourthTakePrfitPips { get; set; }
 
        protected override void OnStart()
        {
            _firstTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(FirstTakePrfitVolumeInLots);
            _secondTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(SecondTakePrfitVolumeInLots);
            _thirdTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(ThirdTakePrfitVolumeInLots);
            _fourthTakeProfitVolumeInUnits = Symbol.QuantityToVolumeInUnits(FourthTakePrfitVolumeInLots);
        }
 
        protected override void OnTick()
        {
            foreach (var position in Positions)
            {
                if (!position.SymbolName.Equals(SymbolName, StringComparison.OrdinalIgnoreCase)) continue;
 
                TriggerTakeProfitIfReached(position, _firstTakeProfitVolumeInUnits, FirstTakePrfitPips,
                    _firstTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _secondTakeProfitVolumeInUnits, SecondTakePrfitPips,
                    _secondTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _thirdTakeProfitVolumeInUnits, ThirdTakePrfitPips,
                    _thirdTakeProfitTriggeredPositionIds);
 
                TriggerTakeProfitIfReached(position, _fourthTakeProfitVolumeInUnits, FourthTakePrfitPips,
                    _fourthTakeProfitTriggeredPositionIds);
            }
        }
 
        private void ModifyPositionVolume(Position position, double newVolume)
        {
            if (position.VolumeInUnits > newVolume)
            {
                ModifyPosition(position, newVolume);
            }
            else
            {
                ClosePosition(position);
            }
        }
 
        private void TriggerTakeProfitIfReached(Position position, double takeProfitVolumeInUnits, double takeProfitPips,
            List<long> triggeredPositionIds)
        {
            if (triggeredPositionIds.Contains(position.Id)) return;
 
            if (takeProfitVolumeInUnits > 0 && position.Pips >= takeProfitPips)
            {
                triggeredPositionIds.Add(position.Id);
 
                ModifyPositionVolume(position, position.VolumeInUnits - takeProfitVolumeInUnits);
            }
        }
    }
}
Our NewsTrader EA doesn't support multiple TPs. You'd have to change its code to support that. I think it won't be easy if you don't know how to code.
 

farid_ava

Trader
Sep 15, 2023
3
0
6
48
Our NewsTrader EA doesn't support multiple TPs. You'd have to change its code to support that. I think it won't be easy if you don't know how to code.
Hello
Thank you for answering me.
I wanted to ask you to help me in this matter. Can you solve this problem and do it for me?
 

ontherun

Newbie
Oct 5, 2023
3
0
1
62
Hi,

in the 20 yrs past years or so I've been using MetaStock as main TA software (for mid-term/swing trading). I then tried to use MT4 as I'd like to make some intraday trading too but I didn't like it so I began searching for an alternative and ended trying cTrader. It's just a few weeks I've been using cTrader so Id9nt yet knowit very well but one thing I'm wondering about is this: does it support painting-bar/candle based on custom conditions. ie: just think about a simple condition like this... 3MA > 8MA then paint candle/bar blue... 3MA < 8MA paint them red.
Thanks a lot for let me know.

ps: if the software also offered the volume-chart it would be very welcome.
 
Last edited: