Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using The Attach to Indicator feature with a Ninjascript Strategy

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

    Using The Attach to Indicator feature with a Ninjascript Strategy

    If I have a NS Strategy that is designed to trigger a given ATM setup, is the "Attach to Indicator" feature fully compatible with the stop and targets executed by the ATM?

    James 108

    #2
    Hello James108,

    Thanks for opening the thread.

    Yes, this would be possible to have a NinjaScript strategy initiate an ATM strategy and then to allow the user to attach the stops or targets to a plotted indicator. I would avoid attempting to update the stops or targets via NinjaScript if you wish to do this, however.

    Since there are not any supported methods to check through code if the ATM stop or target is attached to an indicator, there would not be a good way to combine these behaviors. Through testing, we can see that once the NinjaScript strategy starts to change an ATM strategy stop loss, the Attach To Indicator function will no longer update that stop loss.

    Let us know if we can be of further assistance.

    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim

      As a follow up how involved would it be a have write a Strategy the fires the current ATM when a chart maker of a give type appears on the chart at the current price, So if we get an Up Arrow we want the ATM to initiate a Market OCO order with two contracts?

      Comment


        #4
        Hello James108,

        There wouldn't be a good way to identify when a chart marker appears on screen. If you were to handle that programmatically, you would want to describe in code what exactly to look for on a chart. For example, you could check the Account's Orders collection for an open stop market order on that instrument and if that order is at a certain level.

        Orders collection - https://ninjatrader.com/support/help...rs_account.htm

        Also to note, the NinjaScript strategy can initiate the ATM strategy and modify stops/targets, but you cannot have the NinjaScript strategy have the ATM strategy initiate some other action. That would have to be built into the ATM strategy.

        My recommendation for using ATM strategies with NinjaScript strategies would be to simply have the ATM strategy initiated, and to either perform modifications through NinjaScript, or to leave out any programmatic modifications to ATM strategy orders so the user can freely use the ATM strategy in their own way.

        Please let us know if we can be of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        22 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Started by guillembm, Yesterday, 11:25 AM
        2 responses
        9 views
        0 likes
        Last Post guillembm  
        Started by junkone, 04-21-2024, 07:17 AM
        9 responses
        68 views
        0 likes
        Last Post jeronymite  
        Started by mgco4you, Yesterday, 09:46 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X