Category Other  Published on 26/02/2021

cTrader Profit & Loss Targets

Description

Traders who just want a simple method to lock in their profits or reduce their losses can use this cTrader cBot (robot) that will make sure that your profit and loss targets are managed correctly by closing all open positions automatically when any target is reached.

 

Net Profit Target

If you wish to close all open positions when all your net profit for all open positions have reached a predetermined value then choose this option.

Account Equity Profit Target

If you wish to close all open positions when your account equity has reached a predetermined value then choose this option.

Account Equity Loss Target

Choose this option to limit your account equity loss, an example would be that your balance is £1000.00 and your equity is £900.00 and you still have positions open that could lose you even more money. ​

Trading Time Target

This option will allow you to close all open positions regardless of whether you are winning or losing at a set time, an example is that you start this robot at 8:00 am and set the time target for 17:30 pm when the target is reached all your open positions will close.​

Pop-Up Window

This will simply display a pop-up message window telling you which target has been reached​

 

cTrader Profit Loss Targets

 

Contactinstant chat group
Websitehttps://clickalgo.com

ClickAlgo

Twitter | Facebook | YouTube | Pinterest | LinkedIn

 


using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Windows.Forms;
using System.Threading;

// To download the software please visit: https://clickalgo.com/ctrader-profit-loss-targets

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class ClickAlgoSoftware : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        private static Mutex dialogMutex = new Mutex();
        private static bool dialogIsShownOnce = false;

        protected override void OnStart()
        {
            ShowDialogBox();
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }

        public static void ShowDialogBox()
        {
            dialogMutex.WaitOne();

            if (dialogIsShownOnce)
                return;

            var ret = MessageBox.Show("It is not possible to download the software from the cTDN website. Would you like to visit us at ClickAlgo.com where you can download it?", "Downloading...", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (ret == DialogResult.Yes)
            {
                System.Diagnostics.Process.Start("https://clickalgo.com/ctrader-profit-loss-targets");
            }

            dialogIsShownOnce = true;

            dialogMutex.ReleaseMutex();
        }
    }
}


ClickAlgo's avatar
ClickAlgo

Joined on 05.02.2015

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: ClickAlgo Software.algo
  • Rating: 0
  • Installs: 2768
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
OM
Omega · 2 years ago

Hi,

I'm interested in this bot, question, if I'm running a 4 currencies all with different dollar value profit targets can I set this robot to each of the charts and set it up for each different currencies separately?