Skip to content

Instantly share code, notes, and snippets.

View ClickAlgo's full-sized avatar

ClickAlgo Community ClickAlgo

View GitHub Profile
@ClickAlgo
ClickAlgo / Plugin-Toolbar-Window.cs
Created March 21, 2025 10:14
This example code will add a new button to the cTrader toolbar and when pressed, it will open a window. Additional changes required for a fully functional tool.
using System;
using cAlgo.API;
namespace cAlgo.Plugins
{
[Plugin(AccessRights = AccessRights.None)]
public class ToolbarButtonWithWindow : Plugin
{
private Window _customWindow;
@ClickAlgo
ClickAlgo / Readme.md
Last active March 23, 2025 10:54
Getting started

cTrader Code Ai Snippets

ClickAlgo's Gist GitHub code examples, generated by cTrader CodePilot, provide coders with practical, ready-to-use snippets that simplify the development of automated trading strategies and indicators. Each code snippet was created using ai from simple instructions in any language. Coding experience not required, but recommended

cTrader Code Ai Github

SCROLL DOWN TO VIEW ALL CODE SNIPPETS.

@ClickAlgo
ClickAlgo / Spread.cs
Last active March 21, 2025 00:58
Displays symbol spread on the chart as a configurable panel with size, color and position.
using cAlgo.API;
namespace cAlgo
{
[Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
public class SpreadDisplay : Indicator
{
[Parameter("Horizontal Position", DefaultValue = HorizontalAlignment.Center)]
public HorizontalAlignment HPosition { get; set; }
@ClickAlgo
ClickAlgo / ExitTradesonSMA.cs
Last active March 21, 2025 01:10
This cTrader cBot will automatically close open trades when the price moves above or below the simple moving average indicator.
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class ExitTradesOnSMA : Robot
{
[Parameter("SMA Period", DefaultValue = 50)]
public int SMAPeriod { get; set; }