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

[amibroker] Re: Questions about the Equity() function



PureBytes Links

Trading Reference Links


Al,
Glad to see you're still interested. I tried several variations on 
the following few statements but I'm still not any getting results 
that make much sense. I won't be able to work on this for the next 
several hours but will after that.

VB_Based_PosSize = NumberOfShares*Open ;
Risk = .10 ;
PositionScore = ATR(5)/C * VB_Based_PosSize * IIf(VB_Based_PosSize 
> .20*Equity(), 0, VB_Based_PosSize) ; //Note still has Equity in it.
PositionSize  = -Risk*Open/1.1*ATR(5)  ;
//PositionSize = -20 ;

Dan


--- In amibroker@xxxxxxxxxxxxxxx, Al Venosa <advenosa@xxxx> wrote:
> danielwardadams wrote:
> 
> >
> > So what I was trying to do with Equity was to predetermine the 
number
> > of shares I could buy for my risk and then making the 20%
> > constraint part of my Buy criteria. Something like the following:
> >
> > Buy = cond1
> >   AND cond2
> >   AND NumShares*Open < .20*Equity()
> >   ...
> >
> > So if it fails that test, I just go find another stock that does 
work.
> >
> >
> Dan:
> 
> Instead of putting your size qualifier in the buy statement, why 
not 
> "AND" it to your PositionScore statement? That way, if a stock 
fails the 
> size test, it automatically goes to the next stock on the list 
according 
> to your other positionscore qualifiers until if finds one that 
> qualifies. Of course, this runs the risk of not selecting the top 
stocks 
> in your positionscore list, but it might solve the problem of 
getting 
> stocks picked that obey the positionsize function. Keep me informed 
of 
> your progress. Like you, I'm very interested in solving this 
> volatility-based positionsize conundrum.
> 
> Al Venosa





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/