GreatPig
Pigs In Space
- Joined
- 9 July 2004
- Posts
- 2,368
- Reactions
- 14
Is there any way in an AmiBroker back test to get the current equity value? I know there's an Equity function, but it doesn't seem to do what I'm looking for (either that or I don't understand exactly what it is doing ).
When setting the PositionSize variable, you can set it to a negative number for a percentage of equity (which I assume means percentage of current equity during the test, not percentage of initial capital). However, is there a variable or function that tells you exactly how much that current equity is?
What I want to do is be able to set an absolute position size based initially on percentage of equity, but then possibly modified downwards based on number of shares that represents relative to average daily volume. I can get the current buy price (BuyPrice variable), but to calculate how many shares 10% of equity is, I need to know what the current equity amount is.
For example, a simple 10% of equity (-10 position size) might give me a buy volume that's too high for the average daily traded volume, such that it would be unrealistic to expect to be able to fill that order without affecting the price significantly. I'd like to say that if it's greater than say EMA(V,100)*0.1, then reduce it to that value.
Thanks for any help.
Cheers,
GP
When setting the PositionSize variable, you can set it to a negative number for a percentage of equity (which I assume means percentage of current equity during the test, not percentage of initial capital). However, is there a variable or function that tells you exactly how much that current equity is?
What I want to do is be able to set an absolute position size based initially on percentage of equity, but then possibly modified downwards based on number of shares that represents relative to average daily volume. I can get the current buy price (BuyPrice variable), but to calculate how many shares 10% of equity is, I need to know what the current equity amount is.
For example, a simple 10% of equity (-10 position size) might give me a buy volume that's too high for the average daily traded volume, such that it would be unrealistic to expect to be able to fill that order without affecting the price significantly. I'd like to say that if it's greater than say EMA(V,100)*0.1, then reduce it to that value.
Thanks for any help.
Cheers,
GP