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

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



PureBytes Links

Trading Reference Links

If you are considering single stock trading systems you can solve situations like this by cascade two trading systems in one single formula. The first one would give you your reference equity which you use to control the signals of the second system which gives you the final trading signals. Remember that only the last signal assignments are used by the backtester.
 
best regards,
herman.
 
 
 
-----Original Message-----
From: Tomasz Janeczko [mailto:amibroker@xxxxxx]
Sent: Monday, January 10, 2005 10:09 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Equity() in Buy/Sell conditions

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


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

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




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