[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: limit trades to one per week



PureBytes Links

Trading Reference Links

I suspect that you would have to write custom backtester code to enforce this, since you would otherwise have no way of knowing whether portfolio limitations (e.g. available funds, max positions, etc.) prevented a signal from being taken.

The logic would go as follows:
- Write your Buy/Sell rules without regard for trying to prevent duplicate trades within the week.
- In your custom backtester, loop through signals on a bar by bar basis and for each signal check if either
  A) An existing position is already opened for that symbol
  B) Or, a closed trade for that symbol already exists within the same week.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "foxblade2000invest" <foxblade@xxx> wrote:
>
> Can anyone help?
> 
> I have a system that trades a portfolio of stocks from the weeks open. I would like to limit it so that once a trade has been hit within each week, no other trades can be placed until the next week for each stock being traded(as part of the rules, positions are closed out on Friday's).
> 
> Can anyone suggest any code that can be used to do this type of thing, or point me in the right direction?
> 
> Thanks to all,
> Rich
>




------------------------------------

**** 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/