Trading Information Windows

General Information

This page documents the various Trading Information windows available in Sierra Chart.

Sorting Lines, Reordering Columns, Adjusting Column Widths

On the tabs of the Trade >> Trade Orders and Positions window, there is the ability to sort the lines of data, reorder the columns and adjust the column widths.

On the tabs of the Trade >> Trade Activity Log window, there is the ability to reorder the columns and adjust the column widths only.

Setting Colors

The foreground and background colors of the content sections of the tabs of the Trade >> Trade Orders and Positions and Trade >> Trade Activity Log windows, can be customized with the following color settings in Global Settings >> Graphics Settings.

  • General Text Window Background Color
  • General Text Window Foreground Color

For instructions to set these, refer to Graphics Settings.

Additionally, in case of the Orders and Positions tab, the colors of Open and Completed borderlines have separate color settings. Refer to Orders Tab Font and Colors.

Trade Orders Tab

To open the Trade Orders window tab, select Trade >> Trade Orders and Positions on the menu. Select the Orders tab on the Trade Orders and Positions window.

This tab lists all Open orders, both simulated orders and orders for the connected Trading service. Simulated orders are prefixed with [SIM] in front of the Symbol.

When the Status of an order changes from Open or Order Sent to Canceled, Filled or Error, it will still be listed on this tab, but it is not persistent and will be cleared when Sierra Chart is restarted. There is no guarantee that orders other than Open orders, will be listed on this tab. Do not put reliance on orders other than Open orders from being listed on this tab.

Left clicking with your Pointer on a column header will sort rows according to that column. When left clicking again on the column header, the sort order will change from ascending to descending or the other way around.

Canceling Orders

  1. Select Trade >> Trade Orders and Positions on the menu.
  2. Select the Orders tab
  3. Highlight the order you wish to cancel in the list of orders by left clicking on it with your mouse pointer.
  4. To cancel multiple orders at the same time, hold the Control key on your keyboard and left click on each order to select them all.
  5. If you orders you are canceling are non-simulated orders, then make certain there is no checkmark by Trade >> Trade Simulation Mode On on the menu of the main Sierra Chart window.
  6. Press the Cancel button on the Trade Orders and Positions window to cancel these orders.
  7. You will receive a confirmation window. Press Yes to confirm. This confirmation window can be disabled with Global Settings >> General Trade Settings >> Display Confirmation for Order Cancellations through the Trade Orders Window.
  8. To cancel all working orders in the list, press the Cancel All button.

Clearing Orders

Simulated Orders

To clear simulated open and completed orders from the Orders list, select Trade >> Clear Trade Simulation Orders and Data on the menu to clear them. This will cancel all Open Simulated orders and clear all of the Simulated orders listed. It will also clear simulated trading activity data Trade Activity Log as well.

Non-Simulated Orders

When you connect to the data and trade server, working and filled orders that the server still has for your account will be listed on the Orders tab of the Trade Orders and Positions window. They cannot be removed.

However, you can click on a column header, like the Status column, to sort the column and move the Open orders to the top of the list. Also, it is possible to view open orders only. Refer below for instructions.

Viewing Open Orders Only

To view only orders with a Status of Open in the Orders list, select Orders >> Show Only Working Orders on the Trade Orders and Positions window.

Automatic Clearing of Orders

When preforming an automated trading system backtest with Trade >> AutoTrade System Bar Based Backtest | AutoTrade System Backtest, or you are replaying a chart and have the replay mode set to Accurate Trading System Backtest Mode, then trade orders which are no longer working in the Orders will be removed from the list automatically.

Refreshing Order Data

Orders which are considered Open (Working) orders will have an Order Status of: Order Sent, Pending Open, Pending Child, Open, Pending Cancel, Pending Modify.

If there are open orders displayed on a chart or listed in the Trade >> Trade Orders and Positions >> Orders window tab, and you know they are no longer open, then press the Refresh Trade Data button on the Orders and Positions window. If Sierra Chart does not receive any data for an open order from the connected Trading service, it will be internally canceled either immediately or on a 45 second delay depending upon the Trading service. Internally canceling means the order is not actually canceled with the external Trading service, it is canceled within Sierra Chart which indicates it is no longer open.

There can be certain scenarios why Sierra Chart may not have received a status update for an order and the order still displays with an Open state. For example, if you disconnect from the Data and Trade server (File >> Disconnect), and then you cancel the order through another program, Sierra Chart will not know about this. However, when you connect again to the Data and Trade server, if Sierra Chart does not receive any data for listed orders that are in an Open state, they will be internally canceled. This occurs either within 5 seconds of the connection to the trading server, or after 45 seconds depending upon the Trading service.

Another step you can take if you question or have any issue with the Orders or Position data you see displayed on the Trade Orders and Positions window is to reconnect to the servers by selecting File >> Disconnect and then File >> Connect to Data Feed.

