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

RE: [amibroker] D-ratio and short candles



PureBytes Links

Trading Reference Links




<SPAN 
class=885474519-27062003>Ron,
You 
are mixing plot and graph. Currently all your plots are the same because they 
are all set to 4. Adjust that number  and the colors will appear..... you can 
eliminate the graph all together.....
<SPAN 
class=885474519-27062003> 
<FONT 
color=#282828 size=2> 
Key=OBV<FONT 
color=#0000ff>();
 
// Now calculate various MAs of KEY
 
M2=MA(Key,<FONT 
size=2>2<FONT 
color=#0000ff>);
M3=MA(Key,<FONT 
size=2>3<FONT 
color=#0000ff>);
M4=MA(Key,<FONT 
size=2>4<FONT 
color=#0000ff>);
M5=MA(Key,<FONT 
size=2>5<FONT 
color=#0000ff>);
M6=MA(Key,<FONT 
size=2>6<FONT 
color=#0000ff>);
M7=MA(Key,<FONT 
size=2>7<FONT 
color=#0000ff>);
M9=MA(Key,<FONT 
size=2>9<FONT 
color=#0000ff>);
M11=MA(Key,<FONT 
size=2>11<FONT 
color=#0000ff>);
M14=MA(Key,<FONT 
size=2>14<FONT 
color=#0000ff>);

// Now plot the Mx's<FONT 
color=#0000ff size=2>
Plot(M2,<FONT color=#ff00ff 
size=2>"M2",<FONT color=#ff00ff 
size=2>1,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M3,<FONT color=#ff00ff 
size=2>"M3",<FONT color=#ff00ff 
size=2>2,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M4,<FONT color=#ff00ff 
size=2>"M4",<FONT color=#ff00ff 
size=2>3,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M5,<FONT color=#ff00ff 
size=2>"M5",<FONT color=#ff00ff 
size=2>4,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M6,<FONT color=#ff00ff 
size=2>"M6",<FONT color=#ff00ff 
size=2>5,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M7,<FONT color=#ff00ff 
size=2>"M7",<FONT color=#ff00ff 
size=2>6,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M9,<FONT color=#ff00ff 
size=2>"M9",<FONT color=#ff00ff 
size=2>7,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M11,<FONT color=#ff00ff 
size=2>"M11",<FONT color=#ff00ff 
size=2>8,<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
size=2>
Plot(M14,<FONT color=#ff00ff 
size=2>"M14",<FONT color=#ff00ff 
size=2>9,<FONT color=#ff00ff 
size=2>1);
 
<SPAN 
class=885474519-27062003> 
As for 
your candle study, I gave you a hint with the code that compares today's ATR to 
that of a "normal" average ATR. The same approach could be used with ROC, CMO or 
any momentum based indicator. Simply explore for values that are "X" percent or 
below of the average or simply sort on the percent of average 
field........
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: mrdavis9 
[mailto:mrdavis9@xxxxxxxxxx]Sent: Friday, June 27, 2003 3:40 
PMTo: amibrokeryahoogroupsSubject: [amibroker] D-ratio and 
short candles


 I am struggling  with AFL, so In my 
previous posts under the subject heading of SHORT CANDLES, I almost begged for 
someone to let me have their top secret AFL codes for finding consolidation 
patterns where the candles become very short.   
I received several informative responses, 
but no one stopped to drop their top secret AFL codes into my tin 
cup.  I did, however receive some clues about how I should proceed. I 
followed up on these clues and with some MODIFICATION, I came up with the 
following D-ratio Indicator coding.     
 
//Create first your 
Ron_ratio=1000*(O-C)/(O+C); 

Ron_ratio=<FONT color=#ff00ff 
size=1>1000*<FONT color=#0000ff 
size=1>abs(O-C)/(O+C);
R=DEMA<FONT 
size=1>(Ron_ratio,20<FONT 
size=1>);       
Graph0=R;
/*AND see the resulting oscillation.
The Plot of R will tell so many things to your next 
steps.
Dimitris Tsokakis*/
 
I then tried to add my  (multiple moving 
averages) code system to the graph, but I failed to get it to 
work.
I have applied  multiple moving 
averages to OBV, and other indicators, and they work as they 
should.
I use the word Key in my code, so that it is easy for me 
to apply multiple moving averages to different things. 
I need advice regarding what I need to set Key to 
be.   Key=?????.        All 
advice will be appreciated.  Ron D

 
Graph8Style = styleLine | styleThick;
Key=OBV();
// Now calculate various MAs of 
KEY
M2=MA(Key,<FONT 
color=#ff00ff size=1>2);
M3=MA<FONT 
size=1>(Key,3);
M4=MA(Key,<FONT 
color=#ff00ff size=1>4);
M5=MA(Key,<FONT 
color=#ff00ff size=1>5);
M6=MA(Key,<FONT 
color=#ff00ff size=1>6);
M7=MA(Key,<FONT 
color=#ff00ff size=1>7);
M9=MA(Key,<FONT 
color=#ff00ff size=1>9);
M11=MA(Key,<FONT 
color=#ff00ff size=1>11);
M14=MA(Key,<FONT 
color=#ff00ff size=1>14);
// Now plot the Mx's
Plot(M2,<FONT 
color=#ff00ff size=1>"M2",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M3,<FONT 
color=#ff00ff size=1>"M3",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M4,<FONT 
color=#ff00ff size=1>"M4",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M5,<FONT 
color=#ff00ff size=1>"M5",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M6,<FONT 
color=#ff00ff size=1>"M6",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M7,<FONT color=#ff00ff 
size=1>"M7",4<FONT 
size=1>,1);
Plot(M9,<FONT 
color=#ff00ff size=1>"M9",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M11,<FONT 
color=#ff00ff size=1>"M11",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
Plot(M14,<FONT 
color=#ff00ff size=1>"M14",<FONT color=#ff00ff 
size=1>4,1<FONT 
size=1>);
//Now apply color to the plots
MaxGraph=9;
Graph0Color=colorRed;
Graph1Color=colorRed;
Graph2Color=colorRed;
Graph3Color=colorGreen;
Graph4Color=colorGreen;
Graph5Color=colorGreen;
Graph6Color=colorBlue;
Graph7Color=colorBlue;
Graph8Color=colorBlack;Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.