[Canonical HTML article](https://algoway.trade/blog/manual-close-tradingview-strategy-state.html)

# Manual Trade Closes: What TradingView Strategies Know

Published November 29, 2026

![Separate simulated and broker position ledgers after a manual trade close](https://algoway.trade/static/img/blog-img/manual-close-tradingview-strategy-state.jpg)

**Closing a trade manually changes the broker account. It does not, by itself, close the position simulated by a Pine strategy.** The next TradingView alert can therefore describe a trade that makes sense to the strategy but no longer matches the account.

This matters in TradingView automation because the signal and execution sides keep different records. In an [AlgoWay TradingView workflow](https://algoway.trade/tradingview-automation), inspect the received instruction and destination response alongside the broker position. Do not assume that a manual close is a command sent back into the strategy.

## Two positions that can stop agreeing

TradingView documents Pine strategies as simulations, with hypothetical orders filled by a broker emulator. The strategy's position is the result of those simulated fills. A broker's position is the result of actual executions in that account. See the [Pine strategy documentation](https://www.tradingview.com/pine-script-docs/concepts/strategies/).

There is also a distinction between the strategy on your chart and the copy running a saved alert. TradingView creates a server-side copy when you create a strategy alert. Chart changes do not update that copy. Order-fill alerts come from the emulator's realtime fills, not from a manual transaction at the broker. TradingView explains this in its [strategy alert guide](https://www.tradingview.com/support/solutions/43000481368-strategy-alerts/).

The practical consequence is that a flat account and a strategy showing an open long can both be accurate descriptions of their own records. Neither screen proves that the other has updated.

## A manual close followed by three different signals

Suppose the strategy and account both hold a long position of one unit. You manually close the account position. The account is now flat, while the strategy still models a one-unit long. These are illustrative quantities, not a sizing recommendation.

| Next event | What needs checking |
| --- | --- |

| The strategy generates an exit | There may be no live position left to close. Inspect whether the outgoing instruction explicitly closes an existing position or merely says sell. |

| A fresh long condition appears | The script may require its simulated position to be flat before entering again. A flat broker account does not satisfy that Pine condition. |

| The strategy reverses from long to short | The simulated transaction quantity can include closing the old long as well as opening the short. That old long no longer exists in the account. |

For the reversal case, a strategy long one unit that reverses to short one unit can produce a two-unit sell transaction. If a separate execution system blindly applies that transaction quantity to an already flat account, it could create a two-unit short. This is a conditional example, not a claim about how every AlgoWay destination handles reversals. Check the route's documented command, sizing and position mode.

Likewise, the word `sell` is not enough to establish that a request is close-only. A raw sell order, an explicit close instruction and a desired final short position express different intentions. The destination's supported message format decides which one you are sending.

## Find which side prevented the next trade

Start with the TradingView alert log. If no new event exists, inspect the script's position conditions, entry limits and event timing. A common pattern is a rule that opens only when the strategy is flat. Waiting for the broker account to become flat will not change that rule's simulated input.

If an alert does exist, compare its action and quantity with the message received by the connector. Then read the destination response and current account positions and working orders. This separates a missing strategy event from a received request that was rejected, ignored or interpreted differently than intended. The [alert timing guide](https://algoway.trade/blog/tradingview-strategy-alert-timing.html) explains how to trace the event across those stages.

Do not diagnose the problem from a chart marker alone. Nor should a second test order be used as a substitute for finding the first order's result.

## Resume with an explicit account-state check

- Pause the automation entry path while investigating. Separately confirm the protection needed for any remaining positions; stopping an alert is not proof that broker orders were canceled.

- Record actual positions and working orders for the affected symbol. Check whether old entry or protective orders remain after the manual action.

- Determine the saved strategy alert's expected state from its events and configuration. Treat the current chart as a separate reference if its settings have changed.

- Choose a restart point with a known intended position, commonly flat on both sides. Do not open a real trade merely to make a chart look synchronized.

- Use a demo account to check the next entry, manual close and subsequent exit or reversal with the exact message format and route settings you intend to use.

Recreating an alert is appropriate when its configuration must change, but it is not a broker-position reset. The replacement calculates its strategy history and begins realtime operation; historical fills are not replayed as fresh alerts. Follow the [saved-alert update procedure](https://algoway.trade/blog/tradingview-alerts-old-settings-update.html) when replacing it.

If manual intervention is part of your trading routine, make it part of the automation design: specify who pauses entries, who checks outstanding orders, and what state permits a restart. The useful question is not simply whether the next alert will fire. It is whether its instruction still fits the account that will receive it.
