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)
Use mouseclick on a bar to get the high and low of that bar
I am trying to get the high and low of a given bar that i click the mouse on. I understand using the ProcessMouseEvents and all that. But I have a hard time getting the values for the bar clicked...
I am trying various ways, but with no luck. .. Sometimes I am getting vBarsAgo as a number less than 0, so I am not sure what I am doing wrong, or how I should approach the problem..
Here is rough pseudo sample code
Can you help answer these questions from other members on NexusFi?
I am trying to get the high and low of a given bar that i click the mouse on. I understand using the ProcessMouseEvents and all that. But I have a hard time getting the values for the bar clicked...
I am trying various ways, but with no luck. .. Sometimes I am getting vBarsAgo as a number less than 0, so I am not sure what I am doing wrong, or how I should approach the problem..
Here is rough pseudo sample code
if MouseClickShiftPressed then begin
vClickBarNbr = MouseClickBarNumber;
//vLastBar = currentbar;
vLastBar = barnumber;
vBarsAgo = vLastBar-vClickBarNbr ;
if vBarsAgo >= 0 then begin
vClickBarHigh = high[vBarsAgo];
vClickBarLow = low[vBarsAgo];
print ("high = " + NumToStr(vclickBarHigh,2) + " Low = " + NumToStr(vclickBarLow,2));
end
else begin
print ("bar= " + NumToStr(vBarsAgo,0) + " Low = " + NumToStr(vclickBarLow,2));
end;