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

[amibroker] TD REI - Code



PureBytes Links

Trading Reference Links

I believe I picked up this code from the somewhere...



HighMom = H - Ref( H, -2 );
LowMom = L - Ref( L, -2 );

Cond1 = ( H >= Ref( L,-5) OR H >= Ref( L, -6 ) ); 
Cond2 = ( Ref( H, -2 ) >= Ref( C, -7 ) OR Ref( H, -2 ) >= Ref( C, -
8 ) ); 
Cond3 = ( L <= Ref( H, -5 ) OR L <= Ref( H, -6) ); 	
Cond4 = ( Ref( L, -2 ) <= Ref( C, -7 ) OR Ref( L, -2 ) <= Ref( C, -
8 ) );

Cond = ( Cond1 OR Cond2 ) AND ( Cond3 OR Cond4 );

Num = IIf( Cond, HighMom + LowMom, 0 );
Den = abs(  HighMom ) + abs( LowMom );

TDREI = 100 * Sum( Num, 5 )/Sum( Den, 5 ) ;

Graph0 = TDREI;    


------------------------ 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/l.m7sD/LIdGAA/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/