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

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'?
    Josh G.NinjaTrader 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?
        Josh G.NinjaTrader 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?
            Josh G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            603 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            23 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            22 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X