> For the complete documentation index, see [llms.txt](https://docs.tradesurge.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradesurge.co/platform/strategies.md).

# Strategies

A Strategy is code you upload, in Python or Pine Script. You backtest it, stress-test it and later deploy it to autotrade.

A Strategy is your edge written as code. You upload it in Python or Pine Script, backtest it on real candles, stress-test it against a firm's rules and, once autotrade ships, deploy it to your accounts. The same code runs in backtest and simulation.

{% hint style="info" %}
**Coming soon:** autotrade and Pine upload. Python upload, versioning, backtesting and the simulator open with the alpha, for invited traders.
{% endhint %}

## One interface, three uses

Every strategy answers one question: given these candles, what signals do you give? The signals are enter long, enter short, exit long and exit short. Backtesting and simulation call the same function, and autotrade will too.

## Strategies are pure

A strategy is not allowed to reach the network, read files, check the clock or use randomness. The same candles and parameters always give the same signals. That makes every backtest repeatable.

## Every upload is a version

Each upload creates a new version. Backtests, simulations and deployments all point at a specific version, so a result can always be traced to the exact code behind it.

## Explore

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Upload a Python strategy</strong></td><td>Write to the Strategy API and upload.</td><td><a href="/platform/strategies/upload-python.md">Upload a Python strategy</a></td></tr><tr><td><strong>Upload a Pine Script strategy</strong></td><td>Translate a TradingView strategy.</td><td><a href="/platform/strategies/upload-pine.md">Upload a Pine Script strategy</a></td></tr><tr><td><strong>Backtest a strategy</strong></td><td>Results in R, with parameter sweeps.</td><td><a href="/platform/strategies/backtest.md">Backtest a strategy</a></td></tr><tr><td><strong>Autotrade and the promotion ladder</strong></td><td>How a strategy earns the right to trade.</td><td><a href="/platform/strategies/autotrade.md">Autotrade and the promotion ladder</a></td></tr></tbody></table>

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Upload a Python strategy</strong></td><td>Start with the Strategy API.</td><td><a href="/platform/strategies/upload-python.md">Upload a Python strategy</a></td></tr><tr><td><strong>SurgeAI (coming soon)</strong></td><td>Describe your edge and let the copilot draft it.</td><td><a href="/platform/surgeai.md">SurgeAI</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tradesurge.co/platform/strategies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
