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

[amibroker] How Do I --- Use Day by Day Equity as a Filter



PureBytes Links

Trading Reference Links

How Do I --- Use Day by Day Equity as a Filter

Assume I have a trading system that gets me into good trades, but 
does not have an effective exit.  I want to monitor the day by day 
equity and use it as one of the exit methods.  

I want to plot the equity curve corresponding to both the unfiltered 
trades and the trades exited due to the equity curve filter.

How do I code this into AmiBroker so that 
A.  the BackTester properly accounts for the trades that would have 
actually taken place; and also  
B.  Explorer indicates that I should place orders for the next day, 
and at what price?

Since the actual system will be more complex and include orders that 
are not always at the next open, the code should work correctly 
without regard to the Backtester Settings of when to trade and how 
much delay. 

Specific (but somewhat artificial) example :

Trade Entry
1.  Whenever today's 5 day moving average of close is higher than 
yesterday's 5 day moving average of close, then a buy signal is 
generated and I want to place a market order to buy at the open 
tomorrow.

Trade Exit
1.  Whenever today's 50 day moving average of close is lower than 
yesterday's 50 day moving average of close, then a sell signal is 
generated and I want to place a market order to sell at the open 
tomorrow.
2.  Whenever todays unfiltered equity is one percent or more below 
the 5 day average of unfiltered equity, place a market order to sell 
at the open tomorrow. 


Thanks in advance,
Howard




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/