Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using EnterLongStopLimit in a class NT8

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

    Using EnterLongStopLimit in a class NT8

    Hello together,
    need some help...

    I am playing with NT8 and I would like to prepare my orders inside a class. My problem is finding the NT8 class, which I have to use for that.

    I defined the Order object:
    private Order Order = new Order();

    and I am able to do:
    Order entryOrder = null;

    But next line doesn´t work:
    entryOrder = EnterLongStopLimit(....);

    --->> failure message CS0103 -> Name EnterLongStopLimit not available in this context.

    Thanks for your help!
    uupsa

    #2
    Hello uupsa,

    Your custom class will not contain a definition for the EnterLongStopLimit() method, hence why you are getting the CS0103 error.

    The Strategy class contains the definition of EnterLongStopLimit().

    You would need to pass the strategy instance to your custom class' method.

    Example:
    Code:
    public class CustomClass
    {
         public void SubmitOrder(Strategy strategy)
         {
              strategy.EnterLongStopLimit(....);
         }
    }
    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      It works, thanks for your help!
      uupsa

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      158 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      78 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X