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

# MT5 Automation

For automating your Valhalla Trades to MT5, we recommend using the platform TradeSgnl:

{% embed url="<https://youtu.be/_Yk5DAMIq-Q>" %}

{% embed url="<https://www.tradesgnl.com/>" %}

### Valhalla Placeholder Variables:

**Entry Price Variables:**

{{plot("Long entry")}}\
{{plot("Short entry")}}

**Take Profit Variables:**

{{plot("TP1 Long")}}\
{{plot("TP2 Long")}}\
{{plot("TP3 Long")}}

{{plot("TP1 Short")}}\
{{plot("TP2 Short")}}\
{{plot("TP3 Short")}}

**Dynamic Stop Loss Variables:**

{{plot("Dynamic SL Long")}}\
{{plot("Dynamic SL Short")}}

### TradeSgnal Placeholder Variables:

**Take Profit Variables:**

* tp1\_price=
* tp2\_price=
* tp3\_price=

{% hint style="info" %}
TradeSgnal allows to use as many take profit targets as you would like.
{% endhint %}

By default it will use their "Smart" algorithm to determine the % of the position to exit on each take profit level, but you can also specify it for each take profit as follows:<br>

* pct1=
* pct2=
* pct3=

{% hint style="info" %}
Example: Use the value 0.5 on a pct variable to exit 50% of the position on it.
{% endhint %}

Example Alert Message Setup:


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.valhallaindicator.com/automation/mt5-automation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