Order Field Descriptions

  • Entry Time: This is the Date and Time that an order has been added to the Trade Orders Window. It is not necessarily the time that the order was actually submitted. For example, when you connect to a trading service, the working orders will be requested and listed. If a working order is received from the Trading service and is not already listed, then this will show the Date Time that the order was added to this list. This Date Time is based upon your local computer clock. And not the server. This time is adjusted to the Time Zone setting in Sierra Chart. During a chart replay, this Date Time is based upon the last Date Time in the replaying chart at the time the order was submitted.
  • Last Activity Time: This is the Date Time that the listed order has been last updated. This is based upon your local computer clock. And not the server. This time is adjusted to the Time Zone setting in Sierra Chart. During a chart replay, this Date Time is based upon the last Date Time in the replaying chart and not the current actual time.
  • Symbol: This is the symbol of the order. If the order is not simulated and sent to the connected Trading service, then the symbol will have no prefix in front of it. If the order is being handled by the Sierra Chart Trade Simulation Mode, then the symbol will have the [Sim] prefix.
  • Order Quantity: This is the quantity of the order. This can either be contracts, shares, or currency units.
  • Price: This is the price of the order. If the order has only one price, then this is the only price used.
  • Price2: In the case of Stop-Limit orders, this is the Limit price. Price2 is only used for Stop-Limit orders.
  • Status: This is the order status. It can be one of the following:
    • Order Sent: The trade order has been sent to the Sierra Chart Trade Simulation system or the connected Trading service. It will be changed to another order status once the Trade Simulation system or the connected trading service gives an indication that the order has been received.

      In the case of the Sierra Chart Trade Simulation system will immediately change the status to Open. It will not remain in the Order Sent status.

      In the case of when an order is sent to an external connected Trading service, if the order is not acknowledged it will remain in the Order Sent status. In this case select Trade >> Refresh Trade Data From Service. Either the order status will immediately change or the order will be cancelled by Sierra Chart within one minute if there is no response from the Trading service for it.

      Depending upon the Trading service you are using and the actual state of the order it may or may not be able to be canceled in this state.
    • Pending Open: This order status is only valid when an order is sent to the connected external Trading service. It is not used in Sierra Chart Trade Simulation Mode. It generally means the that the connected trading service has indicated that the order has not yet reached an Open state and therefore it cannot be filled in this state. It should be possible to cancel an order in this state.
    • Open: The order is in a working state and can be filled. It may also be partially filled and still working. In the case of a non-simulated order, the connected Trading service has indicated that the order has been accepted and it is working. It is possible to cancel an order in this state. In Trade Simulation Mode, there are no partial fills, an order is either completely filled or not filled.
    • Filled: The order has completely filled or has been canceled before it has completely filled. In Trade Simulation Mode, there are no partial fills, an order is either completely filled or not filled. Generally there is no reason to cancel an order in this state, but it is possible to select the order in the Trade Orders Window and Cancel it.
    • Pending Cancel: A request to cancel the order has been made and confirmation of the cancellation is being awaited. It is possible to attempt further cancellations in this state.
    • Canceled: The order has been canceled. It is no longer working or in an Open state. It cannot be filled any longer. The order may have been partially filled. Whether a partially filled order that has been canceled will have a status of Filled or Canceled depends upon the Trading service you are connected to and what status they give. In the case of Trade Simulation Mode, a canceled order will always have a status of Canceled.
    • Pending Modify: A request to modify the order has been made and confirmation of the modification is being awaited. It is possible to cancel an order in this state.
    • Pending Child: This order status only applies to Attached Orders . It means the order is being held by Sierra Chart until the parent order fills partially or completely. The orders can be definitely and immediately canceled in this state. When the parent order partially or completely fills, then the Attached Orders will have their Status changed to Open.
    • Error: There was some error with the order. This could happen initially or at some other point during the life of the order. The reason for the error usually will be displayed in Trade >> Trade Service Log. The line in the Trade Service Log will contain the order's Internal Order ID and Service Order ID for reference.
  • Internal Order ID: This is a numeric identifier that Sierra Chart internally uses to identify the order. This is always an integer value.

    In the case where you have more than one instance of Sierra Chart running and connected to the same external trading account, non-simulated orders will be listed in each instance and for the same order with the same Service Order ID, the Internal Order ID will be unique for each instance.
  • Order Type: This is the order type. It can be any of the supported order types.
  • Filled Quantity: This is the quantity of shares or contracts that has been filled.
  • Buy/Sell: This indicates the Side of the order. This can be either Buy or Sell.
  • Service Order ID: This is the order identifier provided by the external Trading service to identify the order. In the case of a Simulated order, using Sierra Chart Trade Simulation Mode, this will always be the same as the internal order ID.
  • Open/Close: This will be either Open or Close and indicates whether the order will open or close a position.
  • Average Fill Price: This is the average fill price for the order.
  • Parent Internal Order ID: This is the Internal Order ID of the parent order in case this is a Child/Attached Order order. Otherwise this is 0.
  • Time in Force (expiration type): The Time in Force for the order. Possible values include Day, Good till Canceled, Good till Date Time, Immediate or Cancel, All or None, Fill or Kill.
  • Good Till DateTime: If the Time in Force is Good till Date Time , then this field indicates the order expiration date and time.
  • Trade Account: The account identifier with your Trading service for which this order is contained in. In Sierra Chart Trade Simulation mode, simulated orders will indicate Sim.
  • Link ID: An Attached Order that is in the All Groups OCO Group or a parent order, will be split into smaller orders if there is more than one OCO group used in the list of Attached Orders submitted with an order. When an order is split into smaller orders, they are linked together and this indicates the Internal Order ID used for linking. It is the Internal Order ID of the first order in that group. When one of the orders in a group of orders linked together is modified or canceled, the other ones will be as well. This happens automatically.
  • OCO ID: If two orders are in an OCO (order cancels order) group, then this field will display the OCO Internal ID for that OCO group and it will match with the other order that is part of the same OCO group. The OCO Internal ID is the Internal Order ID of one of the orders in the OCO group.
  • Last Order Action Source: This fields displays the source of the last action for the order. In the case of a newly entered order, it will display the name of the chart the order originated from.

Orders Tab Font and Colors

