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 Christopher_R, Today, 12:29 AM
                0 responses
                9 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,235 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                8 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,415 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X