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 MarianApalaghiei, Today, 10:49 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        45 views
        0 likes
        Last Post bill2023  
        Working...
        X