# Strategies

A *strategy* is a special type of study that may be used to automate or partially automate trading. In addition to displaying the study information, a **Control Box** is made available that allows the user to activate/deactivate a strategy and view important runtime information.

MotiveWave™ supports two modes for strategies:

* **Automatic** – Once the user activates the strategy, it will automatically buy and sell based on the internal logic.
* **Manual** – In this mode, the user tells the strategy when it is OK to enter.

MotiveWave™ comes with around 30 built-in strategies. These can be found under the *Strategy* menu (from the top menu bar).

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FCYuxIU2EUwxwTLAbDs8t%2Fimage.png?alt=media&#x26;token=d84709cd-11cd-491e-baef-022d51e5b2d6" alt=""><figcaption></figcaption></figure>

The following screen shot illustrates the Moving Average Cross strategy (MA Cross Strategy). This strategy will buy when the **Fast MA** crosses above the **Slow MA** and sell when it crosses below (see triangle markers below). Each strategy will have a control box (bottom left corner). This will enable you to edit the strategy and activate it. The control box also displays status information.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2F5dkhRvvVcaSZueXjNIp5%2Fimage.png?alt=media&#x26;token=5e3aa8af-35d9-48e4-8049-1269a9727a51" alt=""><figcaption></figcaption></figure>

## Manual Strategies

MotiveWave™ allows you to create strategies that respond to user input to enter or exit a position. This can be very useful as a way to help direct and manage exit points for user initiated trades. For an example of how this works, see the Trade Manager strategy.

The following screen shots show the configuration options for **Trade Manager**. On the first tab (**Entry/Exit**) you can setup the entry order and up to 3 exit orders. The **Stop Loss** tab provides options for the stop loss order.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FrAWkef0ogCE9EqM3xPA3%2Fimage.png?alt=media&#x26;token=278db82d-c0d6-4636-8024-0ce8f15487bb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FGmSZwtqxasgZPpS50yNa%2Fimage.png?alt=media&#x26;token=e0f158cd-385d-40e0-bd2f-19db44832653" alt=""><figcaption></figcaption></figure>

From the **Trade Manager Control Box**, you can choose Long (buy) or Short (sell). When you click the **Activate** button, the strategy will enter on the close of the bar.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FOVIGOPX67pf8i6v2W6aO%2Fimage.png?alt=media&#x26;token=70a930e5-7578-40b8-a39c-9c2d1aec0dd2" alt=""><figcaption></figcaption></figure>

Once the strategy is active, the title bar will flash (indicates an active strategy) and the **Activate** button will be replaced by **Cancel** (deactivates the strategy) and **Enter Now** (creates a market order to enter the position).

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FmNydJfzPU9AGX56sRDjE%2Fimage.png?alt=media&#x26;token=8c73f5ba-943d-4bcf-8a91-f3aca468c5a6" alt=""><figcaption></figcaption></figure>

When a position is entered in the strategy, the labels in the control box will display the open position, current unrealized P/L (profit or loss), target P/L, stop P/L among other information.

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FoGGIi9lwplWSLgfeXzCi%2Fimage.png?alt=media&#x26;token=640b865a-11d6-4bd2-9d04-75c0e7fc43d2" alt=""><figcaption></figcaption></figure>

## Strategy Configuration

The configuration options for a strategy will vary, but there are some settings that apply to many strategies.

The first panel is the **Trading Options** panel. This panel enables you to configure the following:

***Trading Options:***

* **Trade Lots** – This determines the quantity on the orders that are used to entry and exit positions. The Trade Lot is multiplied by the default quantity to determine the actual quantity.
* **Position Type** – Use this option to indicate if the strategy can have long and/or short positions
* **Use Account Position** – Use the existing position that exists in the selected account.
* **Enter On Activate** – If enabled the strategy will create an initial position when you activate the strategy
* **Close On Deactivate** – If a position is open when the strategy is deactivated, it will be closed at market price.
* **Bar Updates** – If enabled, the strategy will respond to live bar updates instead of waiting until the close of the bar.
* **Underlay** – If enabled, the strategy will be drawn behind the price bars.

***Trading Sessions:***

The **Trading Sessions** section enables you to define sessions where the strategy may be active. In between trading sessions, the strategy will be automatically deactivated.

* **Session 1** – define the first trading session with a start and end time
* **Session 2** – define the second trading session
* **Time Zone** – optionally specify the time zone for the hours defined in Session 1&2
* **Close On Session End** – Close an open position when the session ends

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FGhhpC7YCkI9qHEfNbltP%2Fimage.png?alt=media&#x26;token=bcc5a527-dfa2-4b43-9e85-89d3da90da96" alt=""><figcaption></figcaption></figure>

### Strategy Panel

The **Strategy Panel** tab allows you to choose what labels are displayed on the control box. The available labels will depend on the strategy.

* **Show Position** – display the current open position
* **Show Entry Price** – show the average entry price for the open position
* **Show Unrealized P/L** – shows the current unrealized profit/loss for the open position
* **Show Realized P/L** – show the current realized P/L
* **Show Stop P/L** – show what the profit/loss would be if the stop loss level is reached
* **Show Target P/L** –show that the profit/loss would be if the target level is reached
* **Show Risk Ratio** – show the risk level (target p/l divided by stop p/l)
* **Show Total P/L** – current total profit/loss since this strategy was activated
* **Floating Panel** - If checked, the Strategy Control Box will detach from the Trade Panel and you will be able to click and drag the panel to any position in the chart layout

<figure><img src="https://2457682635-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKkuQ4IBYTTbN0oyR7L0%2Fuploads%2FRjvm7DeYMK2E818AEVu4%2Fimage.png?alt=media&#x26;token=92badb4d-013f-4fe1-bf43-8d95f97ccd57" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.motivewave.com/user-guide/strategy-back-testing/strategies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
