PureBytes Links
Trading Reference Links
|
Hello,
BarsSinceSell = BarsSince( Sell ) OR Status("firstbarintest" );
NumberOfBuys = Sum( Buy, BarsSinceSell );
Buy = Buy AND NumberOfBuys <= 4; // prevent more than 4 buys
Best regards,
Tomasz Janeczko
amibroker.com
On 2009-12-13 02:19, Fadut wrote:
> Hi, fellows. I have researched the list and checked the manual but I couldn't find the answer for this issue. So, I ask help with position sizing.
>
> I am back-testing some strategies. In the formula I use backtestRegularRawMulti, which allow some buy signals before a sell signal. I use PositionSize function that defines an amount of portfolio equity per trade. However, I would like to limit the sum of position value PER security and didn't discover how to do it.
>
> For instance: I could have PositionSize = 2%, of portfolio equity for each trade, and in some way a limit of "Sum PositionSize PerTicker" = 8%, of portfolio equity . In this way, the system will allow at most 4 trades per ticker before next sell signal.
>
> How to implement this limit in AFL language?
>
> Thanks a lot
>
> Filipe
>
>
>
> ------------------------------------
>
> **** 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
>
>
>
>
>
------------------------------------
**** 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:
amibroker-digest@xxxxxxxxxxxxxxx
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/
|