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 Tools Development

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

  • TAJTrades
    replied
    Originally posted by NinjaTrader_Jesse View Post
    in reference to ticket 1745513. .
    I sent a follow up email. I have solved one of the issue but the second still remains a mystery to me.

    Thanks for your help.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Yes, you can send an email to our platform support [at] ninjatrader.com in reference to ticket 1745513.

    I look forward to being of further assistance.

    Leave a comment:


  • TAJTrades
    replied
    Can I send you an email with a Jing Video that more accurately shows the situation? If so what email address?

    Leave a comment:


  • TAJTrades
    replied
    Originally posted by NinjaTrader_Jesse View Post
    Regarding The name 'DrawObjects' does not exist in the current context. The DrawObjects collection would only relate to an Indicator, this would not be used in a Drawing Object specifically.
    Thanks for the confirmation. This weekend I will load the DrawTool with Output Statments to follow the flow of when State Change occurs and when the Object Editing occurs. And get back with you.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the post.

    I wanted to check, you said that you created a drawing tool that writes an XML file. Can the tool not use its OnStateChange and State.Terminated to also remove the XML file it created? Perhaps I am not fully understanding your first question, could you provide some clarification on what you had tried in the tool its self?

    Regarding The name 'DrawObjects' does not exist in the current context. The DrawObjects collection would only relate to an Indicator, this would not be used in a Drawing Object specifically.

    I look forward to being of further assistance.

    Leave a comment:


  • TAJTrades
    started a topic Drawing Tools Development

    Drawing Tools Development

    I created a custom drawing tool and when the draw is completed or modified it writes some specific data to an XML file. That all appears to be working.

    But the problem I ran into happens when the draw object is deleted. When it is deleted I also need to delete the XML data file associated with it. As best I can tell there is no supported way of knowing when a draw object has been deleted. If there is please enlighten me. Also I have not been able to determine what Button was clicked in the Draw Object Edit Window. Is that something that is supported?

    So as a work around I thought of creating a list of the XML file names and compare it to a list of "DrawObjects".Tag. But NT does not agree.

    I was using this code in State=State.Terminated since it is called when the following Events happen:
    1) Keyboard Delete Key is Pressed
    2) Draw Object Edit Window Cancel Button is Clicked
    3) Draw Object Edit Window Apply Button is Clicked
    4) Draw Object Edit Window OK Button is Clicked

    The following code throws error: "The name 'DrawObjects' does not exist in the current context".
    PHP Code:
    foreach(DrawingTool draw in DrawObjects)
    {
          if(
    draw is DrawingTools.MyCustomDrawTool)
          {
            
    NinjaTrader.Code.Output.Process(string.Format("tag  {0}"draw.Tag), PrintTo.OutputTab1); 
    So the question is: Are we not allowed to use that code in a DrawingTool? If we can then what is the correct context? I do not understand what the error means.

    I am open to any suggestions on determining when a Draw Object is Deleted.

    Thanks.

Latest Posts

Collapse

Topics Statistics Last Post
Started by jxs_xrj, 01-12-2020, 09:49 AM
6 responses
3,290 views
1 like
Last Post jgualdronc  
Started by Touch-Ups, Today, 10:36 AM
0 responses
8 views
0 likes
Last Post Touch-Ups  
Started by geddyisodin, 04-25-2024, 05:20 AM
8 responses
61 views
0 likes
Last Post NinjaTrader_Gaby  
Started by Option Whisperer, Today, 09:55 AM
0 responses
8 views
0 likes
Last Post Option Whisperer  
Started by halgo_boulder, 04-20-2024, 08:44 AM
2 responses
24 views
0 likes
Last Post halgo_boulder  
Working...
X