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

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:	302
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


      #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:	302
Size:	56.3 KB
ID:	1151650


      How was it, could you share it?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by MarianApalaghiei, Today, 10:49 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by love2code2trade, Yesterday, 01:45 PM
      4 responses
      28 views
      0 likes
      Last Post love2code2trade  
      Started by funk10101, Today, 09:43 PM
      0 responses
      8 views
      0 likes
      Last Post funk10101  
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      37 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      46 views
      0 likes
      Last Post bill2023  
      Working...
      X