RangeBoundINt32
Author: dansmo
Creation Date: 11/2/2010 8:52 AM
profile picture

dansmo

#1
Hi,

in an attempt to build an indicator, I tumbled over this piece of code in the source of Community.Indicators:
CODE:
Please log in to see this code.


I am interestet in the RangeBound function. I thougth that this would disable the user to input values > 300. However I can enter 310 and have the indicator plotted to the chart. How can prevent the user from using greater values than 300?
profile picture

Eugene

#2
Hi,

Answer: in the constructor of your DataSeries, manually introducing logic that would prevent calculations based on entered value should work fine. You can't entirely stop the user from entering a value above the upper range of RangeBoundIt32, but Wealth-Lab will warn the user that doing this might be against the indicator's design.
profile picture

dansmo

#3
Okay, then it should warn me when I enter a value > 300 in the Beta indicator, but it does not.
profile picture

Cone

#4
The warning comes from a manual slider entry that's out of range. It's not going to warn if someone enters a parameter in the code, but you can do your own check in the code for that.
profile picture

dansmo

#5
Good. Did it directly in the code with a messagebox.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).