Triggered Orders

Triggered orders are orders created to execute when certain conditions are met. Orders may apply to a new position or impact an existing pending order. The author of the Vela team trigger wallet is able to trigger a trade.

Unlinked Orders - Creating a New Position

Limit Order

INITIAL CONDITIONORDER TRIGGER CONDITION (LONG)ORDER TRIGGER CONDITION (SHORT)

Limit Price < Mark Price

Mark Price = Limit Price

Placed as Market Order

Limit Price > Mark Price

Placed as Market Order

Mark Price = Limit Price

Stop Order

INITIAL CONDITIONORDER TRIGGER CONDITION (LONG)ORDER TRIGGER CONDITION (SHORT)

Stop Price < Mark Price

Placed as Market Order

Mark Price = Stop Price

Stop Price > Mark Price

Mark Price = Stop Price

Placed as Market Order

Stop Limit Order

INITIAL CONDITIONLIMIT ORDER ACTIVATION CONDITION (LONG)LIMIT ORDER ACTIVATION CONDITION (SHORT)

Stop Price < Mark Price

Placed as Market Order

Mark Price = Stop Price

Stop Price > Mark Price

Mark Price = Stop Price

Placed as Market Order

In the case where the limit order is activated (Mark Price = Stop Price) then the following table will apply.

INITIAL CONDITIONORDER TRIGGER CONDITION (LONG)ORDER TRIGGER CONDITION (SHORT)

Stop Price < Limit Order

Placed as Market Order

Mark Price = Limit Price

Stop Price > Limit Order

Mark Price = Limit Price

Placed as Market Order

Linked Orders to an Open Position

Percent vs Quantity for Closing a Position

When closing a position the user must enter the percent (dashed red box in image above) of the position to close for each order type. They can also manually type in an asset quantity (dashed blue box in image above) to close, however this will auto populate the percent field based on the current position size. It is important to recognize that Vela Exchange utilizes the percent amount, rather than quantity, to determine how much of the position will get closed when a linked order is triggered.

For example, assume there is an existing 2.00 WETH long position with two take profits set; The first at 1300.00 for 80% (shown initially as qty 1.60 WETH) The second at 1350.00 for 50% (shown initially as qty 1.00 WETH)

Now let's say the user adds another 0.50 WETH to this position prior to the price reaching 1300.00 making their total position size = 2.50 WETH.

When the price reaches 1300.00, the first take profit will trigger, closing 80% of the position (=2.00 WETH) resulting in a new position size of 0.50 WETH. When the price reaches 1350.00, the second take profit will trigger, closing 50% of this existing position (=0.25 WETH). Notice that, since percent takes precedence, the initial quantities shown are irrelevant if there are any changes to the overall position size before the linked order is triggered.

*To fully close a position, you must always set a trigger to 100%

Take Profit / Stop Loss Order

INITIAL CONDITIONORDER TRIGGER CONDITION (LONG)ORDER TRIGGER CONDITION (SHORT)

Take Profit < Mark Price

n/a

Mark Price = Take Profit

Take Profit > Mark Price

Mark Price = Take Profit

n/a

Stop Loss < Mark Price

Mark Price = Stop Loss

n/a

Stop Loss > Mark Price

n/a

Mark Price = Stop Loss

Trailing Stop Order

INITIAL CONDITIONORDER TRIGGER CONDITION (LONG)ORDER TRIGGER CONDITION (SHORT)

Trailing Stop as X %

Mark Price drops X% from High

Mark Price rises X% from Low

Trailing Stop as X Amt

Mark Price drops X from High

Mark Price rises X from Low

Last updated