Login Page - Create Account

Global Profit/Loss Management


Introduction

The functionality which is documented on this page, is not recommended to be used. It was developed in response to user requests. However, it cannot work reliably on the client side. This functionality has been moved, to Teton Order Routing and Simulated Futures Trading Service. For more information, refer to Server Based Profit/Loss Management.

The Global Profit/Loss Management feature is used to flatten/close all of the existing Trade Positions for the currently open Charts or Trade DOMs for a Trade Account when certain defined Profit or Loss conditions are met, or at a set time each day.

This feature works with both non-simulated trading and simulated trading.

The Global Profit/Loss Management feature is only supported by charts which are being replayed when Global Settings >> Global Profit/Loss Management >> Support Replaying Charts is enabled. However, it should not be used for back testing or fast replays because it cannot work reliably in those cases. It is unreliable in those cases. It should only be used during a chart replay which does not run very fast. Additionally, when there are multiple trading charts being replayed for the same Symbol and Trade Account, only one of them is going to be used to obtain the profit/loss values.

This feature is meant for day traders who carry no overnight Trade Positions in their trading accounts.

For non-simulated trading, this feature only works when connected to the market data feed and trading server (File >> Connect to Data Feed ).

This feature has the capability to send market orders to flatten all existing Trade Positions for the symbols that have open Charts or Trade DOM windows for, in any of the Trade Accounts for the Username that you are currently logged into your Trading Service with. It needs to be used with caution. It is important that you fully understand how the functionality works.

This feature has no guarantee it will work as expected because it has a dependency on the client-side calculated Daily Net Profit/Loss which could be incorrect due to invalid or incomplete fill data or pricing data or incorrect dependent settings. The probability of a malfunction of this feature is very high if you do not understand the functionality and the relevant settings are not properly configured and the required order fill data is not present or not being used correctly due to dependent settings.

Therefore, it is recommended this feature not be used. You have full responsibility with the use of it. And we will not provide technical support for malfunctions.

For information about how the Daily Net Profit/Loss is calculated, refer to How Daily Net Profit/Loss is Calculated for a Trade Account.

This feature should only be used with the full understanding of how it works.

This feature must not be relied upon when orders are entered outside of Sierra Chart. It should only be used when orders are entered from within Sierra Chart.

This is so that the handling of orders, fills and the determination of the Profit and Loss is done in a known and stable environment. Sierra Chart also needs to be running at all times and connected to the Trading service when using this feature for it to be able to function.

In the case of when using a sub instance of Sierra Chart and when Trade Simulation Mode is disabled in that sub instance, definitely do not use the Global Profit/Loss Management in that sub instance. It must be disabled and instead it can only be used in the main instance of Sierra Chart. Using both will lead to conflicts and unpredictable behavior.

The Order Allocation to Trade Accounts feature does not work with the Global Profit/Loss Management feature. Global Profit/Loss Management will close all Positions and cancel all open Orders for a single Trade Account, when the set rules have been met by that individual Trade Account.

Functional Description

The Global Profit/Loss Management feature is separated into two categories.

The first category flattens Trade Positions which exist for the symbols which have open Charts or Trade DOMs, based upon certain rules relating to the global Daily Net Profit currency value. The Daily Net Profit is calculated only for the symbols which have open Charts or Trade DOM windows. It is calculated separately for each Trade Account.

The second category flattens Trade Positions which exist for the symbols which have open Charts or Trade DOMs, when the specified global Daily Net Loss currency value has been reached. The Daily Net Loss is calculated only for the symbols which have open Charts or Trade DOM windows. It is calculated separately for each Trade Account.

To use this functionality, select Global Settings >> Global Profit/Loss Management.

If you want to have Trade Positions flattened when certain Profit rules are met, then enable the option Flatten Positions When Profit Rules Met. Refer to the Control Descriptions section for information about the controls related to the Profit rules, in order to set those appropriately.

If you want to have Trade Positions flattened when certain Loss rules are met, then enable the option Flatten Positions When Loss Rules Met. Refer to the Control Descriptions section for information about the controls related to the Loss rules, in order to set those appropriately.

