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.

        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 cmtjoancolmenero, Yesterday, 03:58 PM
            6 responses
            28 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by gbourque, Today, 06:39 AM
            2 responses
            14 views
            0 likes
            Last Post gbourque  
            Started by rexsole, Today, 08:39 AM
            1 response
            6 views
            0 likes
            Last Post bltdavid  
            Started by trilliantrader, Yesterday, 03:01 PM
            3 responses
            31 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by Brevo, Today, 01:45 AM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X