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

[amibroker] Equity() in Buy/Sell conditions



PureBytes Links

Trading Reference Links



Hi,

I'm just starting to check out Amibroker, and I wanted to implement a
system, which would only enter a position, when the Equity curve was
above it's 30-day MA.
If I use something like
eq = Equity();
Buy = (my_rule) AND eq > MA(eq, 30);
Sell = ...;

it doesn't work, because it seems like Equity() would only be
evaluated correctly, if I use it after the definition of Buy/Sell,
Using Ref(Equity(),-1) also does not help.

I guess I am making some conceptual mistake here - any suggestions?

Cheers,
~Lars








------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/