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:	33
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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Realsmooth3, Yesterday, 09:10 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by wooofad, 06-15-2020, 01:08 PM
    8 responses
    93 views
    0 likes
    Last Post echoxray  
    Started by bubblegum, Today, 12:00 AM
    0 responses
    2 views
    0 likes
    Last Post bubblegum  
    Started by eseorvuda, Yesterday, 10:28 PM
    0 responses
    2 views
    0 likes
    Last Post eseorvuda  
    Started by ctrent, Yesterday, 09:58 PM
    0 responses
    5 views
    0 likes
    Last Post ctrent
    by ctrent
     
    Working...
    X