• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about reporting data based on where you click on a chart?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about reporting data based on where you click on a chart?

    Hello.

    I am wondering if anyone has created an indicator at some point, that would output information either to the chart, or to the output window based on a location/bar that you click on? Obviously this would likely be behavior supported by NT, so asking those that may know.

    For example, obviously you could get this info with the middle mouse button, but this is just for illustrative purposes... but say you wanted an indie that once loaded onto the chart, woudl simply output the High price of a bar when you clicked on it... and either plot that to output window, or to the chart... How would you go about doing this?

    Essentially, reporting some conditions you create, based on click functionality?

    Just looking for the general idea of how this could be accomplished?
    Last edited by forrestang; 04-16-2017, 02:21 PM.

    #2
    Hello forrestang,

    This would not be supported for NinjaTrader 7 but it is possible.
    There is an indicator that has unsupported code that gets the mouse x and y.
    http://ninjatrader.com/support/forum...php?linkid=626

    There is an example of this for NinjaTrader 8 that uses supported/documented methods.
    http://ninjatrader.com/support/forum...684#post499684
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      So the general idea seems to be...

      First I need to acquire the cursor X and Y position?

      Next I would need to know when the button is pressed, and capture that X and Y position?

      Possibly an On/Off switch also to enable/disable this feature so normal chart functionalities can resume?

      Hmmm...

      Comment


        #4
        Hello forrestang,

        The steps would be to

        Add an event handler to the mouse button click event

        Capture the mouse x and y position

        Use this to choose a bar

        Display the information for that bar
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Vincere, Today, 04:38 AM
        0 responses
        2 views
        0 likes
        Last Post Vincere
        by Vincere
         
        Started by trader_rick, Today, 04:02 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by percma, Today, 02:51 AM
        0 responses
        5 views
        0 likes
        Last Post percma
        by percma
         
        Started by Abilene, Today, 01:27 AM
        0 responses
        15 views
        0 likes
        Last Post Abilene
        by Abilene
         
        Started by simjs, Yesterday, 08:11 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Working...
        X