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

[amibroker] Graphs



PureBytes Links

Trading Reference Links




I noticed some strange effect moving the graphs one bar 
forward.
The red curve is not the same, especially on the left side of 
the graph.
Do we have here an undesirable resonance effect ?
How could I avoid this ?
Dimitris Tsokakis
 
I used the following code to compare EMA with its 
"Echo"
 
n=20<FONT 
face="Times New Roman">;
output1[ 0 ] = Close[ 
0 ];output1[ <FONT 
size=2>1 ] = Close[ <FONT 
size=2>1 
];
output2[ 0 ] = Close[ 
0 ];output2[ <FONT 
size=2>1 ] = Close[ <FONT 
size=2>1 
];
f = 2/(n+<FONT 
size=2>1<FONT 
face="Times New Roman">);<FONT 
face="Times New Roman">
for( i = 2<FONT 
face=Verdana size=2>; i < BarCount; i++ 
)
{
output1[ i ] = f * Close[ i ] + (1<FONT 
size=2> - f) * output1[ i - 1<FONT 
face=Verdana size=2> ];<FONT 
face="Times New Roman">
output2[ i ] = f * Close[ i ] + (1<FONT 
size=2> - f) * output2[ i - 2<FONT 
face=Verdana size=2> ];
}<FONT face=Verdana 
size=2>
Plot(Output1,"EMA"<FONT 
size=2>,1,<FONT 
size=2>1<FONT 
face="Times New Roman">);<FONT 
face="Times New Roman">
Plot(Output2,"ECHO 
EMA",4,<FONT 
size=2>1<FONT 
face="Times New Roman">);
 






Yahoo! Groups Sponsor


ADVERTISEMENT
<img
src="" width=300 height=250 border=0>










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 the Yahoo! Terms of Service.