PureBytes Links
Trading Reference Links
|
Or
maybe just look at the built in function LinRegSlope()
Regards,
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: jwilsonp2a
[mailto:jimnwilson@xxxxxxxxx]Sent: Tuesday, December 16, 2003 1:34
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re:
how do i calculate slope of a ma?j,If you want
the slope based on the value today and yesterday, I would use
MA(close,x)-MA(ref(close,-1),x), where x is the length of the moving
average. This is the old "rise over run" from algebra. However, you should
normalize this value if you want to compare it to something else. Say stock
A has a MA that was 100 yesterday and 105 today. The slope would be 5. Stock
B has a MA that was 10 yesterday and 10.5 today. The slope would be 0.5. But
both changed by the same percentage. So you could divide both values by the
MA yesterday, then both would be 0.05, the same "slope".Maybe one of
the experts out there could clarify one thing:Is MA(ref(close,-1),x) the
same as ref(MA(close,x),-1) ?For the buyprice question, it would be
buyprice=MA(close,x)-0.25;Hope that helps,Jim--- In
amibroker@xxxxxxxxxxxxxxx, "jaykwok425" <jaykwok@xxxx> wrote:> 2
Questions:> > 1) How do I calculate the slope of a moving
average?> > 2) How would I set buyprice to be 1 tick under a
moving average > (assuming ticksize = 0.25)?> > Thanks for
answering my newbie questions,> > jSend
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
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|