the gridtrading easylanguage application · unlike other trading tools on the market, gridtrading...

18
The GridTrading EasyLanguage Application By Peter Parandjuk Vice President and Chief Architect of Advanced Trading Technologies [email protected] Important Disclosures All support, education and training materials provided by TradeStation are for informational and educational purposes only, and are intended to help customers learn more about the TradeStation trading platform and TradeStation’s brokerage services. No type of trading or investment advice is being given. This material may also discuss in detail how TradeStation is designed to help you develop, test and implement trading strategies. However, TradeStation does not provide or suggest trading strategies. We offer you unique tools to help you design your own strategies and look at how they could have performed in the past. While we believe this is very valuable information, we caution you that simulated past performance of a trading strategy is no guarantee of its future performance or success. We also do not recommend or solicit the purchase or sale of any particular securities or derivative products. Any symbols referenced are used only for the purposes of the demonstration, as an example not a recommendation. Finally, this material may discuss automated electronic order placement and execution. Please note that even though TradeStation has been designed to automate your trading strategies and deliver timely order placement, routing and execution, these things, as well as access to the system itself, may at times be delayed or even fail due to market volatility, quote delays, system and software errors, Internet traffic, outages and other factors.

Upload: others

Post on 10-Jul-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

The GridTrading EasyLanguage Application By Peter Parandjuk Vice President and Chief Architect of Advanced Trading Technologies [email protected]

Important Disclosures All support, education and training materials provided by TradeStation are for informational and

educational purposes only, and are intended to help customers learn more about the TradeStation

trading platform and TradeStation’s brokerage services. No type of trading or investment advice is

being given.

This material may also discuss in detail how TradeStation is designed to help you develop, test and

implement trading strategies. However, TradeStation does not provide or suggest trading strategies.

We offer you unique tools to help you design your own strategies and look at how they could have

performed in the past. While we believe this is very valuable information, we caution you that

simulated past performance of a trading strategy is no guarantee of its future performance or success.

We also do not recommend or solicit the purchase or sale of any particular securities or derivative

products. Any symbols referenced are used only for the purposes of the demonstration, as an example

– not a recommendation.

Finally, this material may discuss automated electronic order placement and execution. Please note

that even though TradeStation has been designed to automate your trading strategies and deliver

timely order placement, routing and execution, these things, as well as access to the system itself,

may at times be delayed or even fail due to market volatility, quote delays, system and software

errors, Internet traffic, outages and other factors.

Page 2: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

All proprietary technology in TradeStation is owned by our affiliate TradeStation Technologies, Inc.

Equities, equities options and commodity futures products and services are offered by TradeStation

Securities, Inc., a member of NYSE, FINRA, NFA and SIPC. Forex products and services are

offered by TradeStation Forex, a division of IBFX, Inc. (member NFA). ©2012 TradeStation. All

rights reserved.

Overview GridTrading gives you the most valuable trading actions, where and when they’re needed the most.

With the GridTrading you can quickly and easily place trades, manage positions, and manage orders,

directly from TradeStation RadarScreen. Once GridTrading has been inserted into RadarScreen, simply

left click any cell to see a context-sensitive menu of available trading actions. By intelligently

determining which trading actions should be available, GridTrading allows traders to act more quickly,

and with fewer errors, while at the same time saving valuable screen real-estate. The trading menus are

customizable, and can easily be modified to suit any user‘s unique trading style.

Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStation’s

award winning trader programming language. This not only allows users to modify it to meet their

unique trading needs, but also serves as an example that EasyLanguage developers can model new

trading solutions on.

Page 3: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Inserting GridTrading GridTrading is a RadarScreen only indicator that can be added from the Insert Analysis Dialog.

Formatting GridTrading

Alert thresholds, foreground and background colors, and display and trading configurations are set in the Format Indicator Dialog.

Page 4: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

GridTrading Output Four values will be plotted: Status (the Order State of a recently placed order with optional Order Id), Position (the shares/contracts/lots long or short), Open P/L, and Pct P/L. The last two plots can be configured to generate alerts.

Page 5: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

When GridTrading is initially added, a first time user dialog will appear describing the application and its usage.

Page 6: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Checking the “Don’t display again” checkbox will prevent the dialog from appearing when inserting the Application again. Even if “Don’t display again” is checked, holding the Ctrl and Alt keys while clicking in a cell will cause it to be shown.

GridTrading Menus A powerful aspect of GridTrading is its ability to present a context-sensitive trading menu when left clicking on a cell in RadarScreen. Note that the cell must contain a plotted value for the menu to appear. The menu will be created “on-the-fly”, showing available trading actions based on the plot name, plot category, outstanding orders, and outstanding positions. The menus are also customizable. By selecting “Menu…” under “Preferences”, users can choose to cascade less frequently used menu items, giving faster access to those actions used most frequently.

Market

Page 7: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Buy and Sell at Market menu items will always be available regardless of which cell is clicked. In the following image, the cell corresponding to the plot “Net Chg” and symbol “USDSEK” was clicked. Since no orders or positions existed for the symbol, and “Net Chg” is not a tradable price, the only trading menu choices are Buy at Market and Sell at Market.

Selecting the “Buy 10000 USDSEK @ Market” will cause that order to immediately be sent to TradeStation’s Order Execution Network. Once filled, the Status column corresponding to USDSEK will display a string indicating that the order was filled, along with the order id.