The Font for the Orders tab of the Trade Orders and Positions window is set through the Global Settings >> Graphics Settings window. Refer to the Fonts documentation for this.

The name of the font is Text Windows Font.

The colors of Open and Completed order lines are colored separately. These colors are set through the Global Settings >> Graphics Settings window. The color settings are as follows:

  • Trade Orders Window Open Order: This color setting sets the color of order lines in the Trade Orders list that have an order status of Order Sent, Pending Open, Pending Child, Open, Pending Modify, or Pending Cancel.
  • Trade Orders Window Completed Order: This color setting sets the color of order lines in the Trade Orders list that have an order status of Filled, Canceled, or Error.

For more information, refer to Graphics Settings.

Trade Positions Tab

To view the Trade Positions window tab, select Trade >> Trade Orders and Positions on the menu.

The tab labeled Positions displays the current Trade Positions for non-simulated trading.

Overview

The Positions tab on the Trade Orders and Positions window displays the current Trade Positions for non-simulated trading.

This Trade Positions data is calculated from the order fills as they occur in real time and will be automatically synchronized to the Trading Service Positions data if it is out of sync with it. So the displayed Trade Positions on the Positions tab will always represent the accurate and current Trade Positions.

For a list of simulated Trade Positions, refer to the Trade Statistics for Charts tab on the Trade >> Trade Activity Log window.

Refresh Trade Data

The Refresh Trade Data button will refresh the non-simulated Orders and Positions data from the connected trade server. It has no effect upon simulated trading data. This never has to be done manually in almost all conditions since the Orders and Positions are automatically updated.

Flatten Trade Positions

Follow the instructions below to flatten all current non-simulated Trade Positions.

Flatten means to send a market order to make the current Position quantity 0.

  1. Select Trade >> Trade Orders and Positions on the menu.
  2. Select the Positions tab.
  3. Enable Position >> Cancel Orders for Symbol When Flatten, if you want all non-simulated open/working orders for the symbols having their Positions flattened, to also be canceled at the same time.
  4. In the list of Positions, select the Position or Positions lines you want to flatten. To select multiple Positions hold the Control key and select them one by one.
  5. Press the Flatten button.
  6. Press Yes to confirm.

Positions Tab Fields

The following is a list of the fields for each symbol displayed on the Positions tab on the Trade Orders and Positions window.

  • Symbol: This is the symbol for which the Position data is for.
  • Quantity: This is the quantity of the Position. This will either be contracts, shares, or currency units depending upon the type of market the Symbol is for.
  • Trade Account: This is the Account identifier for the Trade Position.
  • Trade Service Average Price: This is the Average Price of the current Position provided by the connected Trading service. Sierra Chart also calculates and maintains its own Average Price for the Trade Positions which is dynamically calculated from the order fills in the Trade >> Trade Activity Log. This calculated Average Price can be viewed on a chart, Trade DOM, and the Trade Statistics and Trades tabs of the Trade Activity Log. For more information, refer to How Average Price for Positions Is Calculated and Used.
  • Trade Service Position Quantity: This is the Position quantity for the symbol provided by the connected Trading service. The Quantity field is calculated by Sierra Chart by the order fills received. If the Quantity field becomes different than Trade Service Position Quantity, then Quantity is synchronized to the Trade Service Position Quantity.

    The reason there are two separate quantity fields is so that Sierra Chart can accurately determine whether a fill received is an opening or closing (entry or exit) fill. Sierra Chart cannot do this without maintaining its own independent Trade Position Quantity variable set from the order fill events received from the server.

Position Quantity and Automated Trading

In the case of one performing automated trading using ACSIL or the Spreadsheet System for Trading study, it is helpful to understand the following regarding the Trade Position Quantity fields.

The Trade Position Quantity which is the Quantity displayed in Sierra Chart have given to automated trading systems is updated by fills/executions. It is not directly updated by Trade Position data updates from the external trading service.

However, if the calculated Trade Position Quantity from the order fills is out of sync with the reported Trade Service Position Quantity from the external trading service, then after about 8 seconds the order fill calculated Position Quantity will be synchronized to the Trade Service Position Quantity after there has been an unsolicited update of the Trade Service Position Quantity.

If there is a solicited Trade Position data update, the synchronization happens immediately.

Simulated Trade Positions Quantities and Average Price

Simulated Trade Positions data for Trade Positions created while in Trade Simulated Mode are not displayed on the Trade Positions Tab of the Trade Orders and Positions window.

Simulated Trade Positions data are displayed on the Trade Window for a Chart or Trade DOM and on the Trade Statistics for Charts Tab on the Trade >> Trade Activity Log.

the current Trade Position Quantity you see displayed on a Trade Window and on the Trade Statistics for Charts tab for a particular Symbol is for the Selected Trade Account.

The current Simulated Trade Position Quantity for a particular Symbol and simulated Trade Account is calculated from all of the order fills in the Trade Activity Log >> Trade Activity Tab for that Symbol and Trade Account.

If Global Settings >> General Trade Settings >> Save Replay/BackTest Trade Activity is not enabled, then after exiting Sierra_hart, order fills occurring from a chart that is replaying or being back tested, will be lost.

The fills which make up the current Trade Position for a particular Symbol and Trade Account are the available unmatched opening fills for that Symbol and Trade Account which do not yet have a corresponding closing fill yet. Closing fills which have no matching opening fill, are not included in the calculation. The quantities of these unmatched opening fills are combined together. Buy fills are added, and Sell fills are subtracted. For example, 2 Buy fills with a quantity of 2 each, will create a Trade Position of +4. 2 Sell fills with a quantity of 2 each will create a position of -4.

