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 Object Serialization

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

    Drawing Object Serialization

    Is there any sample code available for serializing and deserializing drawing objects?

    I've lost technical analysis drawings so often now that I no longer do them in Ninjatrader I use TradingView for it.

    As soon as you close a chart its gone - unless you have the sense to quit Ninjatrader without saving your workspace. Its a crazy way to do things has resulted in a lot of lost/repeated work for me. Imagine if Microsoft Word had no save function, and you had to make sure the document was permanently left open or you lost your work. It is mental.

    It shouldn't be too hard for me to write a simple addon, that has a Save/Load button, that reads all the draw objects from the chart, serializes them to a file and loads them back.

    Is there any sample code/schemas available for serialization?

    #2
    BTW I don't mean to be critical. Ninjatrader is working great now; it is finally stable and a lot faster. But this is one feature that causes pain - it could be massively improved, and it wouldn't take me too much work I don't think.

    Comment


      #3
      Hello reach4thelasers,

      Thank you for your post.

      NinjaTrader should save your drawing objects on the chart when you save the workspace. Please make sure to save the workspace on exit as not saving the workspace results in the drawing objects added since the save being removed.

      If you are saving the workspace and exiting and still the drawing objects are removed then please send us your log and trace files as this is indicative of something being fundamentally incorrect.

      You can send your log and trace files by going to the Control Center-> Help-> Mail to Platform Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default. Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

      Please let me know if you have any questions.

      Comment


        #4
        Hey Patrick, thanks for responding. Yeah it works as you describe. Its just that I need to permanently keep all my charts open. Like for TA on the weekly chart I don't need to look at it very often, but If I close the chart window and save the workspace I've permanently lost all the drawings on that chart.

        I know I can have different workspaces, but I never know what chart is in which workspace things get super cluttered or slows down so I close things and lose it.

        Another thing that happens is, maybe I've done technical analysis on a Daily chart. Then I switch the chart window to a 5 minute or a different instrument, then I get busy with some other stuff or go for lunch etc. then I forget that the drawings I did are linked to that chart window and accidentally close it, and lose everything.

        The way its designed, I need to remember exactly what drawings are linked to what window and be super careful not to close it - even though I might have switched the chart to a different instrument or timeframe so they are not visible. Its real easy to forget what drawings are on what window.

        I would like to make an addon that lets me save sets of drawings so that I can load up a blank chart window and load the drawings into that window.

        Comment


          #5
          Hello reach4thelasers,

          Thank you for your response.

          So an ideal solution for you here would be a template that you could save your drawing objects to and then apply them to another chart, correct?

          I look forward to your response.

          Comment


            #6
            Yeah that's the sort of thing I had in mind.

            Comment


              #7
              Hey Patrick did you have any info about drawing de/serialisation. I never heard back.

              Comment


                #8
                Hello reach4thelasers,

                Thank you for your note.

                The internal tracking number for your feature request is SFT-2602. Please reference this internal tracking number if you ever have questions regarding this feature request.

                Comment


                  #9
                  Hey Patrick.

                  Thanks for submitting a request. I wasn't intending to ask for a feature request though I was looking for some technical support on how to serialize and de-serialize drawing objects in code.

                  As I said before in my original post I don't think it would be too difficult to make an Addon that does this and I have time for a bit of Ninjatrader coding at the moment so wanted to give it a try.

                  Comment


                    #10
                    Hello reach4thelasers,
                    Thanks for requesting this feature. If you have completed an Add-on for serializing and deserializing drawing objects, would you post it for public sharing? I am sure many NT users would appreciate it.

                    As you said, NT8 has become much more stable but it still cannot recover from crashes gracefully. I have lost count of how many times I have to redraw and relabel the charts, especially the setting up of multiple chart tabs. During the cycle of indicator development, the only way to recover from a crash is to delete the workspace, after which, all drawings and text on the charts are gone. One time I have to completely remove the subfolder " NinjaTrader 8" and reinstall to recover functionality, after which, I have to start all customizing again.

                    Comment


                      #11
                      Hey there kkc2015.

                      No I didn't get any info about it. You'll notice Patrick ignored my request which is pretty typical of late.

                      I'm not sure what happened, Ninjatrader's support used to be first rate; however something changed this summer and it now SUCKS - bigtime. Not sure what the change was or why, but they don't try to help people as much as they used to.

                      Its pretty crappy to be honest, because I have spent a HUGE amount of time helping them fix their Bugs and performance problems, so the fact they can't even be bothered to address my query now I frankly find pretty insulting.

                      Comment


                        #12
                        Hello reach4thelasers,

                        Thank you for your feedback on the matter.

                        Can you please detail what you are looking for here that I overlooked previously?

                        I look forward to your response.

                        Comment


                          #13
                          It was both the first sentence, and the last sentence of my post, Patrick!


                          Is there any sample code available for serializing and deserializing drawing objects?


                          And I repeated it again in a later post:


                          I wasn't intending to ask for a feature request though I was looking for some technical support on how to serialize and de-serialize drawing objects in code.
                          Last edited by reach4thelasers; 09-18-2017, 07:17 AM.

                          Comment


                            #14
                            Hello reach4thelasers,

                            Thank you for your response.

                            We would not have an example of serializing Drawing Objects through a custom add on. If you wish to take on this endeavor yourself I would recommend referring to the MSDN documentation: https://docs.microsoft.com/en-us/dot...serialization/

                            If you are requesting a sample from platform support directly please keep in mind we do not provide programming services.

                            Please let me know if you have any questions.

                            Comment


                              #15
                              Patrick,

                              I don't require support on Serialization - done that quite a few times in my career.

                              There's more to it, such as linking the object to a RenderContext and actually getting it displayed on the chart.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by prdecast, Today, 06:07 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post prdecast  
                              Started by i019945nj, 12-14-2023, 06:41 AM
                              3 responses
                              60 views
                              0 likes
                              Last Post i019945nj  
                              Started by TraderBCL, Today, 04:38 AM
                              2 responses
                              17 views
                              0 likes
                              Last Post TraderBCL  
                              Started by martin70, 03-24-2023, 04:58 AM
                              14 responses
                              106 views
                              0 likes
                              Last Post martin70  
                              Started by Radano, 06-10-2021, 01:40 AM
                              19 responses
                              610 views
                              0 likes
                              Last Post Radano
                              by Radano
                               
                              Working...
                              X