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

Position Event (Order, Execution and Position) has order changed? (8.0.19.0)

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

    Position Event (Order, Execution and Position) has order changed? (8.0.19.0)

    I have receive a client log with those events:
    11:00:29 Execução Execução = '123636454|1117942614|7352772' Símbolo = 'NQ 12-19' Conta = 'xxxxxx' Bolsa = Globex Preço = 7679,25 Quantidade = Posição no mercado 1 = Long Operação = Operation_Add Ordem = '1117942614' Tempo = '09/10/2019 11:00'
    11:00:27 Ordem Ordem ='1117942614 / xxxxxx' nome = '' novo estado = 'Executado' instrumento = 'NQ 12-19' ação = 'Comprar' preço limite = 7679,25 preço Stop = 0 quantidade = 1 tipo = 'Limite' tempo em vigor = GTC Oco = '' executado =1 preço de execução = 7679,25 erro = 'Sem erro' erro nativo = ''
    11:00:26 Ordem Ordem ='1117942614 / xxxxxx' nome = '' novo estado = 'Processando' instrumento = 'NQ 12-19' ação = 'Comprar' preço limite = 7679,25 preço Stop = 0 quantidade = 1 tipo = 'Limite' tempo em vigor = GTC Oco = '' executado =0 preço de execução = 0 erro = 'Sem erro' erro nativo = ''
    11:00:26 Ordem Ordem ='1117942614 / xxxxxx' nome = '' novo estado = 'Aceito' instrumento = 'NQ 12-19' ação = 'Comprar' preço limite = 7679,25 preço Stop = 0 quantidade = 1 tipo = 'Limite' tempo em vigor = GTC Oco = '' executado =0 preço de execução = 0 erro = 'Sem erro' erro nativo = ''
    11:00:25 Posição Instrumento = 'NQ 12-19' conta = 'xxxxxx' preço médio = 7679,25 quantidade = posição no mercado 1 = Long operação = Operation_Add
    11:00:25 Ordem Ordem ='3c4f5e3b944f4f4a95d72ef628027503 / xxxxxx' nome = '' novo estado = 'Enviado' instrumento = 'NQ 12-19' ação = 'Comprar' preço limite = 7679,25 preço Stop = 0 quantidade = 1 tipo = 'Limite' tempo em vigor = GTC Oco = '' executado =0 preço de execução = 0 erro = 'Sem erro' erro nativo = ''
    11:00:25 Ordem Dinâmica SuperDOM Enviar ordem sem estratégia
    So, it is normal do have a Position event before Order and Execution?

    My addon is receiving a Position event before the execution event, even before the order executed event.

    It is a bug or this may happen?

    Thanks,
    Last edited by Rudmax; 10-09-2019, 12:50 PM.

    #2
    Hello Rudmax,

    Thank you for your post.

    I've translated the log into English so it's easier for me to comment on.

    11:00:29 Execution Execution = '123636454|1117942614|7352772' Symbol = 'NQ 12-19' Account = 'xxxxxx' Exchange = Globex Price = 7679.25 Quantity = Market Position 1 = Long Operation = Operation_Add Order = '1117942614' Time = '09/10/2019 11:00' Time = '09/10/2019 11:00
    11:00:27 Order Order ='1117942614 / xxxxxx' name = '' new state = 'Filled' instrument = 'NQ 12-19' stock = 'Buy' price limit = 7679.25 price Stop = 0 quantity = 1 type = 'Limit' time in effect = GTC Oco = '' executed = 1 execution price = 7679.25 error = 'No error' native error = ''
    11:00:26 Order Order ='1117942614 / xxxxxx' name = '' new state = 'Working' instrument = 'NQ 12-19' stock = 'Buy' price limit = 7679.25 price Stop = 0 quantity = 1 type = 'Limit' time in effect = GTC Oco = '' executed = '' executed = 0 error = 'No error' native error = ''
    11:00:26 Order Order ='1117942614 / xxxxxx' name = '' new state = 'Accepted' instrument = 'NQ 12-19' stock = 'Buy' price limit = 7679.25 price Stop = 0 quantity = 1 type = 'Limit' time in effect = GTC Oco = '' executed = '' executed = 0 error = 'No error' native error = ''
    11:00:25 Instrument position = 'NQ 12-19' account = 'xxxxxx' average price = 7679.25 quantity = market position 1 = Long operation = Operation_Add
    11:00:25 Order Order ='3c4f5e3b944f4f4a95d72ef628027503 / xxxxxx' name = '' new state = 'Submitted' instrument = 'NQ 12-19' stock = 'Buy' limit price = 7679.25 Stop price = 0 quantity = 1 type = 'Limit' time in effect = GTC Oco = '' executed =0 execution price = 0 error = 'No error' native error = ''
    11:00:25 Dynamic Order SuperDOM Send order without strategy

    Who is this user's broker? With Rithmic based connections and Interactive Brokers, due to the provider API design these adapters do not guarantee the sequence of events of OnOrderUpdate, OnExecution, and OnPositionUpdate.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate, thanks for your reply,

      The broker is One up Trader.

      I had a code premise that the order counts. So, I have to change that.

      Very sad!

      Thank you

      Comment


        #4
        Hello Rudmax,

        Thank you for your reply.

        OneUpTrader is indeed a Rithmic based connection, so yes, this is expected.

        Please let us know if we may be of further assistance to you.

        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WHICKED, Today, 12:56 PM
        2 responses
        15 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Felix Reichert, Today, 02:12 PM
        0 responses
        1 view
        0 likes
        Last Post Felix Reichert  
        Started by Tim-c, Today, 02:10 PM
        0 responses
        1 view
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        49 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X