• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot find custom strategy in NT8

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

    Cannot find custom strategy in NT8

    Hi there,

    Just started trying NT8. Migrated a custom strategy from NT7 and compiled without any errors. When trying to add it to charts, I cannot find it in the list, only built in ones there. Did I miss anything here?

    Thanks,
    Gary

    #2
    All 3 names need to be the same.

    The filename, "MyCustomStrategy"

    This: public class MyCustomStrategy : Strategy

    And This:

    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Strategy here.";
    Name = "MyCustomStrategy";
    Last edited by sledge; 02-12-2016, 10:41 PM. Reason: fixed typo

    Comment


      #3
      Thank you for quick response. I did miss this:

      Description = @"Enter the description for your new custom Strategy here.";
      Name = "MyCustomStraddtegy";

      But it's still not working after adding it. Again, I converted it from NT7 by fixing all the compiling errors, is there anything I need to do when converting from 7 to 8?

      Comment


        #4
        I have no idea how simple or complicated your strategy is - but there is a lot to change.

        You might check this out - probably closet thing to a converter.

        http://ninjatrader.com/support/forum...onvert+nt7+nt8

        Comment


          #5
          Tried to debug a little bit, so looks like I cannot have if-else inside
          if (State == State.SetDefaults){

          }

          Any suggestions?

          Comment


            #6
            Never mind, I fixed it by adding if-else to if (State == State.Configure){}. Thank you for the help.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jrobin747, Today, 02:37 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by Gav_G, Today, 01:23 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by webus, Today, 01:05 PM
            2 responses
            19 views
            0 likes
            Last Post webus
            by webus
             
            Started by Wick Wrangler, Today, 12:42 AM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by pman777, 04-15-2020, 05:09 AM
            5 responses
            48 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X