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 CommonWhale, Today, 09:55 AM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by Gerik, Today, 09:40 AM
            2 responses
            7 views
            0 likes
            Last Post Gerik
            by Gerik
             
            Started by RookieTrader, Today, 09:37 AM
            2 responses
            11 views
            0 likes
            Last Post RookieTrader  
            Started by alifarahani, Today, 09:40 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by KennyK, 05-29-2017, 02:02 AM
            3 responses
            1,285 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Working...
            X