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 rhyminkevin, Today, 04:58 PM
      4 responses
      52 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Started by iceman2018, Today, 05:07 PM
      0 responses
      5 views
      0 likes
      Last Post iceman2018  
      Started by lightsun47, Today, 03:51 PM
      0 responses
      7 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      14 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      50 views
      0 likes
      Last Post futtrader  
      Working...
      X