• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No idea how to run strategy

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

    No idea how to run strategy

    I am new to NT8 and I'm trying to build a test strategy with extremely simple parameters just to figure out how to use strategies.

    I created a strategy for /ES. If the price changes, it should enter a strategy (just for testing). I have enabled the strategy but it's not entering any trades. I have no idea what I'm doing, but any help would be awesome. Thanks

    #2
    Hello Lumbeezl,

    Thanks for opening the thread.

    There is some introductory information as well as some in depth information on using NinjaScript strategies that should be referenced in order to fully understand how NinjaScripts function and how they can be enabled. I recommend reviewing this information and testing with the SampleMACrossover strategy to observe how NinjaScripts work.

    Running NinjaScript Strategies (Please see Running NinjaScript Strategies from a Chart and Running NinjaScript Strategies from the Control Center) - https://ninjatrader.com/support/help...strategies.htm

    The Strategies tab will show green for enabled strategies that are allowed to trade live and orange for strategies that use Wait Until Flat and are in a virtual position from historical processing. Please see the Strategy Position vs. Account position documentation in the link above for more information on these differences as well as the Syncing Account Positions page for more information on Start Behaviors.

    Reference on the Strategies tab can be found here - https://ninjatrader.com/support/help...eStrategiesTab

    After familiarizing yourself with how Strategies operate and how they can be used, I would then recommend looking into creating your own strategies. We have some video tutorials on the NinjaScript Editor and the Strategy Builder that can provide a good introduction.

    Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

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

    The information provided is publicly available.

    If you have any specific questions on these materials or have another question that we may assist you with, please let us know.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the info. I really appreciate it. I am able to create strategies, but it seems not to be connecting to the Sim101 account. Is there a specific reason this is happening?

      Comment


        #4
        Hello Lumbeezl,

        You will need to be connected to a data feed for an account to be available to attach the strategy to. Once connected you can select an account from the Strategy's Account Selector for the strategy to run against.

        I have attached a video connecting to my data provider and enabling the SampleMACrossover strategy on the Sim101 account.

        Demo: https://www.screencast.com/t/Mq3yYtucp80I

        Please let me know if you are unable to see the same results following these steps on your end.
        JimNinjaTrader Customer Service

        Comment


          #5
          Ok, so I'm able to connect the Sample strategy but the strategies I've created in the strategy builder are not connecting to the account. Is there something in strategy builder I could've done to disable that? Not seeing anything in the code to indicate that

          Comment


            #6
            After experimenting a little, I've noticed that if I add a profit target/stop loss it won't connect. As soon as I remove them from the strategy, it will connect. Is there something else I should be doing?

            Comment


              #7
              Hello Lumbeezl,

              Without screenshots showing how you have set the strategy up and what you expect to see, we are only left to speculate on the issue. I may suggest to first observe the log tab of the Control Center so any errors can be seen.

              Issues with strategies should be handled by first comparing with the SampleMACrossover strategy to see if the shipped NinjaScript strategy is able to function. If it does and your strategy does not, debugging steps will need to be taken to understand why your strategy is is or not submitting orders.

              I have attached a demonstration video showing how you can add debugging prints within the Strategy Builder. These prints can be seen in the NinjaScript output window and can be used to diagnose issues with your logic. This information also makes it clear what adjustments would need to be made.

              Debugging with the Strategy Builder - https://www.screencast.com/t/8uvjfM8h

              Since you have narrowed the issue down to using profit targets and stop losses, I suggest taking debugging steps and looking for reported errors in the Control Center. You may also verify your implementation by referencing the Strategy Builder 301 webinar.

              Please let us know if you need further assistance.
              JimNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Stok, Today, 08:44 AM
              0 responses
              1 view
              0 likes
              Last Post Stok
              by Stok
               
              Started by Longhornmark, Today, 08:22 AM
              0 responses
              4 views
              0 likes
              Last Post Longhornmark  
              Started by akuntysh, Today, 12:02 AM
              2 responses
              10 views
              0 likes
              Last Post akuntysh  
              Started by hir04068, Today, 04:26 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by Revan, Yesterday, 11:53 PM
              4 responses
              27 views
              0 likes
              Last Post NinjaTrader_Jim  
              Working...
              X