• 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

GetAtmStrategyMarketPositon method error: ATM strategy ID does not exist

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

    GetAtmStrategyMarketPositon method error: ATM strategy ID does not exist

    I created a strategy and it works it well but I get GetAtmStrategyMarketPositon method error: ATM strategy ID does not exist once in a while.

    Do I put a try catch to get rid of this error?

    If this error happens my strategy still runs but it will not continue set up my pending orders

    #2
    Hello ballboy11,

    Thanks for your post.

    How you would like to deal with the error would be subjective to your strategy and how it is written. Some questions that may be relevant while you take debugging steps:
    • What circumstances lead the strategy to report that this ID did not exist?
    • Was this ID different than the ID used to generate the Atm strategy?

    Adding prints for the AtmStrategyID's that you create, use and reference can help you track down what ID is being sent to the method which fires the error.

    When I test our bundled SampleAtmStrategy, I don't encounter such errors. I'd recommend referencing this strategy for a working example that may provide further direction. Specifically, please note how this strategy uses "atmStrategyId" and "isAtmStrategyCreated."

    This code is openly available. I would also advise testing this strategy along side your strategy and then to model this strategy's behavior in your own works before changing the implementation.

    Please let us know if you have any additional questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by saltminer, Today, 06:11 PM
    0 responses
    2 views
    0 likes
    Last Post saltminer  
    Started by epitoma, Today, 05:21 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by BatBart, Today, 01:24 PM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_Melissa  
    Started by ezrakoper, Today, 03:05 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by asmmbillah, Today, 02:23 PM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X