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

Strategy Wiz: Building a MacD line crossing the Signal line strategy (MacD Cross)

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

    Strategy Wiz: Building a MacD line crossing the Signal line strategy (MacD Cross)


    The Should only place an order when the actual cross has happened.
    Whether I manually close the trade or not shouldn't matter, The Strategy should not open a new trade unless a new MacD cross has happened again normally in a different direction. (the strategy I'm using currently opens a new trade in the same direction immediately.) So a question is what's wrong and right with my parameters?
    • The Strategy should not place a new trade unless a new cross has happened.
    • This occurs on reconnection & startup after manually closing a trade
    Note
    1. This is happening during simulation data feed connection. The Strategy becomes disabled when manually closing a trade. When re-enabled (which has to been done manually by going in and selecting the enable box). The strategy immediately places a trade far beyond the actual MacD cross.
      1. How to correct this so that the strategy waits until the next MacD Cross occurs before opening a new trade?


    #2
    Hello McSauce,

    When manually closing a trade if you do a close action that will disable the strategy so it wouldn't be able to trade again after that until you re enable it. That is normal.

    If the strategy is placing more trades than it should or entering when it reaches realtime you would need to review the condition to enter. It can only enter if that condition is true, based on the description that condition is remaining true for multiple bars. If you can post an image of your entry condition that may help to know what the problem is.



    JesseNinjaTrader Customer Service

    Comment


      #3
      How do I resolve this error message?
      unable to load trading hours from file 'CME FX Futures RTH.xml': System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException

      I have several other's too. I'll attach a screenshot
      I don't have Acronis running or installed on this PC.Click image for larger version

Name:	Screenshot (44).png
Views:	101
Size:	153.6 KB
ID:	1280905

      Comment


        #4
        Hello McSauce,

        Please try doing the following steps
        1. Open the control center tools -> Database management menu
        2. Expand the section that says update trading hours
        3. Leave the first box checked and click update
        4. Restart the platform

        If you still get errors repeat these steps again but also select remove user added trading hours and restart the platform.



        JesseNinjaTrader Customer Service

        Comment


          #5
          I'm still getting the errors.
          I even tried resetting and repairing the database but the errosr keep coming back

          Comment


            #6
            Hello McSauce,

            Before doing the following steps make sure that you do not have any backup or sync software running such as onedrive, if anything external is modifying or replacing the files that will cause the errors that you are seeing if any duplicates are made.

            Please try doing the following steps
            1. Open the folder Documents\NinjaTrader 8\templates\TradingHours
            2. Remove all of the files
            3. Open the control center tools -> Database management menu
            4. Expand the section that says update trading hours
            5. Check both boxes and click update
            6. Restart the platform
            JesseNinjaTrader Customer Service

            Comment


              #7
              Problem solved I just did a wip and reload on my PC and reinstalled Ninjatrader 8

              Comment


                #8
                However I do have a question.
                How do I chart/ get ninjatrader 8 to show continuous contracts?
                ( I'd like for my Ninjatrader 8 chart to be identical to Tradingviews continuous MNQ Futures Contract)?

                Comment


                  #9
                  Hello McSauce,

                  To use continuous contracts you just need to select a date range that includes more than one contract. The default settings of the platform make continuous futures data. That is known as the merge policy.

                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Jesse View Post
                    Hello McSauce,

                    Before doing the following steps make sure that you do not have any backup or sync software running such as onedrive, if anything external is modifying or replacing the files that will cause the errors that you are seeing if any duplicates are made.

                    Please try doing the following steps
                    1. Open the folder Documents\NinjaTrader 8\templates\TradingHours
                    2. Remove all of the files
                    3. Open the control center tools -> Database management menu
                    4. Expand the section that says update trading hours
                    5. Check both boxes and click update
                    6. Restart the platform
                    My issue is for sure with one drive. I clicked something that moved all my default files from my local storage to the cloud. However this caused the program to not really even boot up. So I manually moved the files back and tried to set up one drive so it wouldn't sync without my permission. However, it is still giving me the errors. At least it is running I suppose. However, having to click through about 50 messages everytime you boot up is definitely annonying so I am trying to resolve. I'll work through these steps and see if anything works.

                    UPDATE: this method worked perfectly! all errors cleared! Similar method works with risk template and commissions loading exceptions! Thank you Jesse!
                    Last edited by RISKYBUSINEZZ; 01-20-2024, 12:25 AM.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by burtoninlondon, Today, 12:38 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post burtoninlondon  
                    Started by AaronKoRn, Yesterday, 09:49 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post AaronKoRn  
                    Started by carnitron, Yesterday, 08:42 PM
                    0 responses
                    11 views
                    0 likes
                    Last Post carnitron  
                    Started by strategist007, Yesterday, 07:51 PM
                    0 responses
                    13 views
                    0 likes
                    Last Post strategist007  
                    Started by StockTrader88, 03-06-2021, 08:58 AM
                    44 responses
                    3,982 views
                    3 likes
                    Last Post jhudas88  
                    Working...
                    X