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

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
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Klaus Hengher, Yesterday, 03:13 AM
        2 responses
        15 views
        0 likes
        Last Post Klaus Hengher  
        Started by Sebastian - TwinPeaks, Yesterday, 01:31 PM
        2 responses
        12 views
        0 likes
        Last Post Sebastian - TwinPeaks  
        Started by wbennettjr, 07-15-2017, 05:07 PM
        16 responses
        2,527 views
        1 like
        Last Post eladlevi  
        Started by Human#102, Yesterday, 09:54 AM
        2 responses
        7 views
        0 likes
        Last Post Human#102  
        Started by Patlpp, 08-16-2021, 03:10 PM
        10 responses
        498 views
        0 likes
        Last Post Joerg
        by Joerg
         
        Working...
        X