Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need Help With Strategy Account Selector

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

    Need Help With Strategy Account Selector

    Hello, I am including my compiled strategy file for this one. Its a Chart Trader button mod that places/ modifies trades with use of buttons.

    I added the account convertor code to select accounts in the strategy properties, however it will only place trades on the "Sim101" account.

    I have made a test account called "Test" and selected it through the strategy properties, then synchronizing the account on the ATM portion of the NT chart trader. when I place a trade it will always go to "Sim101"

    I am not sure how to debug this and need some help, FYI I am using this strategy while sim trading on live data.


    P.s. I apologize ahead of time for any messy/redundant code. I am self taught and this file is a work in progress


    Thanks in advance,

    BeachTrader
    Attached Files

    #2
    Hello BeachTrader11807,

    The strategy based ATM methods are only for use with the account your strategy has selected when you enable it, you can completely remove the account finding code because that won't be relevant to the strategy. You would need to see the SampleATMStrategy script that comes with the platform for the correct code to use when using ATM's in a strategy. You would need to apply the strategy to the account you want the order submitted to.

    If you want to use the addon framework to find the account or use the charts tools like the account selector you need to switch to using an indicator which does not have an account. You can see how to use ATMs with the addon framework here:

    https://ninjatrader.com/support/help...tmstrategy.htm

    Comment


      #3
      Thanks for your reply NinjaTrader_Jesse,

      You are right, I forgot that selecting the account in my strategy properties (Account Selector Code) is only for The OnAccountUpdate() portion of my code.

      I am still having the same problem, However I just figured it out! in the Setup tab of the Strategy Properties my account was set to "Sim101"

      I just tried changing it to the "test" account and it is now working!!

      Thank you so much for your time, I knew it was some sort of silly fix.

      Cheers!

      Comment


        #4
        Hello BeachTrader11807,

        Just to further clarify the addon framework is not needed at all for strategies so you can remove that. Strategies natively have all of the account subscriptions as overrides however that is only for managed or unmanaged strategies. These items do not apply to ATM strategies, when using ATM strategies you need to use the specific ATM methods to observe the ATM your strategy submitted:

        https://ninjatrader.com/support/help...gy_methods.htm

        For managed or unmanaged strategies you can use the overrides:

        https://ninjatrader.com/support/help...htsub=onaccoun
        https://ninjatrader.com/support/help...sub=onexecutio
        https://ninjatrader.com/support/help...=onorderupdate
        https://ninjatrader.com/support/help...sub=onposition

        Comment


          #5
          Thank you NinjaTrader_Jesse

          I better understand now, That code was taken from a indicator so it makes sense that strategies would be subscribed.

          Cheers!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          71 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          143 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          76 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          47 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          51 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X