Position Adjustment Functions

Position adjustment functions are used to increase or reduce size.


A new instrument unit number can change when a position's size is changed.  


When size is added to a position, order.isEntry is TRUE.  When size is added to a position that is LONG, order.isBuy is TRUE.

When size is removed from a position, order.isEntry is FALSE.  When size is removed from a position that is LONG, order.isBuy is FALSE.


When these functions are called they will reduce or increase the quantity in a position by reducing the quantity in a single unit, or in a group of units with multiple unit positions when a larger quantity is required to be removed than what is available in a single unit.  


As quantities in any of the units are reduced to zero those unit are terminated.  


As the quantities of a position are increased a unit will be added to a position to contain the added quantity, and an incremental unit number will appear.



When this function is used to adjust the size of an order, it is best to place the Position-Adjustment function in either the Exit Orders or the Entry Orders script sections.  Placing the size adjusting function in the Update Indicators script executes after the close of the instrument's results for the date and time when the script is accessible.  This means the changes you expect to see on the Positions & Orders Report cannot appear on the same day the report is displayed.


Adjust Size On Open Order



Adjusts the position on the open

Adjust Size On Stop Order



Adjusts the position any time if the market hits specified price

Adjust Size At Limit Order



Adjusts the position on any time if the market goes beyond specified price

Adjust Size On Close Order



Adjusts the position on the close







When the Broker Object is out of the context of its default context scripts, the AlternateBroker object should be used to execute any of the Broker Object Entry and Exit Functions. AlternateBroker has the same functions and properties as the Broker Object and will work in the same way.  

Edit Time: 6/22/2018 12:55:00 PM

Topic ID#: 467


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software