• 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

'GetAtmStrategyUnrealizedProfitLoss' method error: ATM strategy ID does not exist

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

    'GetAtmStrategyUnrealizedProfitLoss' method error: ATM strategy ID does not exist

    I used the SampleATMPnL as a base and made it send a limit order instead of a market. When I run OnEachTick, sometimes I get the error 'GetAtmStrategyUnrealizedProfitLoss' OR 'GetAtmStrategyEntryOrderStatus' method error: ATM strategy ID does not exist.

    Is this expected? Is there a way to avoid receiving this error when I run OnEachTick? My suspicion is that a tick occurs and updates the indicator before the order can be initialized in the system.
    Attached Files

    #2
    Hello Jack22,

    These warnings are expected if the methods are being called when there is no order id that exists. This can happen if you are calling the methods before an order or also after it has filled and a number of ticks have elapsed. The ATM's are not necessarily like strategy orders which persist constantly in your strategy, these instead have a lifetime and once they are gone you would get this message if the method is still being called.

    Currently there are no ways to suppress this message that I am aware of, I could only suggest using the managed or unmanaged approach to avoid that.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sledge, Today, 06:11 PM
    1 response
    8 views
    0 likes
    Last Post sledge
    by sledge
     
    Started by Bionian, Today, 02:46 PM
    2 responses
    9 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by rwilliam, Today, 01:54 PM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by franco12364, Today, 11:27 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by YevhenShynkarenko, Today, 11:48 AM
    4 responses
    27 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X