PureBytes Links
Trading Reference Links
|
Herman,
thank you for the references, I will take a closer look.
My code needs some improvements, i am missing some trades.
Do you have another code procedure ?
Can you give me an example ?
Thanks in advance.
DT
--- In amibroker@xxxx, "Herman van den Bergen" <psytek@xxxx> wrote:
> Thanks Dimitris, for this interesting post. You end your post
with: "The
> code seem to operate, although I do not feel so safe adding new
trading
> rules after the Equity line.
> Any opinions/ideas/improvements/comments ?"
>
> Why do you think this way? What is so special about the Equity()
formula? It
> is just an other way of juggling the numbers. But we have to be
careful with
> delays; we only know the equity at the end of our trade ...so there
is a two
> day delay: one day for our primary system to simulate our regular
trade and
> one day to respond to our secondary system. This would be for a
reversal
> system.
>
> There is no difference between processing the price arrays with an
Equity()
> or any other indicator like RSI() , or who knows what. A trading
system can
> be used like a "filter". I think we discussed this before here or
on the DLL
> list where i posted a prototype hbEquity() DLL some time ago that
has a
> feedback argument (I can email you a copy if you like).
>
> This is not an uncommon technique. A search on the net for "Trading
the
> Equity Curve" will show that this was done many years ago. Here are
some
> link that could be followed up on:
> http://store.traders.com/-v10-c10-trading-pdf.html
> http://www.sirtrade.com/equity.htm
> http://www.libertyresearch.com/book1.htm
>
http://www.activetradermag.com/article_index_strategy.htm#Sept2000 or
> http://www.activetradermag.com/tocs/toc0900.htm
> http://www.purebytes.com/archives/omega/1998/msg01851.html
>
> And you say: "Shall we ALWAYS improve a trading system performance
with
> this method ?"
>
> Absolutely: YES. The trouble comes, just like with a trend
following system
> when your equity moves horizontal; lots of whipsaws. So the design
problems
> are exactly the same as with any other trading system. In fact you
should be
> able to redefine the OHLC arrays with the Equity and develop a
trading
> system for it, the usual way.
>
> Take care,
> Herman.
>
> -----Original Message-----
> From: Dimitris Tsokakis [mailto:TSOKAKIS@x...]
> Sent: Tuesday, July 30, 2002 2:39 AM
> To: amibroker@xxxx
> Subject: [amibroker] Equity conditions applied to trading systems
>
>
> Here is an attempt to use Equity conditions and redefine trading
rules.
> The system applies the original trading rules only when the
Equity line is
> above its 40-day EMA
> and stops [with the appropriate order] any trade when the Equity
line
> falls below its 40-day EMA.
> It begins a new trade, the one that the original system would
apply this
> day, when the Equity line crosses ascending its 40-day EMA
>
> // the original trading system
> Blevel =13;
> Slevel =85;
> StOcci=100*(CCI(6)-LLV(CCI(6),14))/(HHV(CCI(6),14)-LLV(CCI
(6),14));
> stocci=MA(stocci,5);
> Buy=Cross(STOCCI,BLEVEL);Sell= Cross(STOCCI, Slevel);
> Short = Sell;Cover = Buy;
> Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
> Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
> E1=Equity();EM40=MA(E1,40);
> // Equity condition
> COND=E1>EM40;
> XB=Flip(Buy,Sell);// preserve the original buy till the next sell
> XS=Flip(Sell,Buy);
> XSH=Flip(Short,Cover);// preserve the original Short till the
next Cover
> XCO=Flip(Cover,Short);
> // Descending and ascending equity cross conditions
> DESCR=Cross(EM40,E1);
> ASCCR=Cross(E1,EM40);
> // the new trading rules
> // How to begin a trade
> Buy=COND*Buy OR (ASCCR*XB);// {original buy when E1>EM40} OR {a
new buy
> when an ascending cross occur}
> Short=COND*Short OR (ASCCR*XSH);
> // How to stop a trade
> Sell=COND*Sell OR (DESCR*XB);// {original sell when E1>EM40} OR
{ a new
> sell when an ascending cross occur}
> Cover=COND*Cover OR (DESCR*XSH);
>
> The code seem to operate, although I do not feel so safe adding
new
> trading rules after the Equity line.
> Any opinions/ideas/improvements/comments ?
> Shall we ALWAYS improve a trading system performance with this
method ?
> Dimitris Tsokakis
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
|