Announcement

Collapse
No announcement yet.

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.



    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:	234
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.



        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

            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.

                  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


                      #11
                      I'm unable to save the free trade copier as a indicator template with my chart template... with the trade copier indicator the error reads...

                      -When I close and reopen ninjatrader i have to re-add the trade copier as and indicator.


                      the error below was prior but I no longer receive it.

                      unhandle exception there was an error reflecting type ninjatrader.ninjascript.indicators.prop_trader_too ls.tradecopier2

                      Comment


                        #12
                        Hello McSauce,

                        This may indicate an issue with serialization or a changed implementation with the script.

                        Is this is a script you created yourself or one you imported from a 3rd party?

                        If you remove the addon, restart NinjaTrader and re-save the workspace, then re-download the latest version of the addon (if 3rd party) and re-import the addon, then add the addon to a chart, are you able to reproduce?

                        If this is a 3rd party addon please report the behavior to the vendor or author that has distributed the software to you.
                        If this is a script you have created, are there public input variables that need serialization such as DateTime, Brushes, custom classes, etc?
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Today, 05:17 AM
                        0 responses
                        31 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        124 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        64 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        41 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        46 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X