When there are multiple units in a position Broker-ExitAllOn... functions will create an exit order for each unit in the position.
When a Broker-ExitUnitOn... function is used, and only a specific unit number is to be removed, the unit number given to the function will remove the number unit. When more than a specific, but not all the units are to be removed, each unit number given to this function VIA loop or multiple Broker statements will be removed.
All orders generated by Trading Blox will be applied to the next available trading date.
To take profit of an active position, use limit orders. Limit orders don't get filled , i.e. ".ExitAllUnitsAtLimit", or a specified number of units i.e. ".ExitUnitAtLimit" that loops and generates an order for a single unit, or when contained in a loop, it can generate more than one order. A percentage of the quantity in a position can be removed using ".AdjustPositionAtLimit" where the percentage of the position's quantity is removed.
A question on the Trading Blox Roundtable Forum Asked, "How to take a profit exit on the bar of entry when Daily Data is being used?" The best answer is given, but it is a test only solution. It won't be possible to use the process explained in live trading because all entry and exit orders are not processed until the next price record becomes available. When Daily data is used, there is only one price record for each date. This means that when a system generates an order to exit, the exit won't be applied to the bar on which the Exit-On-Limit order was created.
When it is necessary to have the system generate an order to exit at a limit to capture a profit, or to reduce size, use intraday data instead. If the calculation need to be on Daily, Weekly or Monthly data, Trading Blox can create those time periods internally using intraday data.
Edit Time: 9/13/2020 3:46:01 PM |
Topic ID#: 83 |