logo
Welcome Guest! To enable all features please Login or Registers.

Notification

Icon
Error

Options
Go to last post Go to first unread
hayseed  
#1 Posted : Wednesday, July 5, 2006 4:36:14 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

wmadani had an excellent question the other day involing calculating the number of securities that closed above a moving average.... thank goodness roy answered first cause his hightech code sure makes my lowtech method look like a joke .... a few sites offer those types of sums, such as stockcharts.com, but it's nice to be able to plot them in metastock on our own..... roy's method makes quick work of it.... have you ever wanted to plot put/call ratios, put call volumes or something similar.... if you can locate your 'want to plot' items data in either text or excel, its a simple matter to load that into meta..... don't worry if the data is not true open/high/low/close data..... meta doesn't care...... use the downloader to create a new security and paste in the data.... use the security data function to plot the data.... every now and then we might have a need to find something within a bars since period.... such as 52 week new highs or lows..... of course the explorer can find'em..... a quick way to limit the period is by using the data loading option and load only 52 weeks worth.... only takes a second to change the time to 1 month.... just change the data loading amount appropriately......h [code:1:0b583d54ae]type:=Input("calls, puts, total, put/call ratio, ",1,4,4); pds:=Input("moving average periods",2,50,5); plot:= If(type=1,Security("C:\\MetaStock Data\\dow 30\\pcr",O), If(type=2,Security("C:\\MetaStock Data\\dow 30\\pcr",H), If(type=3,Security("C:\\MetaStock Data\\dow 30\\pcr",L), If(type=4,Security("C:\\MetaStock Data\\dow 30\\pcr",C), Security("C:\\MetaStock Data\\dow 30\\pcr",C))))); Mov(plot,pds,S); plot[/code:1:0b583d54ae]
example of roys reset for all 6 columns at once
[code:1:0b583d54ae]A:=ExtFml("GV.SetVar","CountA",0); Sin(Cum(5)); {forces visible plot} A:=ExtFml("GV.SetVar","Countb",0); Sin(Cum(5)); {forces visible plot} A:=ExtFml("GV.SetVar","Countc",0); Sin(Cum(5)); {forces visible plot} A:=ExtFml("GV.SetVar","Countd",0); Sin(Cum(5)); {forces visible plot} A:=ExtFml("GV.SetVar","Counte",0); Sin(Cum(5)); {forces visible plot} A:=ExtFml("GV.SetVar","Countf",0); Sin(Cum(5)); {forces visible plot}[/code:1:0b583d54ae]
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.