TradesAllowed
Another set of constants relating to Buy/Sell is the values allowed for the built-in flag calledTradesAllowed. In TradersStudio Versions 1.0 and 1.1, adding on to a position was not permitted. If you were short, you could not enter another sell order to increase your short position. This built-in flag can have three values:
| NoSameDirection |
(default) - same as used in TradersStudio 1.0 and 1.1; |
| AllOrders |
This constant allows you to add to positions each time any Buy or Sell order is placed. For example, if a market has a channel breakout and sets a new 20-day high three days in a row. In this case, you will be long three contracts. |
| SameDirectDiffSignals |
This constant allows you to add positions in the same direction, but only if signal names are different. |
ExitsAllowed
ExitsAllowed is a built-in flag that controls behavior of ExitLong and ExitShort functions. It can be one of the following:
| NoSameDirection |
(default) Allows you to exit from an entry unlimited number of times. For example, if entry size was 10, then you can have 10 exits, each exit having size = 1. |
| SameDirectDiffSignals |
Allows you to exit only once. For example, if entry size was 10, then you can exit from the position only once. If you want to exit more than once, then you have to pass different exit names to ExitShort or ExitLong function. |
|