Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to GetAtmStrategyEntryOrderStatus from an Addon

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

    How to GetAtmStrategyEntryOrderStatus from an Addon

    Hi,

    Let say we have sent an ATM Order from an AddOn using

    Order buyOrd = null;
    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(selectedatm, buyOrd);

    How can I know the status of that ATM ?
    Tried to use string[] entryOrder = GetAtmStrategyEntryOrderStatus(buyOrd);

    but it looks like GetAtmStrategyEntryOrderStatus does not exist in the current context

    Thanks !
    Pablo
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello,

    Thank you for the post.

    The Strategy ATM methods differ from the Addon ATM methods, in the case of an addon generally this approach would be targeted at more of a custom tool that has ATM function like ChartTrader or the SuperDOM. NinjaScript strategies specifically have a small set of methods to gain control over the ATM rather than a custom tool which may instead use the existing order overrides like OnOrderUpdate or OnExecution and also Order objects.

    I would suggest to review the syntax used in the addon framework example here: http://ninjatrader.com/support/forum...ad.php?t=84087

    This shows the syntax to create an order using an ATM, but also uses the a variable to store the entry which can later be checked in other states.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      How can I convert an indicator for Ninjatrader 7 that does the following ;
      It configures and load a strategy from the indicator and then if it is not running (checkbox not selected on control center strategies tab ) it enables again ;

      private SampleStrategy mystrat;

      OnStartUp()
      mystrat = new SampleStrategy();
      mystrat.Instrument = base.Instrument;
      mystrat.SetBarsPeriodInstrument(new Period(PeriodType.Minute,1,MarketDataType.Last),ba se.Instrument);
      mystrat.Days2Load = 1;
      mystrat.SessionData="Default 24/7";
      mystrat.Unmanaged = true;
      mystrat.TimeInForce=TimeInForce.Day;
      mystrat.SetUp();
      mystrat.Enabled = true;

      OnBarUpdate()
      if( !mystrat.Running) mystrat.Running = true;

      The most important extensions seems not to be present on Ninja 8, like Running or isRunning...

      Thanks !
      Pablo
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Hello,

        Thank you for the reply.

        Unfortunately these items I could not provide solutions for, in general starting a strategy programmatically is not supported/documented.

        I am not certain of what internally is required to instantiate a strategy the same way the core would, so this would be a subject I could not assist with. I could really only suggest to manually apply the strategy when you want to trade to ensure it is enabled correctly.

        There is a feature request in place for programattically starting strategies, so I will add a vote to the request for you.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mmenigma, Today, 02:22 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frankthearm, Today, 09:08 AM
        9 responses
        35 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by NRITV, Today, 01:15 PM
        2 responses
        9 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Started by maybeimnotrader, Yesterday, 05:46 PM
        5 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by quantismo, Yesterday, 05:13 PM
        2 responses
        21 views
        0 likes
        Last Post quantismo  
        Working...
        X