Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: SunriseMan
About
User Name: SunriseMan
Groups: Gold User, Member, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Monday, November 30, 2009
Last Visit: Monday, April 11, 2011 6:49:13 PM
Number of Posts: 29
[0.01% of all post / 0.01 posts per day]
Avatar
Last 10 Posts
Topic: Scanning watchlists in SF5
Posted: Thursday, June 10, 2010 11:50:32 AM
Bruce, thanks for the reply. I was hoping that there was an elegant alternate way to achieve the goal, which is why I was asking a trainer. Unfortunately, it sounds like scanning of multiple conditions just wasn't anticipated.

My earlier thread on the topic was moved to the Bugs/Suggestions forum, so whoever monitors posts there should presumably already know about it.
Topic: Scanning watchlists in SF5
Posted: Wednesday, June 9, 2010 1:58:16 PM

Thanks very much for the link to that post. That's an elegant way of representing the results of the very kludgy and error-prone combination I was trying to avoid, but still makes it difficult to keep track of and add/remove screens.

Has a trainer (or any other Worden employee) confirmed that SF5 deliberately has no way to do this kind of scanning? The banner at the top of the StockFinder homepage says "Rule-Based Scanning, Sorting & Charting... just got easier." I'm still hoping that's true, and that I'm just missing some technique that makes this straightforward.

Topic: Scanning watchlists in SF5
Posted: Wednesday, June 9, 2010 9:26:34 AM
I posted this before, but an admin moved it to the "bugs" forum, which means I can't get an answer. Please don't move it again!

One of the most useful (to me) features of SF4 was the ability to load a layout that would easily screen a large watchlist of stocks (usually 1,000 to 2,000)  for certain conditions. Then, I could easily see which of the stocks were worthy of future investigation.

The idea here is that I have a number of different screens to look for different opportunities (e.g. Bullish MACD Divergence, Downward Bounce of Resistance, Upward Breakout, etc.). In SF4, it's easy to screen a long list of candidates to find the ones that meet any of those screens, by adding a column to a watchlist for each one. SF4 would automatically scan the whole watchlist, and any stocks that passed any of the screens would sort to the top.

I'm trying to figure out how to achieve the same functionality in SF5. All of these screens in aggregate can take an hour to run, so sitting there and spending an hour clicking on the various column sort buttons is not an attractive option. I know about filtering watchlists, but I can't see how to easily filter to find stocks that pass any of a set of conditions rather than all of a set of conditions.

The only idea I can come up with is to create a big combination condition that then references all of the other conditions. This is an unattractive solution, as it's difficult to maintain and error-prone as I add and remove screens from my collection.

Is there a recommended way to do this type of sort in SF5? Or is this not a use case anticipated by Worden?
Topic: Controlling exit price in BackScanner
Posted: Friday, April 30, 2010 1:08:42 PM
Is there any way to cause BackScanner to simulate selling a position at a particular price? For example, suppose my trading plan is that each day I'll set a limit order to sell when the stock hits the prior day's 21-day moving average. I can easily make a rule to test if "Price.High > MA.Last(1)" to trigger a sale. However, the open, close, high, and low prices for the bar may all be far away from the point at which I would have sold, so none of those give an accurate reflection of how the system would work.
Topic: Using data from multiple symbols
Posted: Monday, February 1, 2010 6:25:56 PM
I'm sorry, I need a little more help here. As I'm testing my indicators, I find that the "average number of bars since passed" type gives me very interesting results. I'm then trying to create a RealCode indicator that will import the value of my market indicator.

The problem is that, supposing my rule is named "Test", the indicator created is called "Index-Test Avg #Bars". When I try to add that indicator to my RealCode, the editor creates a line that looks like this:

'# TA# = indicator.Index-TestAvg#Bars

When I then try to use TA, I get an error that it's not declared. I've tried removing various parts of punctuation to no avail, and I can't figure out how to rename a market indicator.