A fill to fill Order Fill Grouping method is used in the Trade Position Quantity calculation.

The following will cause the Trade Position data for a Symbol and Account to be cleared:

Using Order Fill Calculated Positions In Special Cases

There are some special cases where you cannot rely upon the Trade Position data from the Trading service you are using. An example of this would be futures spread/strategy symbols often do not have reported Trade Position data for them but instead are reported for the outright contracts themselves. Another case would be where Trade Positions are not provided at all, as is the case with the LMAX Forex trading service.

In these cases it is necessary to use the Using Order Fill Calculated Trade Positions. In the case of TT FIX spreads/strategies and when using LMAX, the Order Fill Calculated Positions will automatically be used.

To confirm you cannot use the Trading service provided Trade Positions data, select Trade >> Trade Orders and Positions >> Positions from the the menu. If you do not see the non-simulated Positions that you have in your trading account, or the symbols for those Positions do not match the Chart or Trade DOM, then it is necessary to use the Order Fill Calculated Positions.

For instructions to use the Order Fill Calculated Position for a chart or Trade DOM, refer to Using Order Fill Calculated Trade Positions.

When it is necessary to use the Order Fill Calculated Trade Position data in a Chart or Trade DOM because the Trading service does not provide any Trade Positions data or does not carry overnight Trade Positions, it is also necessary to enable Trade >> Use Fill Calculated Positions-Global , in order for the Trade Statistics and Trades tabs in the Trade >> Trade Activity Log to be reporting correct information.

Using Order Fill Calculated Trade Positions

For various reasons, when trading some symbols through some Trading services or with certain Trading services, you cannot rely upon the Trade Position data provided by the Trading Service you are using.

Trade Position data may not be available or it may not accurately track the true Trade Position Quantity for a Symbol and Trade Account. For example, when trading exchange traded futures spreads or strategies through some Trading services, no current Trade Position data is provided for that particular spread/strategy.

Additionally, you may want to have a Trade Position reported in a Chart or Trade DOM which begins from a specific Date-Time independent of the actual Trade Position for the Symbol and Trade Account.

Sierra Chart has a feature where you can see the current Trade Position Quantity and Average Price for a Symbol and Trade Account on a Chart or Trade DOM, calculated directly from all of the order fills Sierra Chart has for non-simulated trading for that Symbol and Trade Account.

This is a method by which you can track the current Trade Positions completely independent from the Trading service reported Trade Position data.

This feature can be enabled by Opening the Trade Window and enabling Menu/M >> Use Order Fill Calculated Position.

Use this option to report the Trade Position Quantity and Average Price based strictly upon the order fills that Sierra Chart has for the Symbol and Trade Account the Chart or Trade DOM is set to. This command is specific to each individual chart or Trade DOM it is enabled for.

You can switch in and out of this at will. If a fill is missed, Sierra Chart will attempt to download missing fills upon a connection to the server, so it can always accurately report the Trade Position for a particular Symbol and Trade Account so long as there are no missing fills.

This feature can also be enabled globally by enabling Trade >> Use Fill Calculated Positions-Global.

It is important to be aware that Sierra Chart needs to have all of the order fills stored in the Trade >> Trade Activity Log >> Trade Activity tab for an accurate Trade Position Quantity and Average Price indication.

The number of days saved in the Trade Activity Log is set through Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log. Since non-simulated order fills are very essential for this feature, Sierra Chart will store order fills for 3 times the number of Days specified with this. However, all other Order activity is only held for the specified number of days.

When using Use Order Fill Calculated Position the very first order fill will be considered an opening fill whether it actually was or not. And all of the other fills subsequent to that will be considered either Open or Close fills relative to the first opening fill. Therefore, if order fills are missing, the reported Position Quantity will be incorrect.

It is also supported to calculate the Trade Position data from a specific Date-Time. Select Chart >> Chart Settings >> Advanced Settings on the chart or Trade DOM menu.

Set the Order Fills Start Date-Time to the Date-Time of where the order fills should begin at or after to use in the calculation. This Date-Time is relative to the Time Zone setting in Sierra Chart or the Chart.

Set this to 0 to use all order fills that are available for the Symbol and Trade Account. If you notice an inconsistency between the Order Fill Calculated Trade Position data among charts that use the Order Fill Calculated Trade Positions feature, then make sure that Order Fills Start Date-Time is set consistently for them.

Order Fill Calculated Trade Position Not Accurate

Since the Order Fill Calculated Trade Position relies upon order fill data and not upon Trade Position data from the external Trading service, it is essential that Sierra Chart has all of the order fills that currently make up the current Trade Position and those fills are accurate.

Therefore, if there is any inaccuracy with the reported Order Fill Calculated Trade Position Quantity or Average Price there are 2 possible solutions:

  1. Add or correct the order fills. To do this, select Trade >> Trade Activity Log. Select the Trade Activity tab.

    Use the Edit >> Insert Trade Activity Entry or Edit >> Edit Trade Activity Entry menu commands.

    For more information, refer to the Trade Activity Log Menu Commands documentation.
  2. When you are flat a particular Symbol in a Trade Account or want to have reported that you are flat that particular Symbol, what you will need to do at that time is completely clear the non-simulated Trade Activity for that particular Symbol and Trade Account.

    For instructions, refer to Clearing Trade Activity.

Order Fill Calculated Trade Position Average Price

The Average Price for the Order Fill Calculated Trade Position is determined from the weighted average of the fill prices for the order fills which the Trade Position consists of.

