Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Long with limit offset not working

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

    #16
    Hello nikolaalx,

    May I test your code?

    To export your script do the following:
    1. Click File -> Utilities -> Export NinjaScript
    2. Enter a unique name for the file in the value for 'File name:'
    3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
    4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


    Below is a link to the help guide on Exporting NinjaScripts.
    http://www.ninjatrader.com/support/h...nt7/export.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Yes of course.

      I have exported it.

      Please tell me where to send it?


      Originally posted by NinjaTrader_ChelseaB View Post
      Hello nikolaalx,

      May I test your code?

      To export your script do the following:
      1. Click File -> Utilities -> Export NinjaScript
      2. Enter a unique name for the file in the value for 'File name:'
      3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
      4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


      By default your exported file will be in the following location:
      • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


      Below is a link to the help guide on Exporting NinjaScripts.
      http://www.ninjatrader.com/support/h...nt7/export.htm

      Comment


        #18
        Hello nikolaalx,

        If you are ok with the code being public, please attach the export to your next post.

        If you would like to keep the code private, please send this to platformsupport [at] ninjatrader [dot] com. In the email add a link to this forum thread.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Hi nikolaalx,

          Did you check the output window when you ran the script?

          Looks like you are getting an error.

          **NT** Error on calling 'OnBarUpdate' method for strategy 'PZeroDev27/e133666d10c949dca1d13f34720abfe6': Object reference not set to an instance of an object.
          1/29/2015 12:10:00 AM CancelAllOrders: BarsInProgress=0

          Did you receive this error as well?

          You are trying to cancel both entryShort and entryLong without checking that they are not null first. You also don't check to see that these are both working which can also cause an error.

          I recommend you add a check to make sure they are not null before you call them.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          85 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          47 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          29 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          32 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          67 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X