Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATI records redundant multiple orders

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

    ATI records redundant multiple orders

    I am a C# newbie, so I have just started testing the ATI interface. I am using TS 8.5 with the logic taken from the supplied NT strategy sample code.
    My TS 8.5 strategy (calculated every bar on close) generates one order, but the the ATI registers one order for every NT bar until I turn it off. What am I doing wrong?
    BTW, I am getting the TS 8.5 reentrancy error message on every bar when the strategy generates an order.
    Also, is it true that I can transmit an ATM strategy instead of separate market order and OCO bracket?
    It would surely simplify things. Thanks.

    #2
    Which ATI interface are you using? You do not necessarily transmit an ATM strategy. What you can do is kind of attach it to your entry orders that you make.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I am using the DLL interface, imported the ELD that came with NT. For example

      If LastBarOnChart and NTConnected(1) and NTMarketPosition("SIM101") <= 0 then
      NTSuccess = NTBuyMarket("", 1);

      I have since replaced LastBarOnChart to a test that checks for real time ticks.

      My most urgent problem is to stop the redundant orders.
      What might be causing this?

      Then, if this is possible, I will create and name an ATM strategy and will use the PLACE command to send it by name to the ATI.

      I will try to simplify my ELS code and migrate it to NT, but as with anything new it's slow at the beginning.

      Thanks.

      Comment


        #4
        2aspirin,

        Your code will keep resubmitting when your conditions are true. As long as that market order was not filled yet you will keep resubmitting. I am not a TS expert so cannot advise you on EasyLanguage, but you can try using a bool flag variable. When it is false, place the trade, once the trade has been submitted set the bool to true so the same condition will not be evaluated to true again. Then finally after your trade is complete, reset your bool to false to allow for future trading again.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,408 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X