Algo
- Bracket Orders - Entry OCO with Exit Bracket (Indicator)
Input Information
Name | Type | Default | Description |
Start | Numeric | 0 | Set to 1 issues entry bracket order on next tick, otherwise 0 does not. |
AccountNum | String | "Enter Account Number" | The account number (real or simulated) to be used for trading. |
TradeSize | Numeric | 1 | The initial number of contracts, or shares, that are to be entered and exited. |
EntryOffsetFromLastTrade | Numeric | 0.5 | The amount to offset the two entry orders from the price of the first trade after Start is set to True. |
ProfitTargetOffset | Numeric | 1 | The amount by which to offset the profit target order from the average entry price. |
StopLossOffset | Numeric | 0.5 | The amount by which to offset the stop-loss order from the average entry price. |
CancelOpenOrdersOnUnitializeEvent | Numeric | 1 | Set to 1 to cancel any open orders when the indicator status is turned off or when it removed from the analysis window. Otherwise, set to 0 to leave open orders active. |
Market Synopsis
The Algo - Bracket Orders - Entry OCO with Exit Bracket is a grid-based indicator that uses EasyLanguage order objects to place bracket orders based on user parameters specified from indicator inputs. You can first enter your account number, order quantity, and price offsets directly from the form. Then, when the Start input is set to 1, an entry bracket order is issued on the next tick. After one side or the other of the entry bracket is filled, an OCO exit bracket consisting of a stop-loss and profit target is issued.
The Algo - Bracket Orders - Entry OCO with Exit Bracket indicator makes use of the OCOOrderTicket class to create the entry OCO and the BracketOrderTicket class to create the exit bracket.
Important Note:
You must specifically check Enable order
placement objects on the Customize Indicator - General tab before
the indicator will allow orders to be placed. In addition, to view
order status markers on your chart, you need to go to Settings > Account
Orders & Positions and check the Status
box for the current symbol.
It
is recommended that you first use this indicator with simulated accounts
to become familiar with its order placement behavior.
Plot Information
None
Related
Bracket Orders - Entry OCO Breakout with Exit Bracket, BracketOrderTicket, OrderTicket, OCOOrderTicket