These order fills are listed in the Trade >> Trade Activity Log >> Trade Activity tab. For the fill price for each fill, refer to the FillPrice field.

To understand how order fills are matched and grouped together, refer to Order Fill Matching Methods section.

In the case of the Order Fill Calculated Trade Position used in the chart or Trade DOM, a Fill to Fill order fill grouping method is used. Those fills which are grouped together according to this method, are the ones that the Average Price is calculated from. A weighted calculation is used based upon the fill quantities.

Balance Tab

To display the Balance tab, select Trade >> Trade Orders and Positions >> Balance from the menu.

The Balance tab displays various fields of Account Balance related data. This data is only for non-simulated trading and comes from the Trading service Sierra Chart is connected to.

There is a separate line of Account Balance data for each Trade Account associated with the logged in Trading account username.

There is no Account Balance data maintained for simulated trading when Trade >> Trade Simulation Mode On is enabled.

Not all supported Trading services provide Account Balance related data and not all of them will continuously update this data. If the Trading service provides Account Balance data, it may be infrequently updated. If the Account Balance fields are empty, then this means that the particular Trading service you are using does not provide this data. In this last case, you will need to ask your Trading service about how to view their Account Balance data.

The frequency of the Account Balance data updating depends upon how often the Account Balance data is transmitted by the connected Trading service. This is not something that Sierra Chart can control.

Balance Tab Field Descriptions

  1. Trade Account: This is the trade account number. The account balance fields are for.
  2. Cash Balance: This is the cash balance in the account. Not provided with all Trading services.
  3. Available Funds For New Positions: This is the amount available to take new positions. Not provided with all Trading services.
  4. Margin Requirement: This is the amount required to maintain existing positions. Not provided with all Trading services.
  5. Account Value: This is the total account value of cash and securities in the Trade Account. Not provided with all Trading services.
  6. Account Currency: This is the currency for all of the other balance fields on the same line.

Trade Service Log

To display the Trade Service Log, select Trade >> Trade Service Log from the menu.

If the Trade Service Log does not display when selecting a menu command, then first select Window >> Reset Windows and try selecting the command again. The Trade Service Log will then be displayed.

The Trade Service Log displays the following messages:

  • Messages from the connected Trading service you are using.
  • Trading related error and information messages from Sierra Chart.
  • Automated Trading related messages.

Automatic Opening of Trade Service Log

In the case where the Trade Service Log is automatically opened when a message is added which requires a user's attention you can close the Trade Service Log by pressing the X button at the top right of that window or press the Close Log button.

Alternatively, you can just keep the Trade Service Log open and move it to the edge of your screen if you do not want to see it. When it is left open, it will not automatically open when a message is added which normally would open the Trade Service Log.

Some messages like automated trading messages can either open the Trade Service Log if it is not already open when they are added, or not automatically open the Trade Service Log. The setting that controls this is Global Settings >> General Trade Settings >> Open the Trade Service Log When a New Message is Added.

Trade Activity Log

To display the Trade Activity Log, select Trade >> Trade Activity Log from the menu. For more information refer to the Trade Activity Log page.

Trade Data Studies

Sierra Chart provides many studies that display trading information from the order fill data in the Trade >> Trade Activity Log, in a graphical form for each bar in the chart.

To add one of the to studies listed below to a chart, select Analysis >> Studies on the menu and Add them to the chart just like any other study.

These studies use all order fill data that is available in the Trade >> Trade Activity Log for the symbol of the chart.

When Trade >> Trade Simulation Mode is checked, then simulated order fills will be used in the study.

When Trade >> Trade Simulation Mode is off/unchecked, then non-simulated order fills will be used in the study.

With all of these studies, when there is no fill data for a particular bar in the chart, the study will carry forward and draw the prior value, if any.

In the case of all of these studies, a Closed trade consists of a fill that increases a Trade Position and the subsequent order fill that fully offsets that increase in the Trade Position. The Fill to Fill Order Fill Matching Method is used when determining a closed trade.

For the trading studies that display Profit/Loss values, the format of the Profit/Loss value is dependent upon the Chart >> Chart Settings >> Advanced Settings >> Position Profit Loss display setting. Profit/Loss formats which use - Ignore Quantity will be considered the format without the Ignore Quantity. Therefore, if you select Ticks - Ignore Quantity, it will be interpreted as Ticks.

  • Trading: Closed Profit/Loss: This study will display the cumulative profit/loss from closed Trades that there are order fills for in the Trade Activity Log for the Symbol and Trade Account. All available order fills are included. A closed Trade is one in which there is an opening fill and a closing fill. A currently open Trade which has no corresponding closing fill is not included in the study. For further details, refer to the Trades tab of the Trade Activity Log.
  • Trading: Daily Profit/Loss: This study will display the cumulative Profit/Loss from closed trades for each day in the chart. Each day is 24 hours and is based upon the reset time set in Global Settings >> General Trade Settings >> Daily Stats Reset Time .
  • Trading: Maximum Drawdown: This study will display what the maximum drawdown is for closed trades at each bar in the chart.
  • Trading: Maximum Runup: This study will display what the maximum runup is for closed trades at each bar in the chart.
  • Trading: Profit/Loss Text: For more information about this study, refer to Trading: Profit/Loss Text Study.
  • Trading: Total Quantity Filled: This study will display the total quantity filled for closed trades, at each bar in the chart.
  • Trading: Total Trades: This study will display the total number of closed trades at each bar in the chart.
  • Trading: Winning Trades: This study will display the total number of winning closed trades at each bar in the chart.
  • Trading: Losing Trades: This study will display the total number of losing closed trades at each bar in the chart.

