• 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 tvaughan4, Yesterday, 10:46 PM
        2 responses
        12 views
        0 likes
        Last Post tvaughan4  
        Started by digibob, Yesterday, 10:01 PM
        3 responses
        11 views
        0 likes
        Last Post digibob
        by digibob
         
        Started by ldissinger, Today, 12:55 PM
        1 response
        11 views
        0 likes
        Last Post ldissinger  
        Started by pstrusi, Today, 09:06 AM
        1 response
        24 views
        0 likes
        Last Post marcus2300  
        Started by vpzdcv, Today, 02:31 AM
        0 responses
        13 views
        0 likes
        Last Post vpzdcv
        by vpzdcv
         
        Working...
        X