Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Closing Trade turns off strategy?

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

    Closing Trade turns off strategy?

    Hi,
    Using chart trader. I have a strategy turned on to display markers based on indicators. Nothing complicated. No trades are generated by the strategy. When I am in a trade and click the close button, the trade closes but the strategy is also disappears. I then go into strategies and have to re check the enabled button to turn on the strategy. Same issue when i use a hot button to close a trade. I have tried various hot buttons incase it was being tied to the hot button key assignment , always the same result. Is it something under the default Properties in strategy builder? Thank you


    #2
    Hello yngtrader,

    Thank you for your post.

    What you have described is expected behavior and it is also listed in our help guide. When you click the Close button to close out a position for an instrument and account that also has a strategy running, the strategy is also disabled. This is listed under the tips section on the following page:


    I understand your strategy does not generate any trades and you are using it for visual markers. As a workaround, you could create an additional simulated account and then enable the strategy on that account, leaving your other accounts available for manual trading and allowing you to use the Close button to close a position without affecting the strategy.

    To add a simulation account:
    • Go to the Accounts tab of the Control Center
    • Right-click and select Add Simulation Account
    • Set up the desired account properties, then click OK
    Now, in your strategy properties, select the new simulated account from the Account dropdown and then enable your strategy. You should still see the markers on the chart, though you may select other accounts in the Chart Trader and use the Close button without disabling your strategy.

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Thank you, I am using replay the only account the shows in the account drop down is Playback101.

      Comment


        #4
        Hello yngtrader,

        Thank you for your reply.

        In that case, another option would be to use unlocked NinjaScript to copy your strategy logic into an indicator script instead. We have some tutorials on how to develop an indicator in NinjaTrader that may be found here:


        You could likely open your strategy in the Strategy Builder and then click on the View Code button. This will open up a NinjaScript Editor window with your strategy's logic; I suspect that the majority of the logic in OnBarUpdate() could be copied into OnBarUpdate() inside of an indicator script. If your strategy has anything set up on the Additional Data screen or if it has user inputs on the Inputs and Variables screen, those may be set up in the Indicator wizard when starting a new indicator.

        My colleague has also shared an idea of the general process to convert a Strategy Builder strategy into an indicator script here:
        Hello! I had to use Strategy Builder to build an indicator and now I want to copy and paste it over from Strategy to Indicator, probably based on this old post: https://ninjatrader.com/support/forum/forum/ninjatrader-7/indicator-development-aa/17399-converting-strategy-to-indicator Since that post is over a decade old and I'm


        For even more details on getting started with NinjaScript and working with unlocked scripts in the NinjaScript Editor, please see the following helpful tips and resources:


        Please let us know if we may be of further assistance.
        Emily C.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sofortune, 05-18-2024, 11:48 AM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by Zach55, 02-19-2024, 07:22 PM
        2 responses
        65 views
        0 likes
        Last Post lbadisa1  
        Started by JGriff5646, Yesterday, 05:47 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by AlphaOptions, 06-18-2013, 08:24 AM
        9 responses
        2,203 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by ttrader23, Yesterday, 09:33 AM
        3 responses
        28 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X