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

RE: [amibroker] Question re MA



PureBytes Links

Trading Reference Links










Here is a little indicator I did a while ago and posted here using Param
function to see what value will change the indicator for tomorrow

Just put in what indicator you want in the plots. Use the Param to
adjust the prices (ctrl-R)

 

<font size=2 color=green
face="Courier New">//allow for minimum trading ticks

<font size=2 color=black
face="Courier New">tick = <span
lang=EN-AU >1<font
color=black face="Courier New">;

<font size=2 color=black
face="Courier New">xo = <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >C<font
color=black face="Courier New">);

<font size=2 color=black
face="Courier New">do = <span
lang=EN-AU >round<font
color=black face="Courier New">(xo*<span
lang=EN-AU >0.2<font
color=black face="Courier New">);

<font size=2 color=red
face="Courier New">O<span
lang=EN-AU > = <font
color=blue face="Courier New">IIf<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()==<font
color=blue face="Courier New">LastValue<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()),<font
color=blue face="Courier New">Param<span
lang=EN-AU >(<font
color="#cc4466" face="Courier New">"O"<span
lang=EN-AU >,xo,xo-do,xo+do,tick),<font
color=blue face="Courier New">Ref<span
lang=EN-AU >(<font
color=red face="Courier New">O<span
lang=EN-AU >,<font
color=fuchsia face="Courier New">1<span
lang=EN-AU >));

<font size=2 color=black
face="Courier New">xh = <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >C<font
color=black face="Courier New">);

<font size=2 color=black
face="Courier New">dh = <span
lang=EN-AU >round<font
color=black face="Courier New">(xh*<span
lang=EN-AU >0.2<font
color=black face="Courier New">);

<font size=2 color=red
face="Courier New">H<span
lang=EN-AU > = <font
color=blue face="Courier New">IIf<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()==<font
color=blue face="Courier New">LastValue<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()),<font
color=blue face="Courier New">Param<span
lang=EN-AU >(<font
color="#cc4466" face="Courier New">"H"<span
lang=EN-AU >,xh,xh-dh,xh+dh,tick),<font
color=blue face="Courier New">Ref<span
lang=EN-AU >(<font
color=red face="Courier New">H<span
lang=EN-AU >,<font
color=fuchsia face="Courier New">1<span
lang=EN-AU >));

<font size=2 color=black
face="Courier New">xl= <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >C<font
color=black face="Courier New">);

<font size=2 color=black
face="Courier New">dl = <span
lang=EN-AU >round<font
color=black face="Courier New">(xl*<span
lang=EN-AU >0.2<font
color=black face="Courier New">);

<font size=2 color=red
face="Courier New">L<span
lang=EN-AU > = <font
color=blue face="Courier New">IIf<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()==<font
color=blue face="Courier New">LastValue<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()),<font
color=blue face="Courier New">Param<span
lang=EN-AU >(<font
color="#cc4466" face="Courier New">"L"<span
lang=EN-AU >,xl,xl-dl,xl+dl,tick),<font
color=blue face="Courier New">Ref<span
lang=EN-AU >(<font
color=red face="Courier New">L<span
lang=EN-AU >,<font
color=fuchsia face="Courier New">1<span
lang=EN-AU >));

<font size=2 color=black
face="Courier New">xc = <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >C<font
color=black face="Courier New">);

<font size=2 color=black
face="Courier New">dc = <span
lang=EN-AU >round<font
color=black face="Courier New">(xc*<span
lang=EN-AU >0.2<font
color=black face="Courier New">);

<font size=2 color=red
face="Courier New">C<span
lang=EN-AU > = <font
color=blue face="Courier New">IIf<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()==<font
color=blue face="Courier New">LastValue<span
lang=EN-AU >(<font
color=blue face="Courier New">DateNum<span
lang=EN-AU >()),<font
color=blue face="Courier New">Param<span
lang=EN-AU >(<font
color="#cc4466" face="Courier New">"C"<span
lang=EN-AU >,xc,xc-dc,xc+dc,tick),<font
color=blue face="Courier New">Ref<span
lang=EN-AU >(<font
color=red face="Courier New">C<span
lang=EN-AU >,<font
color=fuchsia face="Courier New">1<span
lang=EN-AU >));

<font size=2 color=black
face="Courier New"> 

<font size=2 color=black
face="Courier New"> 

<font size=2 color=green
face="Courier New">//Plot( EMA (C,10),"EMA",colorBlue,styleLine);

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
color=red face="Courier New">C<span
lang=EN-AU >,<font
color="#cc4466" face="Courier New">"chart"<font color=black
face="Courier New">,<span
lang=EN-AU >colorBlack<font
color=black face="Courier New">,<span
lang=EN-AU >styleCandle<font
color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
color=blue face="Courier New">StochD<span
lang=EN-AU >(<font
color=fuchsia face="Courier New">14<span
lang=EN-AU >),<font
color="#cc4466" face="Courier New">"stochD"<font color=black
face="Courier New">,<span
lang=EN-AU >colorGreen<font
color=black face="Courier New">,<span
lang=EN-AU >styleLine<font
color=black face="Courier New">+<span
lang=EN-AU >styleOwnScale<font
color=black face="Courier New">);

<span lang=EN-AU
>Plot<font
color=black face="Courier New">(<span
lang=EN-AU >StochK<font
color=black face="Courier New">(<span
lang=EN-AU >14<font
color=black face="Courier New">),<span
lang=EN-AU >"stochK"<font
color=black face="Courier New">,<span
lang=EN-AU >colorRed<font
color=black face="Courier New">,<span
lang=EN-AU >styleLine<font
color=black face="Courier New">+<span
lang=EN-AU >styleOwnScale<font
color=black face="Courier New">);

 



<font size=3 color=teal
face="Times New Roman">Cheers,
Graham

<font size=2
color="#339966" face="Times New Roman"><font size=1
color="#339966">http://groups.msn.com/ASXShareTrading

<font size=2
color="#339966" face="Times New Roman"><font size=1
color="#339966">http://groups.msn.com/FMSAustralia



<span
>-----Original Message-----
From: John Rowlinson
[mailto:john@xxxxxxxxxxxxxxx] 
Sent: Wednesday, 19 March 2003
2:37 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Question re
MA

<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>Hi,





<font size=2 color=blue
face=Arial>
Does anyone know how I can predict a trend change.  I want to know what
value will make a MA go positive tomorrow. 





<font size=2 color=blue
face=Arial> 





<font size=2 color=blue
face=Arial>If I
take the MA for the past 15 days and subtract the MA for one day back from the
15 days then if it's positive I am saying that the trend is up.





<font size=2 color=blue
face=Arial> 





<font size=2 color=blue
face=Arial>How can I
determine the value that will make it go negative?





<font size=2 color=blue
face=Arial> 





<font size=2 color=blue
face=Arial>Thanks





<font size=2 color=blue
face=Arial> 





<font size=2 color=blue
face=Arial> 





<font size=2 color=blue
face=Arial>John
Rowlinson





<font size=2
face="Times New Roman">



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 <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.