When the Trade Positions are flattened because of the Global Profit/Loss Management settings, then a message is added to the Trade Service Log indicating this.

When the Trade Position is flattened for a particular Symbol and Trade Account because of the Global Profit/ Loss Management settings, the working orders, if any, for the Symbol and Trade Account are also canceled.

You may want to enable the option to wait until the orders are canceled and then submit the market orders to flatten the Existing Trade Positions. In this case you need to enable Global Settings >> General Trade Settings >> Hold Market Order Until Pending Cancel Orders Confirmed.

Once the loss rules have been met for a particular Trade Account during a day and the Trade Positions for the symbols which have an open Chart or a Trade DOM have been flattened, then this feature to flatten Trade Positions when a Daily Net Loss value is reached, is then disabled until the next trading day. The start of the trading day is controlled through the Start of Day setting.

That time is relative to the Global Time Zone Sierra Chart is set to.

Global Profit/Loss Management is only monitoring symbols which have open Charts (which are enabled for trading) or Trade DOMs. Only the Trade Accounts for those particular Charts or Trade DOMs are monitored. This will limit the number of Positions and Trade Accounts being monitored. Not all Positions and Trade Accounts will be monitored.

How Daily Net Profit/Loss is Calculated for a Trade Account

The Daily Net Profit/Loss value is determined by adding together, for each Trade Account separately, the Open Profit/Loss values with the Daily Profit/Loss values for all of the Charts and Trade DOMs listed on the Trade >> Trade Activity Log >> Trade Stats for Charts (Chart Stats) tab.

The Daily Net Profit/Loss value originates from this tab even in the case of sub instances. If the Open Profit/Loss or the Daily Profit/Loss field values are not accurate, then refer to Solving Inaccurate Trade Statistics for Charts Field Values. It is your responsibility to verify that these fields are correct at all times.

The Daily Net Profit/Loss is calculated separately for each Trade Account being used. A Chart or Trade DOM with the same Symbol and Trade Account as one already listed on the Trade Stats for Charts (Chart Stats) tab, will not be listed on the Trade Stats for Charts tab again unless it has a different Order Fills Start Date-Time for its Trades list. In any case, the Open Profit/Loss and the Daily Profit/Loss values are only counted once per Symbol and Trade Account when the Daily Net Profit/Loss is calculated for a particular Trade Account for the Global Profit/Loss Management.

Refer to Open Position Profit/Loss for information about how this is calculated.

For an explanation of how Daily Profit/Loss is calculated for a Symbol and Trade Account and possible inaccuracies with it and how to solve those, refer to Help With Daily Profit/Loss Value.

For charts listed on the Trade Stats for Charts tab of the Trade Activity Log, make sure the Currency Value per Tick setting is correct in the chart. For more information, refer to Profit/Loss Calculations and Symbol Settings.

It is also important to understand the Start DateTime for a Trades List.

If you want to include the commission in the Daily Profit/Loss calculation for a chart, then refer to Use Symbol Commission Setting in Trade List and Statistics Calculations.

Control Descriptions

Daily Net Profit Management

Daily Net Profit Management >> Flatten Positions When Profit Rules Met

Enable this option to cause all Trade Positions to be flattened for a Trade Account when the profit rules are met. Each currently used Trade Account is tracked separately. So the profit rules are calculated separately for each account.

When Sierra Chart is restarted, this option is automatically disabled for safety reasons unless the Disable Global Profit/Loss Management on Startup is unchecked.

Daily Net Profit Management >> Profit Trigger Value

This is the Daily Net Profit as a currency value which has to be met in order for the Daily Net Profit Management >> Profit Value After Trigger To Flatten Positions value to go into effect.

Daily Net Profit Management >> Profit Value After Trigger To Flatten Positions

After the Daily Net Profit Management >> Profit Trigger Value has been met, then the Profit Value After Trigger To Flatten Positions value goes into effect.

When the Daily Net Profit/Loss value is less than or equal to the Profit Value After Trigger To Flatten Positions, then all Trade Positions for the Symbols for the Trade Account being monitored which have open charts or Trade DOMs will be flattened by the sending of market orders.

