Bracket Orders - Entry OCO Breakout with Exit Bracket (Indicator)

Disclaimer

Input Information

Name Expression Default Description
Start True-False False Set to True to cause entry bracket order to be issued on the next tick, otherwise False.
AccountNum String "Enter Account Number" Account number (real or simulated) to be used for trading.
TradeSize Numeric 1 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 that follows setting the Start input to true.
ProfitTargetOffset Numeric 1 Amount by which to offset the profit target order from the average entry price.
StopLossOffset Numeric 0.5 Amount by which to offset the stop-loss order from the average entry price.
CancelOpenOrdersOnUninitializeEvent True-False True Set to True to cancel any open orders when the indicator status is turned off or when it removed from the analysis window.   Otherwise, set to False to leave open orders active.

Market Synopsis

The Bracket Orders - Entry OCO Breakout with Exit Bracket is a grid indicator that uses EasyLanguage objects to place bracket orders, based on user inputs, after the user input Start is set to true.  An entry OCO bracket is issued first.  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.  This completes the issuance of orders unless the value of an input is changed or the code reruns for some other reason (like a refresh, etc.)  The code plots a variety of information concerning order and position status in RadarScreen, so that the operation of the brackets can be tracked.

The Bracket Orders - Entry OCO Breakout with Exit Bracket indicator makes use of OrderTicket, BracketOrderTicket, and OCOOrderTicket objects to generate the orders and OrdersProvider and PositionsProvider objects to track the status of orders and positions.

 It is recommended that you first use this indicator with simulated accounts to become familiar with its order placement behavior.

Plot Information

Number Name Default Color Description
Plot1 Start Green/Red Shows whether order placement is active.
Plot2 Account Default Plots the account number.
Plot3 Position Default Plots the current position.
Plot4 Open Orders Default Plots the number of open orders.
Plot5 LE State Default Plots the state of the long entry order.
Plot6 LE Fill Default Plots the average fill price for the long entry.
Plot7 SE State Default Plots the state of the short entry order.
Plot8 SE Fill Default Plots the average fill price for the short entry.
Plot9 LX Side1 Default Plots side 1 of the long exit order.
Plot10 LX Side2 Default Plots side 2 of the long exit order.
Plot11 LX Fill Default Plots the average fill price for the long exit.
Plot12 SX Side1 Default Plots side 1 of the short exit order.
Plot13 SX Side2 Default Plots side 2 of the long short order.
Plot14 SX Fill Default Plots the average fill price for the short exit.

Related

BracketOrderTicket, OrderTicket, OCOrderTicket