Announcement

Collapse
No announcement yet.

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.

    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.

      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.

          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

              Comment


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

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                56 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                133 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                73 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                45 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                49 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X