Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.


    There is an example of this for NinjaTrader 8 that uses supported/documented methods.
    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 Radano, 06-10-2021, 01:40 AM
        19 responses
        605 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        4 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by aa731, Today, 02:54 AM
        0 responses
        5 views
        0 likes
        Last Post aa731
        by aa731
         
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        11 views
        0 likes
        Last Post Christopher_R  
        Working...
        X