Making the robot do something - Updated
Video Summary
OnStart() Method executes when you start the robot.
OnStop() Method executes when you stop the robot.
OnTick() Method executes on every new data tick.
OnBar() Method Executes on every new bar that is created.
Source Code For This Video
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class BlankRobot : Robot { [Parameter("Number", DefaultValue = 0.0)] public double Parameter { get; set; } [Parameter("Dads Name", DefaultValue = "John Doe")] public string StringParameter { get; set; } [Parameter("Is Poor", DefaultValue = false)] public bool BoolParameter { get; set; } protected override void OnStart() { // Put your initialization logic here Print(StringParameter + " Has started the Robot."); } protected override void OnTick() { // Put your core logic here Print("A new tick has occured"); } protected override void OnBar() { // Put your core logic here Print("### A new bar has occured ###"); } protected override void OnStop() { // Put your deinitialization logic here Print(StringParameter + " Has stopped the Robot."); } } }