• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Quick LongLimit question

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

    Quick LongLimit question

    Hello,

    I am trying to revise this code. It seems to spaz out and sometimes works properly and sometimes it does not. If I want to change between EnterLong and LongLimit I just change out the comment. Is the LongLimit part written wrong that is causing it issues to enter properly?



    EnterLong(Convert.ToInt32(DefaultQuantity), "");
    if (bDebug) Print("Entering Long");
    //EnterLongLimit(Convert.ToInt32(DefaultQuantity),Cl ose[0] - 2 * TickSize);

    #2
    Hello JustAFish,
    Thanks for your post.

    It does not look like anything is wrong with your EnterLongLimit specifically. Can you please elaborate further on what you are seeing? Why do you say 'it is not entering properly'?
    JoshNinjaTrader Customer Service

    Comment


      #3
      Some entries are not even close to within the -2 tick for whatever reason... I had one where its entry was 5 ticks above the previous close

      Ultimately I want my LongLimit entry to be 2 ticks below the previous close

      Comment


        #4
        JustAFish,

        Is this backtesting in the Strategy Analyzer or real-time?
        JoshNinjaTrader Customer Service

        Comment


          #5
          Using the analyzer

          Comment


            #6
            JustAFish,

            There could be several different reasons for this in the Strategy Analyzer. Please take a screenshot of the chart in the Strategy Analyzer that shows this execution and a screenshot of the Strategy Performance grid showing this execution.

            To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
            Click here for instructions

            Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
            Click here for detailed instruction

            Also can you provide the conditions surrounding your order entry?
            JoshNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by nepenthean, Today, 12:36 PM
            0 responses
            3 views
            0 likes
            Last Post nepenthean  
            Started by sun0781, Yesterday, 05:02 PM
            1 response
            19 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by Emma1, Today, 12:14 PM
            0 responses
            2 views
            0 likes
            Last Post Emma1
            by Emma1
             
            Started by Hanstanz, Today, 04:44 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by Newtrader101, Today, 10:31 AM
            0 responses
            8 views
            0 likes
            Last Post Newtrader101  
            Working...
            X