Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator to show a line @ x ticks away from current mouse?

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

    Indicator to show a line @ x ticks away from current mouse?

    A simple small thin line above and below mousepointer x number of ticks away from current mousepointer possible (preferrably with x offset option)?

    I would then use authotkey (findtext) to move to this line (correct tick) to place order.

    (If not possible, could make indicator to show certain color at a location on chart or similar (fixed spot) depending if half/whole or 25/75 point?)

    Thanks!

    #2
    Hello johntraderuser2,

    That is certainly possible however I don't know of an existing item like that. There is a sample of tracking the cursor and drawing on the chart in the forum post linked below. That would be a good starting point if you wanted to create this item yourself.

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello johntraderuser2,

      That is certainly possible however I don't know of an existing item like that. There is a sample of tracking the cursor and drawing on the chart in the forum post linked below. That would be a good starting point if you wanted to create this item yourself.

      https://forum.ninjatrader.com/forum/...868#post820868
      found a post someone asking the same thing

      from post:
      Thank you Heart! Do you know if it's possible to create a script which will draw a short horizontal line on the cursor a set number of ticks above and below the center? I am familiar with scripting on other platforms but sadly not Ninjascript.
      if possible also draw the short lines with separate certain ticks away from mousepointer with offset function to right and on and off function aswell as 2 different shortcuts one for long and short

      if anyone has a solution please let us know

      Comment


        #4
        Hello johntraderuser2,

        The link that I had provided would be a good starting point for that type of task, you would need to track the cursor and use OnRender in order to draw based on the mouse pointer. Unfortunately I am not aware of something pre made, you can either work on creating the item yourself or you can also contact a professional NinjaScript Consultant who would be eager to assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team to follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one-on-one educational/debugging services.

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello johntraderuser2,

          The link that I had provided would be a good starting point for that type of task, you would need to track the cursor and use OnRender in order to draw based on the mouse pointer. Unfortunately I am not aware of something pre made, you can either work on creating the item yourself or you can also contact a professional NinjaScript Consultant who would be eager to assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team to follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one-on-one educational/debugging services.
          I have a question regarding this. Would it be possible to have a drawing/indicator consisting of 2 shorter horizontal lines drawn on the chart, then another one on another location in the same chart, then have orders executed from the lines in first location then moving (not cancel enable at the other location but moving orders) the active orders to the other 2 lines. The lines are not attached in any way. Possible and if so how does one accomplish this - what functions need to be there and so on?
          Last edited by johntraderuser2; 11-22-2024, 07:17 AM.

          Comment


            #6
            Hello johntraderuser2,

            Are you asking about using multiple indicators? Unfortunately the description is a little hard to understand as written.

            You can execute orders and control them based on price movement, you would do that separate from drawing lines. The lines on the chart are simply visual representations of the data you are working with behind the scenes in your code.

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello johntraderuser2,

              Are you asking about using multiple indicators? Unfortunately the description is a little hard to understand as written.

              You can execute orders and control them based on price movement, you would do that separate from drawing lines. The lines on the chart are simply visual representations of the data you are working with behind the scenes in your code.
              Yes multiple of these indicators/drawings and take trades from them using hotkeys (placed in the chart with mouse). So if the function is having 2 active orders from the 2 lines in first indicator, the q is could I move the already working orders at the indicators lines to another indicator lines if they are separate from each other, and if so how, what function needs to be there and so on?

              Comment


                #8
                Hello johntraderuser2,

                You would have to implement keyboard command handing into each individual indicator to be able to handle key presses. It wouldn't matter what a different indicator was doing, the key handling would only apply to that single instance of the indicator at a time. The visuals would still just be representations of some data you are using in the script so that variable for the data could be reused for order submission.

                Comment


                  #9
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello johntraderuser2,

                  You would have to implement keyboard command handing into each individual indicator to be able to handle key presses. It wouldn't matter what a different indicator was doing, the key handling would only apply to that single instance of the indicator at a time. The visuals would still just be representations of some data you are using in the script so that variable for the data could be reused for order submission.
                  Okey so not possible to move active orders between them (the different indicators) then?

                  Comment


                    #10
                    Hello johntraderuser2,

                    That is correct, you would need to manage the order from the indicator that is getting the keyboard input.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    599 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    344 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    103 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    558 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    557 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X