Yes, you can add Python to a strategy yourself.
In the strategy builder
- Open your strategy in the Advanced Strategy Builder.
- Open the Python Editor.
- Write or paste your code.
- Click Run to see the output, and Validate to check it. Code that passes validation will save.
Over MCP
If you have connected your AI assistant to Tradetron over MCP, it can write and validate Python in your strategy for you.
How your code talks to the strategy
Use the GetVar and SetVar functions to read and write variables. Your code sets a variable, then you use that variable in the entry condition. When the condition is met, the trade is placed.
Need help?
- Send the code and your template ID to [email protected] if the editor does not work for you.
- Want it written for you? Use the paid build service: https://tradetron.tech/services/strategy-coded or the Strategy Creation questionnaire.
- Want one-on-one guidance? See TT Quant: https://tradetron.tech/services/quant
Edited with AI from the original Tradetron article, checked against current docs (Oct 2026). Spot something wrong? Tell us in the Community.