PureBytes Links
Trading Reference Links
|
Hello,
It is very easy. Your two formulas are NOT equivalent.
First plots THREE graph lines (three plots)
while second plots only TWO (two graph variables).
Since automatic scaling must ensure all plots are visible and
your first plot contains very small values
Y scale becomes different.
Plot and graph methods provide identical results IF
ONLY you plot the same things.
Use this formula instead your first one:
upday=IIf<FONT
size=1>(O<C,C-O,<FONT color=#ff00ff
size=1>0);
downday=IIf<FONT
size=1>(C<O,O-C,<FONT color=#ff00ff
size=1>0);
DR = IIf<FONT
size=1>(O<C,C-O,<FONT color=#ff00ff
size=1>0)-IIf<FONT
size=1>(C<O,O-C,<FONT color=#ff00ff
size=1>0);
Plot(DEMA<FONT
size=1>(upday,28<FONT
size=1>),"UpDema28"<FONT
size=1>,colorGreen,styleThick);<FONT color=#0000ff
size=1>
Plot(DEMA<FONT
size=1>(downday,19<FONT
size=1>),"DnDema19"<FONT
size=1>,colorRed,styleThick);
//Title="Up28 Dn19 DemaPlot<FONT
face="Courier New" color=#ff00ff size=1>Test
"+Date<FONT
size=1>()+", "+
SelectedValue(DR)
+"\n" + <FONT
color=#0000ff size=1>SelectedValue(DR);
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
mrdavis9
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibrokeryahoogroups
Sent: Sunday, September 07, 2003 9:09
AM
Subject: [amibroker] Plot different than
Graph0
Graham, thanks a lot for helping me learn to use
the Plot (xxx system instead of the Graph0 way that I
am used to.
To all Amibroker users, I Am getting some
interesting differences in the appearance of the graphs produced by the
Plot(xxx method when compared to the Graph0 way to do it. I
have attached a chart that shows the difference in appearance. The
values in the popup menus are different as well. I have included both of
the coding methods that I am
using.
I took it as a personal challenge to try and
solve this mystery myself, but I have to give up. Try as I may, I can find no
differences in these two codes other than the use of
Plot(xx in lieu of the old Graph0
way to define how the graphs should appear. As usual, the
problem will probably be obvious to others.
I am Looking foreward to learning why these
differences are appearing. Ron D
This is the newer Plot
method.
upday=IIf<FONT
size=1>(O<C,C-O,<FONT color=#ff00ff
size=1>0);
downday=IIf<FONT
size=1>(C<O,O-C,<FONT color=#ff00ff
size=1>0);
DR = IIf<FONT
size=1>(O<C,C-O,<FONT color=#ff00ff
size=1>0)-<FONT color=#0000ff
size=1>IIf<FONT
size=1>(C<O,O-C,<FONT color=#ff00ff
size=1>0);
Plot(DR,<FONT color=#ff00ff
size=1>"deltaUpDnDays"<FONT
size=1>,colorBlack,styleNoLine);<FONT color=#0000ff
size=1>
Plot(DEMA<FONT
size=1>(upday,28<FONT
size=1>),"UpDema28"<FONT
size=1>,colorGreen,styleThick);<FONT color=#0000ff
size=1>
Plot(DEMA<FONT
size=1>(downday,19<FONT
size=1>),"DnDema19"<FONT
size=1>,colorRed,styleThick);
Title="Up28 Dn19 DemaPlot<FONT
face="Courier New" color=#ff00ff size=1>Test
"+Date<FONT
size=1>()+", "+
SelectedValue(DR)
+"\n" + <FONT
color=#0000ff size=1>SelectedValue(DR);
<FONT
size=1>====================================================================<FONT
face=Arial size=2>
This is the old Graph0 method
Title="Up28 Dn19
DemaGraph0<FONT face="Courier New" color=#ff00ff
size=1>Test ";
upoc=IIf<FONT
size=1>(O<C,C-O,<FONT color=#ff00ff
size=1>0);
dnoc=IIf<FONT
size=1>(C<O,O-C,<FONT color=#ff00ff
size=1>0);
/*Now Plot these formulas*/<FONT
size=1>
Graph1=colorRed;
Graph1=DEMA<FONT
size=1>(up<FONT
size=1>oc,28<FONT
size=1>);
Graph0=colorGreen;
Graph0=DEMA<FONT
size=1>(dn<FONT
size=1>oc,19);
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.
|