PureBytes Links
Trading Reference Links
|
If you're trying to use positionsize based on the equity value, check this message 108746.
hope it helps
--- In amibroker@xxxxxxxxxxxxxxx, "spi_maker" <jarea@xxx> wrote:
>
> I am trying to calculate a position size based on the current level of equity built up, but I not doing this properly.
>
> I set up a situation to limit trades to a percentage of recent average volume as:
>
> Vol_Limit = .05;
>
> MaxShares = MA(V, 10) * Vol_Limit * 1000;
>
> TheEquity = Foreign("~~~EQUITY", "C");
>
> Indicated_Shares = TheEquity / Open;
>
> The_Position = Min(MaxShares, Indicated_Shares);
>
> SetPositionSize(The_Position, spsShares);
>
>
>
> First Problem
>
> I was having difficulty getting working results so I set the position size to a fixed amount as:
>
> SetPositionSize(500, spsShares);
>
> When I ran the backtest, it dutifully set the shares to 500 except would randomly set the shares to 210, then 230, then 260, then 290 etc. in transactions 5, 16, 18, 30, etc. Throughout 600 trades, 99% of the share values are 500 and the rest are these odd values.
>
> I wonder if anyone has any idea what might be happening there.
>
>
>
> Second Problem is much simpler. When I use the SetPositionSize(The_Position, spsShares) in the backtester, I get no results at all. No trades, no nothing, which leads me to believe that I am not using the ~~~EQUITY properly.
>
> Any insights would be greatly appreciated.
>
> When I backtested this
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|