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

Re: [amibroker] Equity() in Buy/Sell conditions



PureBytes Links

Trading Reference Links

Hello,

Yes the conceptual mistake in your formula is that
buy signal may occur only when equity is its above 30 day avarage.
But equity will be FLAT line unless there are any buys, so
it will never cross above 30 day average so no buy will happen.

Typical chicken and egg problem.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Zeno" <lars.oppermann@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, January 10, 2005 2:05 PM
Subject: [amibroker] Equity() in Buy/Sell conditions


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


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