Search
GBP
Trading Software
    Menu Close
    Back to all

    How to Debug a cTrader cBot

     "Debugging - The Critical Programming Skill for Algorithmic Trading"

     

    So you’ve figured out how to write your trading algorithms. Now, you want to start debugging that code using Microsoft Visual Studio. There are two phases to debugging which are building the code to catch and resolve any project and compiler errors and running the code in the environment to catch and resolve run-time errors. we will show you how to do both with an instructional video free of charge.

    "Help My Code Does Not Work"

    How to Debug Trading Robots

     

    One of the biggest surprises for new programmers is just how much of their actual time is spent trying to find out what is wrong with the code.  They often feel that this time is wasted or that it's a kind of punishment for not being smart enough to write the correct code the first time through. "If I knew what I was doing," they think to themselves, "I wouldn't have to spend so much time debugging." 

     

    THE 6 STAGES OF DEBUGGING

    • That cannot happen
    • That does not happen on my machine
    • Hey, that should not happen
    • Why does that happen?
    • Oh I see
    • How did it ever work?

     

    Bugs in your code will happen, it's all part of programming, we learn to accept them and put in place a process to reduce the number of bugs that could be produced, this is in the form of good design skills and solid coding standards. If you write large amounts of complex code, there will be bugs and the video below will show you how you can identify and fix the errors and warnings in your code easily.

     

    Our Algorithmic Trading School

    We have more educational videos to help you learn.

     

    Using cTrader with Visual Studio 2022

    Follow these links for help with debugging your cTrader cBots & Indicators using Microsoft Visual Studio 2022 and above.

     

    cTrader cBot Debug Code