Inputs

The following input applies only to the Trading: Total Quantity Filled study.

  • Yes = Daily Values, No = Cumulative Values: When this input is set to Yes, the trading data displayed by the study is reset at the reset time set through Global Settings >> General Trade Settings >> Daily Stats Reset Time . When this input is set to No, the trading data displayed by the study does not reset at the specified time, it is cumulative.

Trading: Profit/Loss Text Study

The Trading: Profit/Loss Text study, is a study which displays various Profit/Loss values and trade statistics directly on the chart in text form. This text can be positioned anywhere on the chart by using the study inputs to control its position.

To add this study to the chart, refer to the Adding Chart Studies documentation.

For the non-daily Cumulative Profit/Loss values and the Trade Statistics like Closed Profit/Loss , this study uses all order fill data from the Trade >> Trade Activity Log >> Trade Activity tab.

To see the order fill data that the study uses, go to the Trade Activity tab and at the top set the Symbol setting to the symbol of the chart, set the Trade Account setting to the trade account of the chart, select Fills , select Simulated or Non-simulated depending upon the source of the fills, and set the Date-Time controls at the top to display all the fills for the symbol.

You will have to set a Date which is back from the current Date by the number of days that the Trade Activity Log stores data for. This will be from the current Date going back by the number of days set in Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log .

When Chart >> Chart Settings >> Advanced Settings >> Order Fills Start Date-Time has the Date box filled in, then order fills are only loaded into the chart since the starting Date-Time and not all of the order fills are used.

You may want to set Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log high enough to make certain you have all of the fill data needed for this study.

For more information, refer to the Trade Activity Log. Depending upon the first Date-Time of the order fills for a particular symbol, upon restarting Sierra Chart, there could be less historical fill data available after the restart if Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log is not set high enough.

The study has Yes/No inputs to display each of the items below. Below are explanations of how each of the items that can be displayed, are calculated.

The Text Size for this study can be controlled through the Text Size Input with this study. Refer to Modifying Chart Studies . To control the particular Font Face, this can be changed through Global Settings >> Tool Settings >> Global Chart Drawing Font. After changing the Font Face, it is necessary to select Chart >> Recalculate for any chart containing the study for the new font to go into effect.

Open Profit/Loss Calculation

This is the Open position Profit or Loss. This calculation is based upon the last trade price for the symbol and the Position Average Price. For information about how the Position Average Price is calculated or obtained, refer to How Average Price for Positions Is Calculated and Used.

Closed Profit/Loss Calculation

Closed Profit/Loss is the cumulative profit/loss of completed trades, using a Fill to Fill matching method for the purpose of grouping fills into trades. This is based upon all of the fills for the symbol in the Trade >> Trade Activity Log.

Daily Profit/Loss Calculation

This is the cumulative profit/loss of completed trades that were opened in the current trading day, using a Fill to Fill matching method for grouping fills into Trades. This is based upon the order fills for the current trading day for the Symbol and Trade Account in the Trade >> Trade Activity Log.

By default, the trading day begins at midnight. This can be changed through Global Settings >> General Trade Settings >> Daily Stats Reset Time. Fills in the current day closing out trades in a prior day are excluded. If there are any missing or inaccurate fills for the current trading day, then this value will not be accurate.

Keep in mind the Daily Profit/Loss will reset to 0 upon the start of a new day.

Net Profit/Loss Calculation

The Net Profit/Loss is the Daily Profit/Loss plus the current position Open Profit/Loss.

If the Net Profit/Loss is incorrect, then you will need to clear all of the Trade Activity data for the Symbol and Trade Account in order to start from a clean state. To do this, refer to Clearing the Trade Activity Log.

Missing or inaccurate order fills can cause the order fill calculated Net Profit/Loss to be inaccurate. Refer to the Trade Activity Log documentation for instructions to view the order fills that you have for the symbol. You can control the number of days of data that is stored in the Trade Activity Log through Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log.

The Open Profit/Loss and Net Profit/Loss values can also be viewed on the Trade Stats for Charts tab of the Trade >> Trade Orders and Positions window.

Total Trades

This is the total number of completed trades, using a Fill to Fill matching method for the purpose of grouping trades. This is based upon all of the fills for the symbol in the Trade >> Trade Activity Log.

Total Quantity Filled

This is the total quantity filled for completed trades, using a Fill to Fill matching method for the purpose of grouping trades. This is based upon all of the fills for the symbol in the Trade >> Trade Activity Log.

Daily Total Trades

This is the total number of completed trades for the current trading day, using a Fill to Fill order fill grouping method to create trades. This is based upon the order fills for the current trading day for the symbol in the Trade >> Trade Activity Log. By default, the trading day begins at midnight. This can be changed through Global Settings >> General Trade Settings >> Daily Stats Reset Time. If there are any missing or inaccurate fills for the current trading day, then this value will not be accurate.

Daily Total Quantity Filled

This is the total quantity filled for completed trades for the current trading day, using a Fill to Fill order fill grouping method to create trades. This is based upon the fills for the current trading day for the symbol in the Trade >> Trade Activity Log. By default, the trading day begins at midnight. This can be changed through Global Settings >> General Trade Settings >> Daily Stats Reset Time. If there are any missing or inaccurate fills for the current trading day, then this value will not be accurate.

Trade Data Study Does Not Display Data or is Misaligned

