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 NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            58 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            133 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X