Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical Executions

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

    #16
    Alright ChrisL I went down the rabbit hole of looking for a solution and there's none. In order to overlay MES trades on the ES, the indicator needs historical trade information. Add a vote for me then :/
    Unsuitable
    NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

    Comment


      #17
      it’s been more than 3 years, how are doing with accessing historical executions from an add on

      Comment


        #18
        Originally posted by Pole123 View Post
        it’s been more than 3 years, how are doing with accessing historical executions from an add on
        I settled for trades within a session until Ninja added the functionality. At the very least the addon can be added after the fact and it will plot the executions (as long as it's the same session).
        Unsuitable
        NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

        Comment


          #19
          Hi, my add on needs to know the account profit factor for his whole history, you know anyway to get that? i could slowly save the trades the accounts makes but i wouldn’t know the profit factor before the add on was added

          Comment


            #20
            What do you mean by profit factor? As in the absolute profit or the R value, as in the ratio between risk and realized reward/loss?

            There are two workarounds. Either export the historical data to a spreadsheet and have the addon read the file. Or have the addon create a file (if one has not been created already), and add trades to that file as you go. I'd go with the second one as you don't have to worry about selecting the files, but the first one can get all the data in one shot.

            First Solution
            1. First step is to assign a file to read from. I don't know if that can be done from within the indicator parameters. But you could export the historical spreadsheet from trade performance. Rename it to "HistoricTrades". Move the file to the indicator folder. Then tell the indicator to look for a file with that name. Next, read that file
            2. Next parse through that data and add it to a list variable within the indicator.
            3. Next on the bar update (or close), check for new trades. Add it to the list
            4. From there use the data how you want.

            Second Solution
            1. The first step would be to create the file if it does not exist already. If one does exist, parse through each trade and add it to an accessible list variable within the addon.
            2. Next on the bar update (or close), check for new trades. Add it to the list and add it to the file.
            3. From there use the data how you want.

            These solutions require knowledge of how to read from a file. Low key you could just ask ChatGPT to produce a NinjaTrader8 addon that does xxx. When it first came out I asked to produce some of the commerical addons I offer. It wasn't perfect, but it gave me a clue where to start and would have been a major help during development.

            Hope this helps
            Unsuitable
            NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by llanqui, Today, 03:53 AM
            0 responses
            4 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            10 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Yesterday, 08:42 PM
            0 responses
            11 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Yesterday, 07:51 PM
            0 responses
            14 views
            0 likes
            Last Post strategist007  
            Working...
            X