Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add code to default generated strategy script NT8

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

    Add code to default generated strategy script NT8

    Hello,
    I'm wondering if it's possible to add code to the strategy script that is generated by the wizard
    due to the fact that i'm always using the same variables and methods in my strategy code.
    Any suggestions?
    How ever, I can remember there was a class in NT7 were we could put methods that got included into the script...
    All the best

    #2
    Hello fernlicht,

    Thanks for your post.

    It is not possible to bring a script back into the Strategy Builder once unlocked, but you could consider making a copy of your strategy that is unlocked and a version that is unlocked. With the locked version, you can click View Code to see the generated code and then copy it into the unlocked version.

    A copy of the strategy can be made in the Strategy Builder under Welcome. Simply place your mouse over the existing strategy and click "Save As."

    The NinjaScript Editor tutorial can give some insight on working with the NinjaScript Editor and working with unclocked code.

    NinjaScript Editor 401 (publicly available training video) - https://www.youtube.com/watch?v=BA0W4ECyVdc

    Live Webinar - https://ninjatrader.com/Webinar/NinjaScript-Editor-401

    We look forward to assisting.

    Comment


      #3
      Ok thanks, I'm performing such a workaround already. I thought maybe it is possibe to maipulate the text that is used to generate the code
      before acutally generating. But it seems it is not exposed. Anyways thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      64 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X