Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Account.ExecutionUpdate , determining entry and exits

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

    Help with Account.ExecutionUpdate , determining entry and exits

    i am writing some code to send tweets, I have it mostly working. if e.execution.IsEntry send tweet then another if e.execution.IsExit send tweet. Example I short ES and it sends tweet ES Short @ 4001 then I exit the position with Close and I get tweet: ES exited at 3990 then i also get tweet: Long at 3990 how do eliminate the second tweet, mind you i could be making multiple entries at different times then closing them at different times, i thinking i need a unique identifier.

    #2
    Hello set2win,

    You would likely need to use some form of your own logic to determine the tweet was already sent or use the Long execution event instead.

    If you are using the execution update event that will catch all executions so the code would be called each time an execution is observed and multiple times for part filled orders. You can use a Print to print out the execution information to see exactly what series of events is happening and also to see the values of the execution. That may help to form logic to filter the specific execution's you wanted to know about. You can see the avaliable properties here: https://ninjatrader.com/support/help...tsub=execution

    Comment


      #3
      thinking of some kind of array variable that gets flushed each day, then as each trade entry is made it populates the array ie tradeEntry = Count1, Count2, then a check if not found send tweet, is this over thinking it

      Comment


        #4
        Hello set2win,

        That could work depending on what executions you need to track. The best way forward would be to use prints to identify the specific events for each scenario you wanted to track and then use that information to build out your logic. You can use any C# code you want to complete the task which could include arrays or lists to keep track of what has been observed already.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X