When this is set to 0, then this means a currency value of zero. So what this means is that after the Profit Trigger Value has been met, the Daily Net Profit/Loss has to go to zero or lower (negative) before the current Trade Positions for the Trade Account will be flattened.

If you want the Trade Positions to be flattened when the Daily Net Profit Management >> Profit Trigger Value is triggered, then set the Profit Value After Trigger To Flatten Positions to at least twice greater than the Profit Trigger Value.

Trail Daily Net Profit >> Enable

When this option is enabled, then Profit Value After Trigger To Flatten Positions will be increased by the Increase Profit Value After Trigger to Flatten Positions By amount when the initial Profit Trigger Value has been met and the Daily Net profit increases by the amount specified with After Trigger When Daily Net Profit Increases By.

Any time there is a change to the Profit Value After Trigger To Flatten Positions and when Trail Daily Net Profit has been enabled, then this will be logged in the Trade >> Trade Service Log.

Also the current Profit Value After Trigger To Flatten Positions value will be displayed in the Status box below the Daily Net Profit Management frame in the Global Settings >> Global Profit/Loss Management window. Example: P/L <= for Flatten: 100.0.

Trail Daily Net Profit >> After Trigger When Daily Net Profit Increases By

When the Profit Trigger Value has been reached, and the Daily Net Profit increases by the amount specified in the After Trigger When Daily Net Profit Increases By setting, then the amount specified in the Increase Profit Value After Trigger to Flatten Positions By setting, will increase the Daily Net Profit Management >> Profit Value After Trigger To Flatten Positions currency value.

If the Daily Profit increases by a multiple of After Trigger When Daily Net Profit Increases by, then the Increase Profit Value After Trigger to Flatten Positions By is increased by that same multiple.

For example, if After Trigger When Daily Net Profit Increases by is set to 25 and Increase Profit Value After Trigger to Flatten Positions By is set to 25, then when the Daily Net Profit increases by 50 at one time which is a multiple of two, then the profit value to flatten the Positions will also be increased by a multiple of two which would be 50 in this case.

Trail Daily Net Profit >> Increase Profit Value After Trigger to Flatten Positions By

Refer to the description for After Trigger When Daily Net Profit Increases By.

Daily Net Profit Management >> Status

This is a text display reporting on the current status of the Daily Net Profit Management feature.

If this says Profit Management is disabled, then enable Daily Net Profit Management >> Flatten Positions When Profit Rules Met to enable this functionality.

When you have just enabled the Flatten Positions When Profit Rules Met option, the status will not be displayed in this text display until you press OK and reopen the Global Profit/Loss Management Settings window.

There is also the Trading Profit Management Status study which can be added to the chart through Analysis >> Studies, which displays the same information as this status display, but is displayed directly on the chart.

Status Trade Account (Global Settings >> Global Profit/Loss Management)

This listbox will list all of the Trade Accounts among the open charts that are in Chart Trade Mode or otherwise maintaining a Trades list.

The selected Trade Account controls what account the status displays on the Global Profit/Loss Management window are displayed for.

If there are no charts which are open or in Chart Trade Mode, then this listbox will be disabled.

Lock Trading (Global Settings >> Global Profit/Loss Management)

Lock Trading >> Lock After Positions Flattened

When Trade Positions are flattened from the Daily Net Profit Management, Daily Net Loss Management, or the Flatten Positions at Set Time features, then trading can be locked for a period of time.

Enable this option to lock trading after the Trade Positions are flattened.

When trading has been locked after the enabled and specified rules have been met, and you need to perform some trading operation like canceling orders or entering a new order for some reason, this can be accomplished by disabling this option (Global Settings >> Global Profit/Loss Management >> Lock Trading >> Lock After Positions Flattened ).

When this option is disabled you can then perform trading operations so long as Trade >> Trading Locked is unchecked.

Lock Trading >> Lock Time In Minutes

This specifies the trading lock time in minutes. After this time has elapsed, trading will be possible.

If you need to enter an order when trading is locked, it is necessary to uncheck the Lock After Positions Flattened option.

Lock Trading >> Lock for Day

When the Lock for Day option is enabled, then Lock Time In Minutes is ignored. Trading is locked for the entire day.

