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

[amibroker] Re: Backtest using equity curve



PureBytes Links

Trading Reference Links

Hi Herman,

If I only wanted to ENTER trades if the equity curve is greater then a 
moving average of it, both actual systems being the same. 

Would this be right please?:

----------------8<-----------------

// System ONE code here 
E1 = Equity(1);

// System ONE code here
Buy = Buy and E1 > MA(E1,30);

----------------8<-----------------

...or I if wanted to simply tighten a trailing stop when the equity curve is 
less then a moving average of it:

----------------8<-----------------

// System ONE code here
E1 = Equity(1);

// System ONE code here
Sell = IIf(E1 > MA(E1,30), use "loose" trailing stop, use "tight" trailing 
stop)

----------------8<-----------------

TIA.

Cheers Glenn


--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" 
<psytek@xxxx> wrote:
> You can cascade as many systems as you like, even different ones, 
and use
> the Equity from the previous one as a parameter in the next system. I 
know
> this can be done with the old backtester and think it should also work 
in
> the new PF tester.
> 
> // system one code here
> E1 = Equity(1);
> 
> // System two code here
> Buy = Buy and (some function of E1);
> E2 = Equity(1);
> 
> // System three code here
> Buy = Buy and (some function of E2);
> E3 = Equity(1);
> etc.
> 
> You essentially redefine the buy signal as often as needed (afl 
executes
> line after line and never looks back), the last definition will be what
> determines your results.
> 
> Herman


------------------------ 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/mOAaAA/3exGAA/qnsNAA/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/