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

Re: [amibroker] Winning Systems



PureBytes Links

Trading Reference Links

Two versions are listed below: the original posting by Jaco and one that
I have modified and tweaked (this is a work in progress).

I am bothered by the presence of the ref (close, 1) in the indicator.
As I understand it this represents tomorrow's close (which is unknown
today!). When doing a scan for today AFL replaces tomorrow's close with
today's close, which is fine. However, when doing a back test for all
past dates tomorrow's close is a known quantity.

My concerns or questions:

* If a buy signal today is based on tomorrow's close being equal to
today's close will the signal disappear if tomorrow is a down day?
* Could I get a buy signal yesterday for yesterday that doesn't show
up until today because today's close is higher than yesterday's?

I have posted these questions some time back to the group but did not
get any response.

I have found that the CCI with colored bars performs similarly to the
MRI but the backtested performance is significantly inferior. I worry
that the difference is due to the ref(close, 1) artifact discussed
above.

I would appreciate any clarity that anyone can supply.

Regards,
-Tom McDaniel


--------------6DF97A6DD9D6685963FAA7BE
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Tom-
<p>Two versions are listed below: the original posting by Jaco and one
that I have modified and tweaked (this is a work in progress).
<p>I am bothered by the presence of the ref (close, 1) in the indicator.&nbsp;
As I understand it this represents tomorrow's close (which is unknown today!).
When doing a scan for today AFL replaces tomorrow's close with today's
close, which is fine.&nbsp; However, when doing a back test for all past
dates tomorrow's close is a known quantity.
<p>My concerns or questions:
<ul>
<li>
If a buy signal today is based on tomorrow's close being equal to today's
close will the signal disappear if tomorrow is a down day?</li>

<li>
Could I get a buy signal yesterday for yesterday that doesn't show up until
today because today's close is higher than yesterday's?</li>
</ul>
I have posted these questions some time back to the group but did not get
any response.
<p>I have found that the CCI with colored bars performs similarly to the
MRI but the backtested performance is significantly inferior.&nbsp; I worry
that the difference is due to the ref(close, 1) artifact discussed above.
<p>I would appreciate any clarity that anyone can supply.
<p>Regards,
<br>-Tom McDaniel
<br>&nbsp;</html>

--------------6DF97A6DD9D6685963FAA7BE--

/* MRI developed by Jaco Jonker */

mo=close/ref(close,1)*100 - rsi(14);
mo2=ma(mo,100);
graph0=mo;
graph1=rsi(14);



title= "MRI(100):"+name() + writeval( graph0 );


/* MRI developed by Jaco Jonker */
/* Modified by T. L. McDaniel */
/* Initially Optimized to 19 days 7/2/2001*/

Maxgraph=5;
Time=19;
mo=close/ref(close,1)*100 - rsi(Time);
mo2=ma(mo,100);
graph0Color=5;
graph0=mo;
Graph1Color=6;
graph1=rsi(Time);
Graph2style=4;
graph2=adx(Time);

graph3style=2;
graph4style=1;
graph3barcolor=iif(rsi(Time)>mo,5,4);
graph3=rsi(Time)-mo;
graph4=rsi(Time)-mo; 

Buy=cross(rsi(Time),mo) ;
Sell=cross(mo,rsi(Time));
Short=cross(mo,rsi(Time));
Cover=cross(rsi(Time),mo);

title= "DATE REF(Close,1) Close RSI(Time) MO";
title=("TLMTS "+ Name() +" " + Date()) +" "+writeval(ref(close,1)) +" "+writeval(close)+" "+writeval(rsi(Time)) +" "+writeval(mo);

T = 20;
title = "301-4 " + name () + " " + fullname() + " " 
+ "CCI" + " " + "periods:" + writeval(T);
maxgraph = 5;
graph2 = CCI (T);

Uptrend = 100; Downtrend = -100; 

graph2barcolor = IIF (graph2 > uptrend, 5, 
IIF (graph2 < downtrend,4,6));


graph4 = graph2;

buy = cross (graph2, 0) and (ref (graph2,-1) < 0) and (ref (graph2,-2) < 0)and (ref (graph2,-3) < 0) and (LLV (rsi(9),10) < 30) and cross (rsi (9),50);