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 Belfortbucks, Today, 09:29 PM
      0 responses
      3 views
      0 likes
      Last Post Belfortbucks  
      Started by zstheorist, Today, 07:52 PM
      0 responses
      7 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      150 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Working...
      X