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: john99m
About
User Name: john99m
Groups: Gold User, Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Wednesday, June 25, 2008
Last Visit: Friday, July 9, 2010 12:57:36 PM
Number of Posts: 4
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Indicator speed improvement using "islastbar"?
Posted: Friday, July 9, 2010 12:57:34 PM
Thanks.

By the way, I tried eliminating the #Cumulative statement.  Now, however, my watchlist  columns (based on rules developed from the indicators) no longer display any colors.

I had to add the #Cumulative statement back in to fix this
Topic: Indicator speed improvement using "islastbar"?
Posted: Thursday, July 8, 2010 9:40:51 PM

The following indicator attempts to determine just a single final number from any price chart (rather than a full bar-length curve).

It just tells me where the 200day moving average is right now on today's bar (as a percentage of the high and low for the past year).

QUESTION:  Is the speed of this routine improved by putting the formula inside the "islastbar" statement the way I have done?   As I understand it, this indicator is called once for every bar in the chart.  (So I figured the "islastbar" if-statement would cause the formula to be calculated only once rather than for every bar in the chart.) 
(My layout has several similar realcode indicators in it, and although it works, it's rather slow.  When I added the if statement to each indicator, I didn't seem to get any noticeable improvement.)

Dim hi1yr As Single, lo1yr As Single
'# Cumulative
'# MA200 = chart.MovingAverage

If islastbar Then
            hi1yr = MA200.MaxHigh(300)
            lo1yr = MA200.MinLow(300)
            plot = (MA200.value - lo1yr) / (hi1yr - lo1yr)
End If

Topic: The value in an indicator disagrees with its dragged-watchlist column value
Posted: Wednesday, January 20, 2010 7:02:22 PM
Bruce, this works like a charm!  Thanks
Topic: The value in an indicator disagrees with its dragged-watchlist column value
Posted: Wednesday, January 20, 2010 1:35:01 PM

Hi, I'm trying to screen stocks based on their highs and lows during different time frames.  I have created two indicators, one in a day-chart and one in a 15 min chart.  Each chart has its own copy of the following indicator:

Dim hi As Single, lo As Single
hi = Price.MaxHigh(Price.count - 1)
lo = Price.MinLow(Price.count - 1)
plot = (price.Close - lo) / (hi - lo)

I have then dragged each indicator to the watchlist to create sortable columns.  THE PROBLEM: the numbers in the indicators don't agree with the numbers in the coumns.  (Example:  for stock LUV, the indicators read 0.36 and 0.20 respectively, while the column numbers say 0.46 and 0.90).  Doing my own analysis, it looks like the indicator numbers are correct, the  0.36 and 0.20.
I can't figure out how to include the layout or a screenshot in this submittal.