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

Divergence System

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

    Divergence System

    Dear Ninja-Team,

    I tried to run the "Divergence System" from the Stocks&Commodities Magazine July 2017. But always occurs an error.
    I have attached a snapshot of the error in the market analyzer. Can you help me please?

    Kind regards,
    Harvard
    Attached Files

    #2
    Hello Harvard,

    Thank you for the post.

    I am reviewing your inquiry and will be back with a reply shortly.

    I look forward to assisting further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello Harvard,

      Thank you for your patience.

      Can you please show me where you found this strategy? If you would like you may post the code from your computer here on the forum.

      I look forward to your reply.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Hi ChrisL,

        thank you for your fast response. I downloaded the code frome the link which was in the July 2017 issue:

        Comment


          #5
          Hello Harvard,

          Thanks for pointing that out.

          I have made a correction to the script to look for the appropriate BarsPeriodType instead of the BaseBarsPeriodType.

          I have uploaded this script to our forums, and it can be found here: http://ninjatrader.com/support/forum...atid=8&lpage=1

          Please let me know if I may be of further assistance.
          JimNinjaTrader Customer Service

          Comment


            #6
            Since Nikkei futures and USD/JPY currency data do not close at the same time, in order to simulate a divergence system realistically, the author decided to use the DXJ and the Guggenheim Currency Shares Japanese Yen Trust (FXY), both trading in New York.

            Are these the only possible instruments to use or can I use e.g. the Nikkei225 CFD and the USD/JPY? If yes how cann I change it in the code?

            Regards,
            Harvard

            Comment


              #7
              Hello Harvard,

              The strategy was written to model the EasyLanguage code in the article. Since additional data series cannot be configured as a parameter in NinjaScripts, the code will have to be modified to use different symbols for the divergence system.

              You can change the lines at 125 and 126 to use different symbols.

              AddDataSeries("FXY", Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);
              AddDataSeries("SPY", Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);
              You can reference the information below for usage. I have also included a link to the NinjaScript Editor 401 tutorial if you would like to reference how to use the NinjaScript Editor.

              AddDataSeries() - https://ninjatrader.com/support/help...dataseries.htm

              NinjaScript Editor 401 - https://www.youtube.com/watch?v=BA0W4ECyVdc
              JimNinjaTrader Customer Service

              Comment


                #8
                Thank you very much. You helped me a lot.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cre8able, Today, 03:20 PM
                0 responses
                2 views
                0 likes
                Last Post cre8able  
                Started by Fran888, 02-16-2024, 10:48 AM
                3 responses
                45 views
                0 likes
                Last Post Sam2515
                by Sam2515
                 
                Started by martin70, 03-24-2023, 04:58 AM
                15 responses
                114 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by The_Sec, Today, 02:29 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by jeronymite, 04-12-2024, 04:26 PM
                2 responses
                31 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X