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 |

RealCode indicator value displays as 0.00 when added as watch list column Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tadglines
Posted : Saturday, August 7, 2010 1:04:36 PM
Registered User
Joined: 12/20/2004
Posts: 3
I've created a RealCode indicator that displays the percent of current price as compared to 5 year high. The real Code is: "plot = (Price.close / Price.MaxClose(IndexForDate(CurrentDate.AddYears(-5)))) * 100"

The indicator plots fine in the chart. However when I try to add it as a column in the watchlist (so I can sort on it), the value displayed is 0.00. The way I added it as a column was to right click on the indicator, select "Create Watchlist Column" and then click on "Data". When I changed the display value from "Last Value" to "Mini-Chart"  the chart displays but appears to be vertically inverted.

If I add the watchlist column via the (+) and select my indicator, the value is still displayed as 0.00 and when I switch to Mini-Chart, the chart is blank.

This is using StockFinder 5 (5.0.34.27403).

Thanks,
-Tad
jas0501
Posted : Saturday, August 7, 2010 1:52:28 PM
Registered User
Joined: 12/31/2005
Posts: 2,499
Try adding

'# cumulative

as 5 years worth of bars are needed to calculate the value.

Also instead of multiplying by 100 you can change the display format from 0.00 to 0.00% or 0.000% or whatever precision you like.
tadglines
Posted : Saturday, August 7, 2010 2:30:44 PM
Registered User
Joined: 12/20/2004
Posts: 3
Thanks, That fixed it.

BTW, Where's the reference for things like "'# cumulative"?
It's not documented in (http://www.stockfinder.com/realcodeapi/) and while it's mentioned in (http://www.worden.com/documentation/stockfinder/Realcode%20programmers%20reference.pdf) there doesn't appear to be any reference for those kinds of values.
jas0501
Posted : Saturday, August 7, 2010 3:09:26 PM
Registered User
Joined: 12/31/2005
Posts: 2,499
It would be better if StockFinder added some intelegence to detect the data span needed by the indicator and set the bars used in column calculations.


'# Cumulative

is heavy handed and requires all data to be used. If the last value only need 100 bars then the performance will suffer. If Stockfinder detects that span of data uses and set it to 100. then 5000 vs 100 would be a vast performance improvement.

There is another undocumented directive, (I can't recall what it is, maxbars maybe) for setting the number of bars, so 5 years of data would be using something like 1260+, (5*252), bars and would be about 4x faster than using 5000.


Users browsing this topic
Guest-1

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.