For now, I am using an ugly workaround of adding a child plot which is the 1-day simple moving average. However, I'm hoping that there's a more elegant solution.
Topic: Using data from multiple symbols
Posted: Monday, February 1, 2010 4:42:43 PM
Awesome, thank you! The menu item is actually labeled "Create Custom Index," which made me think it did something different.
Topic: Using data from multiple symbols
Posted: Monday, February 1, 2010 3:25:57 PM

Let's say that I'm trying to calculate the number of Morningstar Sub-industry groups that had a day-over-day increase or decrease in the value of MACD-H, and plot two lines on the chart, one showing for each date the number of groups where MACD-H went up, the other showing for how many MACD-H went down. (If necessary, I'm certainly fine with have two separate indicators with largely redundant code to plot the two lines. I could also implement MACD-H from scratch based on price data, although I'd prefer not to! )

Topic: Using data from multiple symbols
Posted: Monday, February 1, 2010 3:06:50 PM
Is there a way to create an indicator that pulls data from multiple symbols? I'm trying to create a graph based on the activity of all of the components in an index - that is, I need to be able to pull data from each of them. It's not practical to add them all onto one chart, although it would be easy to make a RealCode array with their names if that helped.

If it wrote a rule instead of an indicator, I could use static variables to accumulate the data across all of the components in the watchlist. At that point, though, I can't figure out how I could access that data from an indicator. I would have the rule write it out to a file and then have the indicator read it back in, but the VB.Net file operations seem to be disabled in RealCode.

I'm an experienced programmer, so I can handle a complex solution. I just can't figure out any workable approach..

Thanks in advance!
Topic: Multiple looping with Indicator/Rules
Posted: Monday, February 1, 2010 12:09:05 PM

Bruce -

Of course I don't use logging in my regular scans - I was just doing that to prove the point.

I tried it again, and you are correct that it does fewer iterations on symbols after the first symbol in a watchlist. The bug does occur every time you add a symbol to the watchlist, switch to a different chart, etc.

I modified the rule as follows to make the output easier to follow: 

If Me.isFirstBar Then _
  Me.Log.Debug(Me.CurrentSymbol + " First: " + Me.CurrentDate.ToShortDateString)
If Me.isLastBar Then _
  Me.Log.Debug(Me.CurrentSymbol + " Last: " + Me.CurrentDate.ToShortDateString)
If Price.Close > 10 Then Pass

Whenever I add a symbol, change charts, etc., with the rule scanning the watchlist, StockFinder iterates through the entire price history:

OSK Last: 1/29/2010
OSK First: 10/4/1985
JCP Last: 1/29/2010
JCP First: 1/6/1984
etc.

When I apply it anew to the watchlist, it performs as you suggest:

OSK Last: 1/29/2010
OSK First: 11/20/2009
JCP Last: 1/29/2010
JCP First: 11/20/2009

That explains why I found it so noticeable. On something computationally intensive, adding a new symbol with a 15-year price history can cause a noticeable delay.

Topic: Multiple looping with Indicator/Rules
Posted: Monday, February 1, 2010 11:03:32 AM

Bruce -

Yes, I'm afraid it does, even without the '#Cumulative flag. It probably won't do it if you override Me.AutoLoop, but by default it does, even if all you do is scan the watchlist.

Here's an example rule I wrote:

Me.Log.Debug(Me.CurrentSymbol + ": " + Me.CurrentDate.ToShortDateString)
If Price.Close > 10 Then Pass

I put this on a weekly chart and scanned a watchlist that contained only one symbol, BAC. My debug log wound up with a couple of hundred messages:

BAC: 1/29/2010
BAC: 1/22/2010
BAC: 1/15/2010
...
BAC: 4/14/2006
BAC: 4/7/2006

This is using StockFinder 4.0.83.16914. If StockFinder used only 10 or so bars, it wouldn't be as massive of a performance hit.