Trade control functions are designed to allow a portfolio process to control which instruments are allowed to create an order.

 

Usually used in a portfolio managing process to allow or deny trades for the day based on some criteria.

 

Instruments allow all trades by default at the beginning of the test.

 

This value is not reset by the system day to day, so whatever is set here sticks until the next time it is updated.

 

Trade Control Functions:

Descriptions:

AllowLongTrades

marks instrument to allow long trades

AllowShortTrades

marks instrument to allow short trades

AllowAllTrades

marks instrument to allow all trades

DenyLongTrades

marks instrument to deny long trades

DenyShortTrades

marks instrument to deny short trades

DenyAllTrades

marks instrument to deny all trades

 

If the AllowAllTrades function is used for an instrument, all trades both long and short will be processed.

If the DenyAllTrades function is used for an instrument, all trades both long and short will be rejected.

 

The following functions can be used independently. They affect only one direction, not both.

If the AllowLongTrades function is used for an instrument, long trades will be processed.

If the AllowShortTrades function is used for an instrument, short trades will be processed.

If the DenyLongTrades function is used for an instrument, long trades will be rejected.

If the DenyShortTrades function is used for an instrument, short trades will be rejected.

 

Note:

Use instrument.DenyAllTrades at the top of the Portfolio Manager block Filter Portfolio script to deny all trades by default. In this way, the code can allow trades for instruments that meet certain criteria, and the rest will be denied.

 

Links:

Trade Control Properties

See Also:

 

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 627

 

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