When using one of the Trade Data studies that begins with Trading: like Trading: Total Trades or Trading: Closed Profit/Loss, and there is not the trading data displayed for the corresponding chart bars when there are trades at those bars, or prior trade data is not included, or the data is misaligned, then this can be due to the following reasons:

  • The order fills do not exist in the Trade >> Trade Activity Log >> Trade Activity tab for the particular Symbol and Trade Account the chart is set to. For instructions to use the Trade Activity Log to see the data, refer to Viewing Historical Trade Activity.
  • The studies are built from order fills and it is essential to understand how order fills are grouped and matched together. A Fill to Fill method for grouping fills into Trades is used. For further details, refer to Order Fill Grouping and Matching Methods.
  • There are Unmatched Fills. These will not be included in the Trade Data studies.
  • To actually see the individual Trades which consist of an opening fill and a closing fill which are used in these studies, follow the instructions for the Trades tab in the Trade Activity Log. Make sure you set the Date Range to Display >> From Date and Time early enough to include all of the order fills that are stored in the Trade Activity Log so that you can see all of the Trades which are used in these Trade Data studies. This gives you a very good understanding of the data that goes into these studies and to troubleshoot any problems with them.
  • The Trade Account is not set correctly on the Trade Window for the chart.
  • Your computers Date-Time is not set correctly put in the wrong location or to be filtered out completely. Refer to help topic 38 for help with setting your computers Date and Time. Once your computer's clock is corrected, this will not solve the inaccurate timestamps on existing order fills. Those will still be wrong.
  • If you are using a Trade Data study on a Historical Daily, Weekly, Monthly, Quarterly, Yearly chart, then the alignment of data may not be correct with these chart types. The Trade Data studies are not recommended to be used with these types of charts.

How Average Price for Positions Is Calculated and Used

There are two Average Prices for the current Trade Position for a symbol, you will see in Sierra Chart. These are both documented below.

Order Fill Calculated Average Price

In the Trade Window for a chart or Trade DOM, the Trade Position Average Price is displayed on the Main and C tabs after the current Trade Position Quantity (refer to image below).

And the Trade Position Average Price is displayed on the chart or Trade DOM on the Position Line at the level of the Average Price. Both of these display the same Trade Position Average Price.

The Average Price for the current open Trade Position is calculated from the order fills stored in the Trade >> Trade Activity Log. It is the average price of those fills which make up the current Position.

When there is a Trade Position that consists of more than one fill, there are different methods by which the fills are grouped together to calculate the current Trade Position Average Price. There is the FIFO (First in First Out) and LIFO (Last in First Out) methods. Refer to Order Fill Matching Methods for more information.

If you have a Trade Position which is being held for a long time, you need to make certain that the number of days of data stored in the Trade Activity Log is set high enough. This is set through Global Settings >> General Trade Settings >> Number of Days to Save in Trade Activity Log >> Non-Sim.

If Global Settings >> Chart Trade Settings >> Position >> Use Flat to Flat Average Price for Position Line is enabled, then the Position Average Price on the Position Line on the chart or Trade DOM will be based on a flat to flat calculation method. Refer to Flat To Flat Average Price For Position for more information.

When using the Use Flat to Flat Average Price for Position Line option, this does not apply to the Position Average Price on the Trade Window.

If there is missing or otherwise inaccurate fill data, and Sierra Chart is not able to properly determine the Position Average Price relative to the current Position Quantity, then as an alternative Sierra Chart will display the Trading service provided Average Price for the current Trade Position (Trade >> Trade Orders and Positions Window >> Positions >> Trade Service Average Price).

The use of this alternative Average Price is only for non-simulated positions . For more information, refer to Trade Service Provided Average Price.

Simulated Trade Positions are always based upon the order fills in the Trade >> Trade Activity Log.

It is possible that the Trading service you are using does not provide the Trade Service Average Price data field for the Trade Position data for the Symbol and Trade Account, in which case it will be 0 and you will not see a Trade Position line on the Chart or Trade DOM since there is no Average Price.

In order for Sierra Chart to be able to properly calculate the Average Price from the order fills, you need to be certain that it is set to store order fills for a long enough period of time. This period of time will have to be long enough to include the earliest fill which is part of any current Trade Position that you have.

Select Global Settings >> General Trade Settings. Set the Number of Days to Save in Trade Activity Log to a high enough number of days which will include all of the fills for any current Trade Position you have.

Order Fill Calculated Average Price from Order Fill Calculated Position

If a Chart or Trade DOM is using the Order Fill Calculated Position, then the Trade Position Average Price will always be calculated from the order fills which make up the current Open Position. In this particular case, the Order Fill Calculated Average Price documentation also applies.

To disable the use of the Order Fill Calculated Position for a Chart or Trade DOM, make sure Trade >> Use Fill Calculated Positions-Global is disabled/unchecked.

Also Open the Trade Window for the Chart or Trade DOM and make sure Menu/M >> Use Order Fill Calculated Position is disabled/unchecked.

Trade Service Provided Average Price

On the Trade >> Trade Orders and Positions >> Positions tab, the field labeled Trade Service Average Price is the trading service provided Average Price for a non-simulated Trade Position for a Symbol and Trade Account.

The Trade Service Position Average Price could be 0 if the Trading service does not provide Average Price data for the current Trade Positions.

The Trade Service Position Average Price will be used on a Trade Window and chart if the average price cannot be determined from the order fills. The letter E after the Average Price signifies this. Refer to the image below.

In the case of when using the Interactive Brokers Trading service, when Global Settings >> Data/Trade Service Settings >> Use Interactive Brokers Provided Position Average Price is set to True, then anywhere the Trade Position Average Price is displayed in Charts and Trade DOMs will use this Trade Service Position Average Price from Interactive Brokers. This Position Average Price includes commissions. If you do not want to use this, then set that option to False.

