Skip to content
All library documents

Trend Following and Volume Signals for Cautious Contrarian Trades

Article NautilusTrader

Summary

This article argues that traders should generally follow the prevailing stock trend instead of automatically taking the opposite side of popular sentiment. It says countertrend buying during a decline can mean facing persistent selling, while selling into an established rise may forfeit further gains. In its view, contrarian decisions require a market signal rather than a simple reaction to crowd mood.

The proposed warning sign is an unusually high trading volume near a price peak, especially when a long upper wick appears after a sustained rally and price stalls. The author interprets this combination as possible distribution by informed or institutional traders and advises caution about continuing to hold or buy. These claims are presented as qualitative trading guidance: the article provides no historical sample, measured results, rules for defining unusual volume or a peak, or method for distinguishing distribution from other causes. The suggested pattern therefore remains an interpretation requiring independent testing and risk controls.

Key ideas

  • The article recommends following established price trends in most routine trading situations.
  • It cautions that opposing a strong trend can expose a trader to continued market pressure.
  • A long upper wick with unusually high volume near a peak is presented as a possible distribution warning.
  • The proposed contrarian signal is qualitative and has no stated thresholds or performance evidence.

Tags

Full text
# OrderModifyRejected


# OrderModifyRejected

`OrderModifyRejected` records that a `ModifyOrder` command was rejected. The `ExecutionEngine`
applies it to the order, updates the `Cache`, and publishes it on the `MessageBus`. A trading venue,
simulated matching engine, or local risk control can reject the request.

Typical transition: `PENDING_UPDATE` -> previous status (for example `ACCEPTED`). Handler:
`on_order_modify_rejected`.

In `SUBMITTED`, `ACCEPTED`, `TRIGGERED`, and `PARTIALLY_FILLED`, a rejection preserves the order's
status and terms, including any amendments already applied by `OrderUpdated`. In `PENDING_CANCEL`,
it preserves the pending cancellation.

## Fields

Beyond the [common Python order event fields](index.md#common-python-order-event-fields),
`OrderModifyRejected` carries:

| Field            | Python type              | Required/default | Description                                      |
| ---------------- | ------------------------ | ---------------- | ------------------------------------------------ |
| `reason`         | `str`                    | Required         | The order update rejection reason.               |
| `venue_order_id` | `VenueOrderId` or `None` | `None`           | The venue-assigned order identifier, if known.   |
| `account_id`     | `AccountId` or `None`    | `None`           | The account associated with the order, if known. |
| `reconciliation` | `bool`                   | Required         | If generated during reconciliation.              |

## Example

Reading the event in a strategy handler:

```python
def on_order_modify_rejected(self, event: OrderModifyRejected) -> None:
    self.log.warning(
        f"Modify rejected for {event.client_order_id}: {event.reason}",
    )
```

## Related guides

- [Events](index.md) - Event categories, dispatch, and the common order event fields.
- [Orders](../orders/) - Order types and the state machine.

Shown in full with attribution under the source's licence. Licence: LGPL-3.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.