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

[amibroker] Re: Sell n days later



PureBytes Links

Trading Reference Links

Lookup Applystop in the Help Files

--- In amibroker@xxxxxxxxxxxxxxx, Esteban <EstebanUno@xxxx> wrote:
> I'm new to AmiBroker, and I'm trying to code a simple ranking
system. I was 
> hoping to use the rotational trading function, but I don't think I
can add 
> an additional sell parameter using this.
> 
> I want to buy and remain in the top 10 ranked issues according to my
ranking 
> criteria. I want to replace a position when it falls out of the top
10 but 
> not until it has been held for a minimum of 30 days.
> 
> I don't understand how to access the position entry date of the
individual 
> issues to see if 30 days has passed. Here's the idea. 
> 
> SetOption("MaxOpenPositions", 10)
> Sell = (30 days have passed since opening the position)
> Buy = True
> PositionScore= myRankingScheme
> 
> Forgive my crude attempt at coding, my understanding of the concepts
are 
> hazy. I have no idea how to quantify the Sell variable to indicate
30 days 
> have passed for a particular position. I believe if Sell was set to
true, 
> the portfolio would always contain the top 10 positions without the
30 day 
> qualifier. If sell was set to false the portfolio would remain in the 
> original top 10 positions. Correct me if I'm wrong.
> 
> Thanks for helping me get started.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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