Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I unlocked my strategy to modify code. Now how do I lock it back?

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

    I unlocked my strategy to modify code. Now how do I lock it back?

    Well, I just wrote my first strategy from a 3rd party indicator and it works but need some tweaks.

    I wanted to add some time constraints but couldn't figure it out in the builder, so I unlocked the code. Later, I found out once a strategy is Unlocked, the Strategy Builder can no longer be used for it. I got the trade times worked out and then I decided to create some more user input parameters to change the trade times from the strategy window. Well, the compiler doesn't like that, but the builder would add the parameters if it was available. Which it isn't.

    My dilemma now is two-fold. How can I insert more user user input parameters into the code and re-lock the strategy and use the builder.

    Sounds reasonable right? But once unlocked never locked again?

    Got any ideas?

    Drew


    #2
    Hello ajadams,

    The Strategy Builder must keep the strategy locked to to prevent any manual editing. Once the strategy is unlocked and manually edited the strategy builder is no longer able to open the script and the script can no longer be opened by the Strategy Builder.

    This is detailed in the NinjaScript Editor 401 course which I am including a public link to below.


    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    116 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    61 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    40 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    44 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X