Position Line Not Visible or Incorrect Average Price

If for whatever reason, either the order fill calculated Trade Position Average Price or the Trade Service Average Price Average prices are incorrect, then when you are looking at a chart which is in Chart Trade Mode, or a Trade DOM, the current Position Line may not be visible within the current view of prices. And the Trade Position Average Price display will be incorrect.

Or if the Trading service you are using does not provide a Position Average Price and Sierra Chart does not have all of the order fill data for the Symbol and Trade Account to calculate it properly, then you will not see a Trade Position Line. However, the current Trade Position Quantity will be displayed on the Trade Window.

In the event where Sierra Chart is not able to properly determine the Trade Position Average Price relative to the current non-simulated Trade Position Quantity, then you will need to clear the non-simulated Trade Activity for the Symbol and Trade Account in order to start again from a clean state. This can be done at any time. For instructions, refer to Clearing Trade Activity Log.

Generally this will solve the problem when not seeing the Trade Position Line on a chart or the Trade Position Average Price is incorrect.

When you clear the non-simulated Trade Activity data for a Symbol and Trade Account, then if this is done at a time when the current Trade Position is not flat, then there will be a reliance on the Trade Service Average Price during that current Trade Position and that is what you will see displayed.

Open Profit/Loss Calculation

The Open Profit/Loss displayed on the Trade window after P/L: and also displayed on the Position Line on a chart or a Trade DOM, is calculated as follows when it is displayed as Points (P): OpenProfitLoss = (LastTradePrice - AveragePositionPrice) * PositionQuantity.

PositionQuantity will be a positive number (>0) in the case of a Long position and will be negative number (<0) in the case of a Short position.

Refer to the How Average Price for Positions Is Calculated and Used section for details on how the AveragePositionPrice value is determined. You need to understand that there is a small amount of calculation error due to floating-point calculations performed on computers that can exist, and also a slight variation with the AveragePositionPrice could exist when this value is provided by a trading service, which you may not be able to see due to display rounding. Therefore, the final Profit/Loss result could be slightly off especially when displayed as a Currency Value.

Determining Whether Order Fill Calculated or Trade Service Average Price is Being Used

How do you determine whether the Order Fill Calculated Average Price or the Trade Service Provided Average Price is being used on the Trade Window for a Chart?

Look at the Average Position Price you see on the Trade Window for a Chart or Trade DOM and compare it to Trade >> Trade Orders and Positions >> Positions >> Trade Service Average Price.

If these are the same then you cannot tell which one is being used. If the Trade Service Average Price you see on the Positions tab differs from what you see on the Trade Window, then you can be sure that the Order Fill Calculated Average Price is being used on the Trade Window.

Incorrectly Reported Trade Position Quantity

If you see an incorrectly reported non-simulated Trade Position Quantity in Sierra Chart, then follow these instructions:

  1. Make sure Trade >> Use Fill Calculated Positions-Global is disabled/unchecked.
  2. Make sure Trade >> Trade Simulation Mode is disabled/unchecked.
  3. If you see an incorrectly reported Trade Position Quantity on a chart, Trade DOM, or on the Trade Window for a chart or Trade DOM, then open the Trade Window and make sure Menu/M >> Use Order Fill Calculated Position is disabled/unchecked.

    Relating to this, make sure the correct Trade Account is selected on the Trade Window for the chart or Trade DOM, refer to Selecting Trade Account.

    Relating to this, if the Trade Position Quantity is correct but you do not see the Trade Position line displayed on a chart, then Position Average Price is not correct. In this case, refer to How Average Price for Positions Is Calculated and Used.
  4. Go to the Trade >> Trade Orders and Positions >> Positions tab.

    Locate the Trade Position for the Trade Account and Symbol on the Positions tab. This tab reports the non-simulated Trade Positions as provided by your external Trading service. You must find a match by comparing both the Trade Account and Symbol.

    If there is an incorrectly reported Trade Position Quantity on this tab for a particular Trade Account and Symbol, then you will need to contact your Trading service about the Trade Service Position Quantity that you see on the Positions tab.

    If the Trade Position for the Trade Account and Symbol is not listed at all, this means the Trading service is not reporting the Trade Position for the Trade Account and Symbol.

    To ensure you have the most up-to-date data on the Positions tab, select File >> Disconnect and File >> Connect to Data Feed. However, reconnecting to the server is almost never necessary to update the data on the Positions tab and is not likely to change the Positions data reported, since it is automatically updated.
  5. If you see the correct Trade Position Quantity for the Trade Account and Symbol on the Positions tab but the Symbol does not exactly match the chart or Trade DOM, then this can be a reason why you do not see the Trade Position on the chart or Trade DOM. In the case of Interactive Brokers, only a portion of the leftmost components of the complete symbol need to match.
  6. If you see an incorrectly reported Open Quantity on the Trade >> Trade Activity Log >> Trade Stats for Charts tab, then this is not unusual and you will need to clear the non-simulated Trade Activity data for the symbol. Refer to Clearing Trade Activity for complete instructions.

    For additional information, refer to the Resetting Data/Inaccurate Values subsection in the Trade Statistics for Charts section.

Resetting Incorrect Order Fill Calculated Position

When using the Order Fill Calculated Trade Position either globally or for an individual chart or Trade DOM, this position data could be inaccurate. To reset this back to 0 for a particular symbol, requires clearing all of the Trade Activity data for the symbol.

To clear the Trade Activity data for individual symbol, refer to Clearing Trade Activity.


*Last modified Friday, 23rd September, 2016.