Skip to content
Nyria Docs

Trading Behavior

Set what each alert type does per direction: which entries open a position, whether exits are enabled, and which order type each side uses.

Trading behavior defines how your strategy interprets and executes alerts for each direction (LONG and SHORT).

Overview

Each strategy can handle four alert types:

  • Long Entries
  • Long Exits
  • Short Entries
  • Short Exits

For each direction, you configure:

  • What entry alerts do
  • Whether exits are enabled
  • Order types for entries and exits

Entry Behavior

Enter Position

Standard entry behavior - opens a position in the specified direction.

A long entry alert opens a long; a short entry alert opens a short.

Exit Long / Exit Short Position

Use entry alerts to close opposite direction positions. The option reads Exit Short Position on the long side and Exit Long Position on the short side, and is only offered when the opposite side is set to Enter Position — otherwise there is nothing to exit.

A long entry alert closes any open short; a short entry alert closes any open long. This is what you use when your alert source only ever sends entries.

Do Nothing

Ignore entry alerts for this direction.

Exit Behavior

Enable exit orders on

Allow exit alerts to close positions in this direction.

Enable exit orders off

Ignore exit alerts for this direction. Use it when the opposite side's entries are doing the closing, or when you close by hand.

If exits are off and the opposite side does not close for you, positions remain open indefinitely. You have to close them yourself; see Close a Position.

Configuration Examples

Flip Strategy (No Explicit Exits)

Long Behavior:

  • Entry: Enter Position
  • Exit: Disabled

Short Behavior:

  • Entry: Exit Opposite Position
  • Exit: Disabled

Result:

  • Long entry → Open long
  • Short entry → Close long, open short
  • Never flat, always in a position

Mean Reversion

Long Behavior:

  • Entry: Enter Position
  • Exit: Enabled

Short Behavior:

  • Entry: Exit Opposite Position
  • Exit: Enabled

Result:

  • Long entry → Open long
  • Long exit → Close long
  • Short entry → Close any long, open short
  • Short exit → Close short

Order Types

Each entry and each exit is either a market order or a limit order, set per side.

Limit Order Targets

A limit order needs a price. Which target is right depends on which way the money moves on that leg:

TargetUse it when
BidYou are selling: a credit spread entry, a short option entry, or closing a long
AskYou are buying: a debit spread entry, a long option entry, or closing a short
MidThe spread is tight and you would rather split it
CustomYou want the same fixed price every time
Alert PriceYour alert carries the price

On a spread, bid and ask mean the spread's bid and ask, not a single leg's.

If using "Alert Price" and an alert arrives without a price, it will be rejected. Ensure your alerts always include prices.

Multiple Entries

Control whether multiple positions can be open simultaneously:

Disabled (default) holds one position at a time: entry → exit → entry. A second entry signal while one is open is logged and skipped.

Enabled lets entries stack. Each one spends your full budget again.

Multiple entries multiply your risk. Three entries with $500 each = $1,500 total exposure. Ensure adequate capital.

Next Steps