Traderji.com - Discussion forum for Stocks Commodities & Forex

How to plot MA of scrip vs Sensex?

Discuss How to plot MA of scrip vs Sensex? at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; I want to plot a moving average of stock/sensex over a 10 day period. I've ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 7th November 2006, 12:32 PM
Member
 
Join Date: Jul 2005
Posts: 220
Thanks: 0
Thanked 2 Times in 2 Posts
pasha is on a distinguished road
Reputation: 27
Default How to plot MA of scrip vs Sensex?

I want to plot a moving average of stock/sensex over a 10 day period.
I've tried using Plotforeign in AB, but it does'nt work.
Any ideas? Also how to plot the weekly chart so that both weekly and daily are visible in 2 panes?
Reply With Quote
  #2  
Old 7th November 2006, 03:40 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 911
Thanks: 0
Thanked 8 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 40
Default Re: How to plot MA of scrip vs Sensex?

Quote:
Originally Posted by pasha View Post
I want to plot a moving average of stock/sensex over a 10 day period. I've tried using Plotforeign in AB, but it does'nt work.
Look at the syntax of Plotforeign:
PlotForeign( tickersymbol, name, barcolor, style = styleCandle | styleOwnScale, minvalue = {empty}, maxvalue = {empty}, XShift = 0 )

You should use styleOwnScale, so that the second script is plotted on its own scale.

Quote:
Also how to plot the weekly chart so that both weekly and daily are visible in 2 panes?
I think this is not possible to have it in single layout. Do this:
1) Open daily chart and save it as one layout, say dailyLayout.
2) Open weekly chart and save it as, say weeklyLayout.
Now you can easily switch between two layouts.

If this is not you are looking for, try using timeframe...() functions. Please refer to Amibroker User Guide, which has perfect documentation for these functions.

Let me know if I'm wrong anywhere.
Praveen.
Reply With Quote
  #3  
Old 7th November 2006, 03:53 PM
Member
 
Join Date: Aug 2005
Posts: 222
Thanks: 0
Thanked 1 Time in 1 Post
saji oommen is on a distinguished road
Reputation: 31
Default Re: How to plot MA of scrip vs Sensex?

Hello.

Use Time frame it should work. Lot of examples are available in AFL documentation and AFL library

Regards

Saji
Reply With Quote
  #4  
Old 8th November 2006, 01:04 PM
Member
 
Join Date: Jul 2005
Posts: 220
Thanks: 0
Thanked 2 Times in 2 Posts
pasha is on a distinguished road
Reputation: 27
Default Re: How to plot MA of scrip vs Sensex?

Thanks for the replies.
When I add a custom indicator in the Indicator Builder and paste this in
" PlotForeign(BSE SENSEX, name, barcolor, style = styleCandle | styleOwnScale, minvalue = {empty}, maxvalue = {empty}, XShift = 0 )"
A syntax error occurs.
Even when "name" is changed to BSE SENSEX. What's wrong with this?
Reply With Quote
  #5  
Old 8th November 2006, 02:32 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 911
Thanks: 0
Thanked 8 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 40
Default Re: How to plot MA of scrip vs Sensex?

Quote:
Originally Posted by pasha View Post
Thanks for the replies.
When I add a custom indicator in the Indicator Builder and paste this in
" PlotForeign(BSE SENSEX, name, barcolor, style = styleCandle | styleOwnScale, minvalue = {empty}, maxvalue = {empty}, XShift = 0 )"
A syntax error occurs.
Even when "name" is changed to BSE SENSEX. What's wrong with this?
Hey...you are wrong there. What you have used is the syntax for PlotForeign.

Try this:
PlotForeign("SENSEX", "BSE Sensex", colorRed, styleCandle | styleOwnScale);

NOTE: The first parameter is the ticker symbol, ie enter the ticker symbol which you are using in your database. I've given "SENSEX" just for an eg.

Praveen.
Reply With Quote
  #6  
Old 8th November 2006, 03:39 PM
Member
 
Join Date: Jul 2005
Posts: 220
Thanks: 0
Thanked 2 Times in 2 Posts
pasha is on a distinguished road
Reputation: 27
Default Re: How to plot MA of scrip vs Sensex?

Thanks Praveen, that worked perfectly.
Is it possible to plot a 10 day ema of the Sensex on top of the Sensex price too?
Reply With Quote
  #7  
Old 8th November 2006, 04:38 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 911
Thanks: 0
Thanked 8 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 40
Default Re: How to plot MA of scrip vs Sensex?

Quote:
Originally Posted by pasha View Post
Thanks Praveen, that worked perfectly.
Is it possible to plot a 10 day ema of the Sensex on top of the Sensex price too?
Hi,

Try this:
Plot(EMA(Foreign( "SENSEX", "C" ), 10), "EMA10 of SENSEX", colorGreen, styleOwnScale);

I've not tried it yet..

Praveen.

Last edited by bvpraveen; 8th November 2006 at 08:10 PM. Reason: corrected the AFL
Reply With Quote
  #8  
Old 8th November 2006, 10:47 PM
Member
 
Join Date: Jul 2005
Posts: 220
Thanks: 0
Thanked 2 Times in 2 Posts
pasha is on a distinguished road
Reputation: 27
Default Re: How to plot MA of scrip vs Sensex?

Thanks again, it works!
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: How to plot MA of scrip vs Sensex?
Thread Thread Starter Forum Replies Last Post
suspended scrip satya_pinku2003 Equities 3 28th July 2006 10:56 PM
How to plot trailing & rolling pe chart bond008 Software 0 30th August 2005 06:29 PM


All times are GMT +5.5. The time now is 05:57 PM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com