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 NullPointStrategies, Today, 05:17 AM
      0 responses
      41 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X