Technical Studies Reference
Trading System - Study Subgraph Crossover
The Trading System - Study Subgraph Crossover is an automated trading system study which will submit a buy or sell order when one Study Subgraph crosses over another Study Subgraph. Either a new Position will be entered, or an existing Position can be reversed. Exiting of the position is dependent on the use of Attached Orders or manually closing the Position.
Since this is an automated trading study, for an understanding of the internal logic used aside from the crossing logic, refer to Automated Trading Management.
The Line 1 and Line 2 Inputs for this study define the two Subgraphs to be used to compare against each other. When the two Subgraphs cross, then depending upon the setting of the Action on Crossover When In Position Input, a Market order with the same Quantity is set on the Trade Window this study is applied to, will be sent. The check is performed relative to the direction of the Line 1 Input Subgraph and whether it is crossing from above or below the Line 2Input Subgraph.
If there are no open Positions for the chart, then when Line 1 crosses Line 2 from above, a Sell order is placed, and when Line 1 crosses Line 2 from below, a Buy order is placed.
If there are open Positions for the chart, then the setting of the Action on Crossover When In Position Input defines what action will be taken relative to these open positions when the lines cross. Refer to the Action on Crossover When In Position Input documentation below for more information.
This Trading system study can be used in Trade Simulation Mode only if you do not want it to submit real orders. For additional information, refer to the Send Trade Orders to Trade Service Input description below.
To perform back testing with this study, refer to the Auto Trade System Back Testing page.
- Line 1: This defines the specific graph or study, and subgraph to be used as the data for the first line. This line is used in conjunction with Line 2 to determine when a crossing event occurs. The direction of this line at the time that that it crosses Line 2 determines whether the order placed is Long (crossing from below) or Short (crossing from above).
- Line 2: This defines the specific graph or study, and subgraph to be used as the data for the second line. This line is used in conjunction with Line 1 to determine when a crossing event occurs.
- Enabled: This input defines whether this trading system is active and will place orders or not. When this is set to Yes an order will be placed when the lines cross. Otherwise, no orders will be placed.
- Send Trade Orders to Trade Service: This Input controls whether the order submitted by the study is going to be simulated or not. For complete documentation, refer to Send Trade Orders to Trade Service. When using Trade Simulation, this input needs to be set to No.
- Maximum Position Allowed: This defines the total quantity of a Position that can be opened by this trading system. This number must be equal to or greater than the Order Quantity or the trading system will not place the order.
- Action on Crossover When In Position: This defines the action to be taken if a current Trade Position is already open and the lines cross. The following options are available:
- No Action: No action is taken when the lines cross with respect to the open Position.
- Exit on Crossover: The open Position is closed when the lines cross.
- Reverse on Crossover: The open Position is closed and an opposing order is placed, reversing the original Position. For additional information about reversing, refer to SupportReversals.
- Evaluate On Bar Close Only: This defines whether the check for the lines crossing occurs at every update or only when each bar closes. Set this to Yes to only perform the test when the bar closes.
Halting Order Entry
Refer to Enabling and Disabling Automated Trading.
*Last modified Wednesday, 06th May, 2020.