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

How to reload script source, modified in external editor ?

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

    How to reload script source, modified in external editor ?

    Some times ago I edit scripts in external editor (VS or UltraEditor), save code modified in this external editor and when I returned to the same code(file) opened in NinjaScriptEditor, the NinjaScriptEditor internaly determinate that the file was modified and ask me to reload new fresh source code. After reloading I simply press F5 and obtain new version of my script edited in external editor. This was a great feature! But now (in NT 7.0.1008 or in my Windows 7) something happened and NinjaScriptEditor no more see external modifications of source code, modified out of it Where I am wrong? What I need to do to return this feature?
    Last edited by zencoder; 01-02-2012, 08:47 AM.

    #2
    I do all my coding in VS, here's the process that works for me.

    I have a file called __Compile (underscore to keep it at the top of the list) that has just this code in it.

    namespace
    NinjaTrader.Custom.Indicator
    {
    class __Compile
    {
    }

    }
    I keep that file open in an NT Editor window and use it just for compiling.
    Then I open the file I want to modify (or one of my template files I created with the wizard) in the NT Editor, and right-click "save as" and give it the new name. That allows the Ninjascript to rename/modify all the NinjaScript generated code at the bottom, then I compile it once in the NT Editor and then close it. Then open it and make all the modifications in VS and save the file in VS, then just f5 the __Compile file that I keep open in the NT Editor, and the changes you made in VS get compiled into the NinjaTrader.Custom.dll file and can be used by reloading NinjaScript in the chart.

    I actually do things a touch different, and I posted about it on the forums, but I've got to look and find it. But that method should work.

    Hope that helps.

    VT

    Comment


      #3
      Originally posted by VTtrader View Post
      I do all my coding in VS, here's the process that works for me.

      I have a file called __Compile...
      Thanks a lot!!! Nice Idea) But I ask about system (as it seems to me) feature. If I open file in UltraEdit and in VS and then modify and save it in VS, and then, when switching to UE, the last one determinate file modification and ask me to reload it (so - it works). But the same file opened in NSE leaved untouched (so - problem in NSE). I hope it can be solved someway...
      Last edited by zencoder; 01-02-2012, 11:10 AM.

      Comment


        #4
        Hello,

        Thanks for the note.

        There have been no changes to the NT code editor in releases. Not sure what would be different there in the operating system not to force the reload. No real idea's either other then make sure that the file is saved and it overwrites the file in questions and then you toggle the file to open it again in NinjaTrader.

        -Brett

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        20 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Working...
        X