ATR Trailing Stop for Manual Traders

by 2bnnp in category Other at 24/03/2019
Description

This cbot will amend your SL for manually created positions if the comment of the positions matches with the comment parameter with a bot. To not move the SL to early to break even, it will set the SL to the ATR value only after 1) close and open are below the ATR and the ATR Value is below entry price. Managing many positions was never that easy. If there is a demand for a PSAR one i can create one too. This little helper is not free and can be purchased at Gumroad (25€ one time payment).

ATR Indicator can be found here: https://ctrader.com/algos/indicators/show/349

Download
86 downloads
How to install
Warning! Executing the following cBot may result in loss of funds. Use it 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.
Formula / Source Code
Language: C#
Trading Platform: cAlgo
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;

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

        private static bool trigger = false;

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

        protected override void OnTick()
        {
        }

        protected override void OnStop()
        {
            trigger = false;
        }

        public static void ShowDialogBox()
        {

            if (trigger)
            {
                return;
            }

            var msg = MessageBox.Show("The full version of this bot can be bought on Gumroad.com, visit now?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (msg == DialogResult.Yes)
            {
                System.Diagnostics.Process.Start("https://gumroad.com/products/cDzgd");
            }

            trigger = true;
        }
    }
}
Comments
5