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 AaronKoRn, Today, 09:49 PM
      0 responses
      7 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Today, 08:42 PM
      0 responses
      9 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      10 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,978 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X