Limit Buy and Sell at Limit menu items will be available when clicking in columns that have been formatted to display their values “Same as symbol”. Note that some indicators have plots that are formatted to “Same as symbol” but it may not be appropriate provide an appropriate value to use in a limit order.

Page 8: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Auto-Limit Clicking in the columns related to bid or ask, such as Bid, BidSize, BidDir, BidTime, BidDate, BidExch, Ask, AskSize, AskDir, AskTime, AskDate, or AskExch, will result in order placement choices similar to those displayed when clicking on the Order Bar’s Auto button. The menu items available will be those most appropriate for placing orders using bid and or ask. Descriptions, along with images, are provided below. Note that for all orders generated from an auto-limit menu item, an actual limit price is not sent to TradeStation’s Order Execution Network, but rather an instruction to place the order using the prevailing bid or ask when the order is received. This helps to avoid situations where the inside spread may have changed between the time the order was placed, and the order was received. Join The Join menu items allow orders to be placed that “Join” the inside bid/ask spread by placing orders to buy at the bid or sell at the ask.

Page 9: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Improve The improve menu items allow orders to be placed between the bid and ask spread using an increment set by the selected Change Increment menu item. Improve orders use a Limit Price that is a Change Increment larger than the best Bid price for a Buy order and a Change Increment less than the best Ask price for a Sell order. Also, to protect you from crossing the market, the Improve price will not be greater than the Ask price for Buy orders or less than the Bid price for Sell orders.

Split The Split menu items allow buy or sell limit orders to be placed at the midpoint of the bid and ask spread.

Page 10: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Shave The Shave menu items allow orders to be placed between the bid and ask spread using an increment set by the selected Change Increment menu item. Shave orders use a Limit Price that is a Change Increment less than the best Ask for a Buy order and a Change Increment greater than the best Bid for a Sell order. Also, to protect you from crossing the market, the Shave price will not be less than the Bid price for Buy orders or greater than the Ask price for Sell orders.

Hit/Take The Hit/Take menu items allow orders to be placed at the prevailing ask for a buy order and at the prevailing bid for a sell order.

Page 11: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Hit/Take+ The Hit/Take+ menu items place orders an increment higher than the inside ask for buy orders and an increment lower than the inside bid for sell orders.

Change Increment The Change Increment menu items allow users to select the price increment, in points, to be used when placing orders using Improve, Shave, or Hit/Take+. Note that the increment value selected will be stored as a category value with a different value being stored for each asset class, with separate increments for equities, futures, forex, and options.

Page 12: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Quantity The Quantity menu contains a list of the most recently used (MRU) quantities for the symbol’s category. This allows users to quickly select a new quantity without having to open the Order Preferences dialog box. A quantity MRU list is maintained for each asset class, with separate lists for equities, futures, forex, and options.

Page 13: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Order Management When clicking in a cell where open orders (sending, sent, received, partiallyfilled, cancelpending, queued) exist for the symbol associated with the row, Cancel and Replace menu items will be available.

Cancel Users can cancel all open orders or individual open orders.

Replace Users can replace an open limit order with a market order.

Page 14: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Position Management When clicking in a cell where an open position exists for the symbol associated with the row, Close and Reverse menu items will be available. Close Close the open position using a market order.

Reverse Reverse the open position using a market order. For equities, two market orders will be sent. The first will close the open position. The second will enter the reversing position.

Page 15: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Chart Selecting the Chart menu item will cause a small thumbnail chart to appear at the location of the most recent click. The chart displays candlesticks for the last 50 bars of the selected symbol and interval. Additionally, open orders for the selected symbol and account will be displayed at their corresponding price levels.

Preferences The preferences menu contains “Order/Account…” and “Menu…” menu items allowing users to modify

order entry settings and configure how the trading menu appears.

Page 16: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Order/Account…

Displays the Order/Account Preferences dialog box where users can change the account, quantity, and duration to be used when placing orders.

If “Use as category default” is unchecked, new settings will be made only for the symbol in the selected

row. Note that when saving a value in this manner, the symbol/row instance will no longer respect

category level changes.

When changing a setting with “Use as category default” checked, the new value will be available to all

symbols of the same category that have not previously saved the setting as instance only.

Menu…

Displays the Menu Preferences dialog box where users can configure the trading menu.

Page 17: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

Unchecking an item will cause menu items in that group to appear on the main trading menu, instead of

cascaded. This makes the trading menu larger, but allows quicker access to frequently used menu

items. Note that changes make will be reflected in all RadarScreen windows that have GridTrading

applied.

The following image shows the result of unchecking “Buy/Sell Market” and “Quantity”.

A note to developers

Page 18: The GridTrading EasyLanguage Application · Unlike other trading tools on the market, GridTrading is written entirely in EasyLanguage, TradeStations award winning trader programming

As with ChartTrading, GridTrading is not only useful in its own right, but it serves as an excellent

example of the type of powerful applications that can be created using EasyLanguage. It makes

extensive use of the new ContextMenu class (introduced in 9.1 Update 12) and the AppStorage property

(introduced in Update 10), as well as ticket classes and trading providers. We encourage our 3rd party

developers to review the code and use it to generate ideas for their own applications.