Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to detect attach behavior

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

    Is there a way to detect attach behavior

    Hello,

    Is there a way to detect attach behavior?

    In the atm strategy code, can you detect manual operations, such as attaching to the indicator.

    #2
    Hello jetheil2,

    There is no supported means to detect that from a NinjaScript strategy. A strategy has limited ways it can interact with the ATM. I don't see a specific property on the AtmStraetgy type for that so that is likely controlled exclusively by the tool being used to attach it.



    Comment


      #3

      If the atm strategy has AtmStrategyChangeEntryOrder() or AtmStrategyChangeStopTarget(),
      After that, manually attaching the indicator will cause the price to keep flashing, that is, it will follow the attached indicator and quickly switch back to the value set by AtmStrategyChangeStopTarget ().
      Any good suggestions?


      Thank you,

      Comment


        #4
        Hello jetheil2,

        I could only suggest to not manually manipulate the strategy in that case, the NinjaScript strategy is in control of the ATM as it submitted it. While it is an external strategy the NinjaScript strategy will try to control it whenever the ATM methods are called from code.

        Comment


          #5

          Can I get the price of the current pending order in the atm strategy? For example, the price of take profit and stop loss.
          It is not stored and fetched from the code variable, but the return of the pending order.
          Can the Account class do it?

          thankyou

          Comment


            #6
            Hello jetheil2,

            Not from the ATM methods avaliable to a strategy. You could calculate prices and then call AtmStrategyChangeStopTarget to update the ATM to those prices, the strategy would then know about the orders prices.



            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            47 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            23 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            33 views
            1 like
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            51 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