Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM vs Strategy

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

    ATM vs Strategy

    Hello,

    I have a strategy that buy, sell and reverse similar to ATM, but there are situations where my strategy sends a error and the ATM doesn't fail. Normally when there is a high volatility. Is there any way to access to ATM and explore its code?

    Thanks in advance.

    #2
    Hello soyjesus,

    Thank you for your post.

    The source code for ATM strategies is not available. That being said, based on the error message and what you are looking to get out of your strategy, you should be able to debug the behavior and adjust your code as needed. So I may better assist you, please answer the following questions:
    • What is the error message you receive?
    • You mentioned "the ATM doesn't fail" - are you coding with an ATM strategy inside of your strategy logic or do you mean you are testing an ATM strategy as well as testing your NinjaScript strategy?
    • What does the ATM strategy do that your strategy is not doing?
    I look forward to your reply.

    Comment


      #3
      Hello Emily,

      Thank you for your reponse. The fail appears when the market move very quickly. I am using an ATM and by the other hand, I activate my strategy. So, my stratety returns errors when the price is above the Buy-Stop order (for example), but this issue doesn't appear with the ATM.

      In your text you ask me about "coding with an ATM strategy" inside of my own strategy. Is that possible? How can I do it?

      Thank you for your help.

      Comment


        #4
        Hello soyjesus,

        Thank you for your reply.

        If you are encountering issues with your strategy submitting orders that then end up on the incorrect side of the market due to volatility, one way you could address this is by adding your own RealtimeErrorHandling behavior to the strategy. The default option is for the strategy to StopCancelClose when it encounters a rejection or error. The other options available are StopCancelCloseIgnoreRejects and IgnoreAllErrors. For example, you could set the RealtimeErrorHandling to StopCancelClose IgnoreRejects, then within OnOrderUpdate() you could trap rejections and add logic that runs if order.OrderState == OrderState.Rejected as demonstrated in the example on the help guide page here:



        As for using an ATM strategy within a NinjaScript strategy, it is best to start by reading the page here about Using ATM Strategies:



        ATM strategies can be used to programmatically monitor and generate the entry signal, then you would have to manually manage the open position via the ATM strategy rather than the strategy automating the close of the open position.

        We have a reference sample that generates an entry with an ATM strategy and shows how to get the PnL from that ATM strategy here:


        Please let us know if we may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        54 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        72 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X