Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

EnterLong does not exist in the current context.

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

    EnterLong does not exist in the current context.

    Hi,

    I checked the NT Help, I have tried multiple ways to deal with the syntax, I am unable to get rid of the following error: "EnterLong does not exist in the current context." Same for EnterLongStop().

    Below I replaced buyQty with an integer value (e.g. 2) and that still does not work.

    Any help is appreciated.

    private void fct_Execute(string order)
    {
    if(order=="BUY")
    {
    if(currenltyShort==false && buyToEnter==true)
    {
    EnterLong(buyQty,"");
    EnterLongStop( buyQty, stopLine);
    }
    }

    }

    - mp

    #2
    Hello marcusplexus,
    To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

    I look forward to assisting you further.

    *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Done. Please check you mail.

      Comment


        #4
        Hello marcusplexus,
        This is to confirm I have received your email and has replied to it.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Can wee see what was wrong?

          w

          Comment


            #6
            Hello wokitun,

            Thank you for your post and welcome to the NinjaTrader support forum!

            The Enter() methods were being called in an Indicator, Enter() methods can only be called in a Strategy.

            For information on the Enter() methods please visit the following link: http://www.ninjatrader.com/support/h...er_methods.htm

            Please let me know if I may be of further assistance.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            22 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            10 views
            0 likes
            Last Post cre8able  
            Working...
            X