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

[amibroker] Equity Curve Trading



PureBytes Links

Trading Reference Links


I am trying to filter out some signals using the equity curve but I am
running into problems.  I can plot the arrows fine on the equity curve
when to be long and when trades should be sold, but in backtesting
with the same code, no trades occur.  Not sure if its running into a
problem because the equity curve hasn't really been generated yet.  I
tried the Equity() function as well but I think I used it improperly.
 Maybe someone knows of a better way to do this.

//equity
eq = Foreign("~~~EQUITY", "C");
//MA
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 200, 1, 10 );

//buy requirements
buy = (Cross(eq,MA(P,Periods)) AND ...
//sell requirements
sell = (MA(P,Periods) - eq > eq * .1) OR ...

Basically, if the equity curve drops 10% below the MA, close all open
positions.  Then as soon as equity curve crosses the MA, enter all
currently open system trades.  Or start taking entry signals again,
but ideally the first.  I hope someone can help.

Best Regards,
David Piatek





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/