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

Mean Reversion indicator

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

    Mean Reversion indicator

    Hello, Support and All!

    Could someone be willing to assist to finish converting an indicator from a strategy.

    I just started by moving the relative parts, but it shows nothing on the chart.If someone could guide or help, it`d appreciate.

    Thanks in advance!
    Attached Files

    #2
    Hello,

    Thank you for posting.

    In this case you are getting a BarsAgo error, you can check for errors using the Tools -> Output Window or the Log tab.

    You would need to add a CurrentBar check as you are using BarsAgo. You would need to check the maximum number of BarsAgo you use, and then add the following to the top of OnBarUpdate:

    Code:
    if(CurrentBar < 5) return;
    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for posting.

      In this case you are getting a BarsAgo error, you can check for errors using the Tools -> Output Window or the Log tab.

      You would need to add a CurrentBar check as you are using BarsAgo. You would need to check the maximum number of BarsAgo you use, and then add the following to the top of OnBarUpdate:

      Code:
      if(CurrentBar < 5) return;
      Please let me know if I may be of further assistance.
      Thanks Jesse.

      I attached for anyone that interested.Two indicators(plus the inverse one) from the MR strategy.Feel free to use and further improvement.
      Attached Files

      Comment


        #4
        Hello outsource,

        To export a NinjaTrader 7 NinjaScript so this may be shared and imported by the recipient 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
        The exported file will be in the following location:
        • (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript\<export_file_name.z ip>
        Below is a link to the help guide on Exporting NinjaScripts.
        http://www.ninjatrader.com/support/h...nt7/export.htm


        As a convenience to any community members wanting to import these scripts I have exported these and attached.

        To import a NinjaTrader 7 NinjaScript you will need the original .zip file.

        Follow these steps to import the NinjaScript:
        1. Download the script to your Downloads folder, keep it in the compressed .zip file.
        2. From the Control Center window select the menu File > Utilities > Import NinjaScript
        3. On the left select the Downloads folder > Select the downloaded .zip file > click Open
        4. NinjaTrader will then confirm if the import has been successful.
        Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cls71, Today, 04:45 AM
        0 responses
        1 view
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        213 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        544 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        12 views
        0 likes
        Last Post XXtrader  
        Working...
        X