Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
To get it to update instantly as a user enters an odd number in the dialog box you have to use Refresh() or Update() in the get/set or one of those things I've since forgotten after not programming in C# in a while I'm sure someone else can help if needed.
I used that method when I first wrote the indicator and it does change the value to even.
However it seems as if I'm missing something and there should be a way to accomplish this at user input of the incorrect number.
Like when entering a decimal value in a non-decimal field. An error occurs immediately or the value changes back to the original contents.
Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Yes. There is. I just can't think of an indicator that does it at the moment so can't post sample code, and I've forgotten how to do it exactly, and am no longer using NT.
Perhaps @bukkan can help, or @tarantino or @gomi or @fluxsmith, or any number of other excellent programmers on the site.
public int ValueToShow
{
get{return valuetoshow;}
set{valuetoshow = Math.Max(2,value); //minimum value 2
if (valuetoshow % 2 != 0) valuetoshow -= 1; } //make sure its even
//or +1 depending on what you want. for eg if you enter 15 and want the figure to be 14 then subtract it by 1 or if you want it to be 16 then add it by 1.
}