Use mouseclick on a bar to get the high and low of that bar - EasyLanguage Programming | futures io social day trading
futures io futures trading


Use mouseclick on a bar to get the high and low of that bar
Updated: Views / Replies:816 / 4
Created: by KhaosTrader Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Use mouseclick on a bar to get the high and low of that bar

  #1 (permalink)
Elite Member
San Jose
 
Futures Experience: Intermediate
Platform: NinjaTrader, Esignal
Favorite Futures: Stocks
 
Posts: 107 since Jan 2012
Thanks: 40 given, 21 received

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

 
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;

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received



KhaosTrader View Post
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

 
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;

Why don't you try to get the bar by time, you should be able to get e.X as time pretty easily...


vvhg

Hic Rhodos, hic salta.
Reply With Quote
 
  #4 (permalink)
Trading for Fun
London
 
Futures Experience: None
Platform: mc, TS, ninja
Favorite Futures: es
 
Bimi's Avatar
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received


KhaosTrader View Post
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

 
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;

you are using a non-standard bar chart.

Reply With Quote
 
  #5 (permalink)
Elite Member
San Jose
 
Futures Experience: Intermediate
Platform: NinjaTrader, Esignal
Favorite Futures: Stocks
 
Posts: 107 since Jan 2012
Thanks: 40 given, 21 received

standard chart. I use candlestick standard.

Reply With Quote

Reply



futures io > > > > > Use mouseclick on a bar to get the high and low of that bar

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 05:49 PM
Disply High and Low of each bar ahwii NinjaTrader 6 December 18th, 2011 05:48 PM
Historical high/low data for advanced bar types RM99 Commodities Futures Trading 9 June 21st, 2011 09:53 AM
can you help with code, would like to paint low volume bar black anniebee321 NinjaTrader 4 December 19th, 2010 04:58 AM
3 bar high/low entry maintain active order until 3 bar high/low in opposite direction mrticks NinjaTrader Programming 8 November 13th, 2009 08:44 PM


All times are GMT -4. The time now is 12:51 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-11 in 0.08 seconds with 19 queries on phoenix via your IP 107.20.115.174