Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing Tool - Anchor Lines won't move

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

    Drawing Tool - Anchor Lines won't move

    Hi there, I'm trying to make a modified version of the RiskReward drawing tool that displays multiple Reward Levels. It's working but has taken me weeks, to figure out how to get it working properly, and I have one small problem.

    When I drag the anchor lines, the one between the Entry and Risk movies the drawing tool. But the anchor lines between the targets don't. I'm not sure where the code is that affects this. Can you assist me with pointing out the code in the Risk Reward tool that makes the drawing tool move when the anchor line is clicked please?

    I've attached a screenshot that shows the problem. The one on top is the original RR tool and the one on bottom is my modified version. Both anchor lines move the original tool but only the bottom one moves the drawing on my new version.

    Ninjatrader's educational resources and documentation are exceptional for Addons, Indicators and Strategies, but unfortunately non-existent for the intricacies of drawing tools aside from a simple API Spec. By way of feedback, it would be great if these resources could be improved for drawing tools as I found it very challenging to make this drawing tool, even with the original Risk Reward tool as a starting point.

    Thanks in advance for the support.



    Click image for larger version

Name:	image_2021-04-15_083844.png
Views:	375
Size:	56.3 KB
ID:	1151650




    #2
    Hello kevinenergy,

    Thanks for the post.

    From the given details it would be pretty difficult to know what may be causing the difference in your script. You will very likely need to add some prints into the scripts mouse handling events to better understand what difference is happening. The mouse interaction is controlled by the various mouse overrides in the drawing tool. As I don't know what changes you made to the tool it may be best to try and use a DIFF tool online to highlight the specific changes you made. That could help to track down where your new logic starts and how it differs from the original tool.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Originally posted by kevinenergy View Post
      Hi there, I'm trying to make a modified version of the RiskReward drawing tool that displays multiple Reward Levels. It's working but has taken me weeks, to figure out how to get it working properly, and I have one small problem.

      When I drag the anchor lines, the one between the Entry and Risk movies the drawing tool. But the anchor lines between the targets don't. I'm not sure where the code is that affects this. Can you assist me with pointing out the code in the Risk Reward tool that makes the drawing tool move when the anchor line is clicked please?

      I've attached a screenshot that shows the problem. The one on top is the original RR tool and the one on bottom is my modified version. Both anchor lines move the original tool but only the bottom one moves the drawing on my new version.

      Ninjatrader's educational resources and documentation are exceptional for Addons, Indicators and Strategies, but unfortunately non-existent for the intricacies of drawing tools aside from a simple API Spec. By way of feedback, it would be great if these resources could be improved for drawing tools as I found it very challenging to make this drawing tool, even with the original Risk Reward tool as a starting point.

      Thanks in advance for the support.



      Click image for larger version

Name:	image_2021-04-15_083844.png
Views:	375
Size:	56.3 KB
ID:	1151650


      How was it, could you share it?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X