Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using ATM code in an unlocked Strategy builder code

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

    Using ATM code in an unlocked Strategy builder code

    Hello, I have discovered how to use the ATM tool as part of my strategy, After I unlock the code and then paste in certain lines of code from the built in 'SampleAtmStrategy' which is nice, but I ran into a new issue. For simplicity reasons lets say the condition is met and I need a Buy StopMarket order placed at the High of candle 2. The ATM only places limit orders. I have tried changing the code to 'OrderType.StopMarket' and 'OrderType.StopLimit' instead of the default 'OrderType.Limit' but then nothing happens. I need when the conditions are met that a Buy Stop order is placed at candle 2 high which is above the current market price. This is a breakout pending order strategy. Thanks for your guidance with this issue.

    #2
    Hello NWVW22,

    Thank you for your post.

    Can you share the code that you are using to create the atm strategy using AtmStrategyCreate()? Are you specifying a limit price?

    To understand how the logic is behaving, you would need to debug it using prints. To get info about orders placed using Atm Strategies you should use the methods in the ATM Strategy Monitoring section of the Atm Strategy Methods help guide:



    The SampleAtmStrategy sample that comes with NinjaTrader demonstrates using some of those methods for monitoring orders submitted using Atms.

    Please let us know if you need further assistance. ​

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X