• 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

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 Duval, Today, 08:38 AM
        0 responses
        6 views
        0 likes
        Last Post Duval
        by Duval
         
        Started by i2w8am9ii2, 02-13-2019, 04:28 PM
        7 responses
        61 views
        0 likes
        Last Post sledge
        by sledge
         
        Started by woodyfox, Yesterday, 08:33 PM
        0 responses
        7 views
        0 likes
        Last Post woodyfox  
        Started by rblunsom, Yesterday, 11:19 AM
        2 responses
        29 views
        0 likes
        Last Post guidoisot  
        Started by drewski1980, Yesterday, 02:38 PM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X