FAQ

Top  Previous  Next

 

FAQ

Q:Is it possible to use Memory[n] variables in categories on the resize page?
A:Yes, but keep in mind these act as global variables, and will contain values from the most recently processed position.  For example, the following code finds the position with the highest risk as a percent of equity, and reduces the size of the position with the greatest risk over if 10%:

Resize

MEMORY[1] = 0

~POSITION 'initialize the category 

IF (RISK / TOTALEQUITY) > MEMORY[1] THEN MEMORY[1] = _

(RISK / TOTALEQUITY)

 

~POSITION 'reinitialize the category and run through all 

'the positions again; reduce the one with the highest risk if >10%

IF MEMORY[1] > .1 AND RISK / TOTALEQUITY = MEMORY[1] THEN MULTIPLIER = .9

 

The first line of code, MEMORY[1] = 0, clears the memory variable at the start of each day.

The second line of code under the Position category checks the risk in each position, and if it is the highest risk yet seen, saves it (assigns it's value to MEMORY[1]).  Once all the positions have been processed the one whose risk is the largest % of equity has it's % stored in MEMORY[1]

The value of MEMORY[1] persists across categories, and in the second position category, if the position with the highest risk, indeed risks more than 10% of equity, then reduce it's size by 10%.

Q:How do I trigger a resize based on an event that occurs on the SIG side?
A:You can use one of the eight (8) SIZING[n] variables to pass such information from the SIG side over to the SIZ side.

For instance, you may wish to “pyramid” into an existing position when it reaches a certain level of profitability. In this case, for example, use SIZING[n] as a “flag,” and set it equal to 1 when the condition is true, and zero when the condition is false. Then, use that information like this:

Resize

~POSITION

IF SIZING[4] = 1 THEN MULTIPLIER = 1.25

 

Q:Is it possible to over-resize?
A:Yes. Resize strategies that reduce too actively often have the effect of never letting winners really run, and can degrade risk-adjusted performance metrics.
Q:What happens when a resize is ordered for a day when a market is on holiday?
A:If a resize attempts to execute on a holiday, it is resized internally for the purpose of properly calculating risk. The actual resize will be executed on the next non-holiday open.