In version 2107 and higher, a new day is considered to begin at the Start of Day time setting. This time is relative to the global time zone setting. At that time trading is unlocked.

In version 2106 and earlier the trading is locked until 00:00:00 according to the global time zone setting.

If you need to enter an order when trading is locked, it is necessary to uncheck the Lock After Positions Flattened option. And press OK.

Lock Trading >> Disable Auto Trading on Lock

When the Lock Trading >> Disable Auto Trading on Lock option is enabled, then at the time that Trade Positions are flattened and Open orders are canceled for any particular Trade Account as the result of the Global Profit or Loss management functionality, then Trade >> Auto Trading Enabled - Global is disabled.

It does not automatically reenable, you have to manually do this.

Lock Trading >> Remaining Lock Time

This control displays the remaining lock time if trading is currently locked as the result of this feature.

Daily Net Loss Management

Daily Net Loss Management >> Flatten Positions When Loss Rules Met

Enable this option to cause all Trade Positions to be flattened when the Loss Trigger Value has been met. Each currently used Trade Account is tracked separately. So the Profit/Loss is calculated separately for each Trade Account being used.

When Sierra Chart is restarted, this option is automatically disabled for safety reasons unless the Disable Global Profit/Loss Management on Startup is unchecked.

Daily Net Loss Management >> Loss Trigger Value

This is the Daily Net Loss as a currency value which needs to be reached for the current Trade Positions to be flattened.

It is entered as a negative number. It must be always a currency value.

Daily Net Loss includes the Profit/Loss for all currently open Trade Positions and closed Positions for the trading day for a particular Trade Account. For more information, refer to Help With Daily Profit/Loss Value.

As an example, if you want to have the currently open Trade Positions flattened when the Daily Net Loss is -500 or higher in the account currency, then enter -500.

Daily Net Loss Management >> Trigger Date

The Trigger Date box displays the date the Trade Positions were flattened for a Trade Account.

This is reported separately for each account being used in the trading Charts and Trade DOMs. The accounts are iterated through every five seconds. Therefore, this changes every five seconds if there are multiple Trade Accounts used among the open Charts and Trade DOMs.

Daily Net Loss Management >> Reset

When the Trade Positions for a Trade Account are flattened, the Daily Net Loss Management is disabled until the next trading day. The start of the trading day is controlled through the Start of Day setting. This time is relative to the Time Zone Sierra Chart is set to.

The disabling of the Daily Net Loss Management for the day does not refer to locking of trading. This is completely separate.

The Date that the Trade Positions were flattened on is remembered for each Trade Account. This Date is saved when Sierra Chart is exited and restarted.

This Date for a particular Trade Account is displayed in the Daily Net Loss Management >> Trigger Date box.

To reset these dates back to zero to allow the Daily Net Loss Management to be used again for all of the Trade Accounts in the same day, press the Reset button. However, this does not unlock trading.

To unlock trading, refer to Lock Trading.

The resetting of the Daily Net Loss Management has no effect upon the resetting of the Daily Profits/Loss for the charts maintaining a Trades list and being used in the Daily Net Profit/Loss calculation. The reset time for those is based upon the Session Times in the chart. For more information, refer to Understanding Daily Trade Statistics Reset Time.

Daily Net Loss Management >> Status

This is a text display reporting on the current status of the Daily Net Loss Management feature.

This is reported separately for each account being used in the trading Charts and Trade DOMs. The accounts are iterated through every five seconds. Therefore, this changes every five seconds if there are multiple accounts.

When you have just enabled the Flatten Positions When Loss Rules Met option, the status will not be displayed in this text display until you press OK and reopen the Global Profit/Loss Management Settings window.

Disable Global Profit/Loss Management on Startup

When this option is enabled, the default, then upon starting of Sierra Chart, the Daily Net Profit Management >> Flatten Positions When Profit Rules Met and the Daily Net Loss Management >> Flatten Positions When Loss Rules Met options will automatically be disabled preventing the corresponding functionality from working.

When this option is disabled, then the Daily Net Profit Management and Daily Net Loss Management features will remain enabled/checked if they already are enabled when Sierra Chart is started.

Flatten Positions at Set Time

