PureBytes Links
Trading Reference Links
|
<font
size=1 color=black face="Courier New">Gurus and Jayson
<font
size=1 color=black face="Courier New">I tried this code so I could see the difference
between the two horizontal lines. But the results I get in the interpretation
window is shown below. Could some guru please tell me
why this does not work. (For those of you who might
ask yes the labels of my horizontal study lines are “re” and “<span
class=SpellE>su”)
<b
><span
>Formula code:
<font
size=1 color=black face="Courier New">x=<span
class=GramE>LastValue<span
class=GramE>(<font
size=1 color=blue face="Courier New">Study<font size=1 color=black
face="Courier New">(<span
>"re"<font
size=1 color=black face="Courier New">));
<font
size=1 color=black face="Courier New">y=<span
class=GramE>LastValue<span
class=GramE>(<font
size=1 color=blue face="Courier New">Study<font size=1 color=black
face="Courier New">(<span
>"<span
class=SpellE>su"<font size=1 color=black
face="Courier New">));
<span
class=SpellE>WriteVal<font
size=1 color=black face="Courier New">(x);
<span
class=SpellE>WriteVal<font
size=1 color=black face="Courier New">(y);
<span
class=SpellE>WriteVal<font
size=1 color=black face="Courier New">(x-y);
<b
><span
>Interpretation window
result:
<font
size=1 color=black face="Courier New">0
<font
size=1 color=black face="Courier New">0
<font
size=1 color=black face="Courier New">0
<font
size=1 color=black face="Courier New">
<font
size=1 color=black face="Courier New">
<span
>Bruce
<span
>
<span
>-----Original Message-----
From: Jayson
[mailto:jcasavant@xxxxxxxxxxx]
Sent: <st1:date
Month="10" Day="14" Year="2003"><span
>Tuesday, October 14, 2003<font
size=2 face=Tahoma> <st1:time
Hour="9" Minute="49">9:49 AM<span
>
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] How do I
subtract the difference between two horizontal study lines? (in AFL)
<span
>
<span
>Brian,
<span
>have a look in the help
files for Study(). You can name your trend line than call its value in a code.
<span
>
<span
>for instance in this
exploration I have named 2 study lines and called the last value of each and
subtracted one from the other....
<span
>
<span
>
<span
>Filter=C>0;<font
size=2 color="#282828">
<span
>x=<font
size=2 color=blue>LastValue(Study("s1"))<font
size=2 color=blue face=Arial>;<span
>
<span
>y=<font
size=2 color=blue>LastValue(Study("s<font
size=2 color=blue face=Arial>2")<span
>);<font
size=2 color="#282828" face=Arial>
<span
>AddColumn<font
size=2 color="#282828" face=Arial>(x,<span
>""<font
size=2 color="#282828" face=Arial>);<span
>
<span
>AddColumn<font
size=2 color="#282828" face=Arial>(y,<span
>""<font
size=2 color="#282828" face=Arial>);
<span
>AddColumn<font
size=2 color="#282828" face=Arial>(x-y,<span
>""<font
size=2 color="#282828" face=Arial>);
<span
>
<span
>
<span
>Regards,
<span
>Jayson
-----Original Message-----
From: Bruce Nutter
[mailto:bdnutter@xxxxxxxxxxx]
Sent: <st1:date
Month="10" Day="14" Year="2003"><span
>Tuesday, October 14, 2003<font
size=2 face=Tahoma> <st1:time
Hour="12" Minute="26">12:26 PM<span
>
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] How do I
subtract the difference between two horizontal study lines? (in AFL)
<font size=3 color=black
face="Times New Roman">Gurus,
<font size=3 color=black
face="Times New Roman">Does anybody
know how to subtract between two horizontal study lines in AFL code? I have to
study lines that I move around to calculate entry and exit points. What I'd
like to do is to show that vertical distance between these two horizontal lines
in the interpretation window. Would one of you gurus please let me know how to
do this?
<font size=3 color=black
face="Times New Roman">Bruce
<span
>
Send
BUG REPORTS to bugs@xxxxxxxxxxxxx<font size=2
face="Courier New">
Send 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 Yahoo!
Terms of Service.
<font size=2
face="Courier New">Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<span
>
Send 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 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.
|