• 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

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 Venom, Today, 01:05 PM
        0 responses
        2 views
        0 likes
        Last Post Venom
        by Venom
         
        Started by Dert66, Today, 12:11 PM
        0 responses
        6 views
        0 likes
        Last Post Dert66
        by Dert66
         
        Started by jjanguda, Today, 10:04 AM
        0 responses
        197 views
        0 likes
        Last Post jjanguda  
        Started by sambo81, Today, 09:20 AM
        1 response
        12 views
        0 likes
        Last Post sambo81
        by sambo81
         
        Started by TopGunNote, 05-14-2019, 01:12 PM
        3 responses
        78 views
        0 likes
        Last Post dpaulw
        by dpaulw
         
        Working...
        X