The Flatten Positions at Set Time functionality will flatten/close all of the existing Trade Positions for the currently open Charts or Trade DOMs when the specified time has been encountered.

If there is a current nonzero Trade Position quantity for a particular Symbol and Trade Account, and there are also open orders, those open orders will also be canceled. If there are only open orders for a particular Symbol and Trade Account but the Trade Position quantity is 0, then those orders will still remain and not be canceled.

To use this feature, enable the Flatten Positions at Set Time >> Enabled option, and set the Flatten Time. The Flatten Time format is Hours:Minutes:Seconds in a 24-hour format. The time is relative to the global time zone setting.

Start of Day

The Start of Day time setting is used to set what is considered the start of the trading day and is used in the Global Profit/Loss management where the start of the trading day needs to be known.

This time is relative to the Sierra Chart Time Zone setting.

For example, when the profit or loss rules have been met, and the Trade Positions have been closed, then these rules will not apply until the next trading day according to this time.

The Daily Profit/Loss values within each chart for a particular Symbol and Trade Account, have their own start of day setting for resetting the Trade Statistics based upon the Session Times. So that can be different than this Start of Day setting.

Support Replaying Charts

When this option is enabled, then the Global Profit/Loss Management will include Replaying Charts. Otherwise, the Global Profit/Loss Management checks are not performed for replaying charts.

Global Profit/Loss Management should not be used while back testing because Global Profit/Loss Management does not function properly during a back test.

Monitoring Status

It is supported to monitor the status of Global Profit and Loss Management to see the current state of it, and the current Daily Net Profit or Loss value for the different Charts and Trading DOMs for the currently selected Trade Account.

Follow the instructions below to view this status information.

  1. Select Global Settings >> Global Profit/Loss Management.
  2. At the top right, select the Trade Account you want to monitor the status for. Refer to the instructional image below. Only Trade Accounts that are selected to be used on Charts or Trading DOMs which are enabled for trading, will be listed.
  3. Look in the status boxes for the current status. There are separate status boxes for Profit Management and Loss Management. They are highlighted in the instructional image below.

There is also the Trading Profit Management Status study which can be added to the chart through Analysis >> Studies (Adding/Modifying Studies), which displays the same information as these status displays, however it is displayed directly on the chart.

Clearing of Profit/Loss Management Data for Simulated Accounts

Once the Daily Net Profit Management or the Daily Net Loss Management functions have flattened Trade Positions and canceled open orders for a particular Trade Account, that action will not occur again on the same date.

In the case of the Daily Net Loss Management the Net Loss Management >> Reset button will clear/reset the dates that the Trade Positions were flattened on for all of the Trade Accounts. Therefore, Daily Net Loss Management can function again on the same day. This does not apply to Daily Net Profit Management.

When Trade >> Clear Trade Simulation Orders and Data is selected, all of the Profit/Loss management data for all simulated trade accounts is cleared. Which will allow the Daily Net Profit/Loss Management functions to perform again on the same day.

When starting a chart replay, and you press the Yes button to clear the simulated trade data for the Symbol and Trade Account, then the Profit/Loss management data for that particular Trade Account is also cleared allowing the Daily Net Profit/Loss Management functions to perform again on the same day for that particular Trade Account.

Keep in mind, however, that by default, charts that are replaying are not tracked by the Global Profit/Loss Management feature. In order to have the Global Profit/Loss Management function during a chart replay, enable the option Support Replaying Charts on the Global Profit/Loss Management window.

Potential for Rejected Market Order on Live Accounts and Solution

When using any of the functionality documented on this page to flatten Trade Positions for a Live Trade Account, there is the potential that the risk management system on the external trading system you are connected to will reject the market order that Sierra Chart sends because it will violate margin requirements or position limits.

The solution to this problem is to enable Hold Market Order Until Pending Cancel Orders Confirmed. This should solve the problem. However, there still could be other scenarios that we are not aware of which could still cause the Market order Sierra Chart sends to flatten a Trade Position to be rejected by the external trading service.

Handling Multiple Currencies

If there are Trade Positions in different currencies you will want to make sure to set a Common Profit/Loss Currency.


*Last modified Friday, 09th August, 2024.