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

ghost profit?

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

    ghost profit?

    I do not know if it is the right place for this post.
    I'm doing demo tests for a bot, running in real time.
    Sometimes it happens that it reaches the profit long before the price arrives.
    I use the bot with the NTRenko10 filter.
    Does anyone know if the bug is the fault of the programming of the bot or the data (DEMO) of CQG?
    I attach images.
    Click image for larger version

Name:	YM target.jpg
Views:	1
Size:	322.5 KB
ID:	909056

    Click image for larger version

Name:	NQ target.jpg
Views:	1
Size:	294.1 KB
ID:	909057

    very thanks

    #2
    Hello franki,

    Sometimes is good to check a 1 tick ask or 1 tick bid chart at that time to see if there was a tick received at that price.

    The order if placed after real-time data is proceeded would be filling the orders using the real-time ask and bid prices.

    I would also check that the PC clock is in sync with internet time.

    Compare your PC Clock with https://www.time.gov/
    If you are not in sync:
    • Shutdown NinjaTrader
    • Right-click the clock in the lower right corner of your desktop -> Select Adjust date/time
    • If you are using Windows 10, click 'Additional date, time, & regional settings' -> then click 'Set the time and date'
    • Click on Internet Time tab
    • In the Server: drop-down select time.nist.gov
    • Click Update
    • If the message that appears says successful your PC clock should now be updated
    • If not, select a different server from the Server: drop-down and try again (repeat until one of the servers is successful)
    • Restart NinjaTrader
    • Connect to a data feed, then right-click the chart and select Reload All Historical Data


    Starting with Windows Vista and on through Windows 7 and 8, you can synchronize your clock with an internet-based server. This will ensure your computer time is always correct. Having the correct t…

    This tutorial will show you how to synchronize time with Internet time server and add the new time server using the Registry in Windows 10.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi!! ChelseaB, very thanks for your help

      Originally posted by NinjaTrader_ChelseaB View Post
      Hello franki,

      Sometimes is good to check a 1 tick ask or 1 tick bid chart at that time to see if there was a tick received at that price.

      The order if placed after real-time data is proceeded would be filling the orders using the real-time ask and bid prices.
      Graphs of ticks in real account or in real time?
      data feeds is the same in demo account and real account?
      attached tick images

      Originally posted by NinjaTrader_ChelseaB View Post
      I would also check that the PC clock is in sync with internet time.

      Compare your PC Clock with https://www.time.gov/
      If you are not in sync:
      • Shutdown NinjaTrader
      • Right-click the clock in the lower right corner of your desktop -> Select Adjust date/time
      • If you are using Windows 10, click 'Additional date, time, & regional settings' -> then click 'Set the time and date'
      • Click on Internet Time tab
      • In the Server: drop-down select time.nist.gov
      • Click Update
      • If the message that appears says successful your PC clock should now be updated
      • If not, select a different server from the Server: drop-down and try again (repeat until one of the servers is successful)
      • Restart NinjaTrader
      • Connect to a data feed, then right-click the chart and select Reload All Historical Data


      Starting with Windows Vista and on through Windows 7 and 8, you can synchronize your clock with an internet-based server. This will ensure your computer time is always correct. Having the correct t…

      http://www.windows10update.com/2015/...t-time-server/
      my computer has always been well synchronized.
      Central European Time GMT + 1

      This bug is today when I've seen it in 2 instruments. But it may have happened many more times.
      I need to debug this error, to pass the strategy to the VPS test and later to a real account.
      Thx!
      Attached Files

      Comment


        #4
        Hi franki,

        We should still be able to see the execution marker on the ask chart.

        The order is a buy order to close a short position, is this correct?

        Buy orders fill at the ask. Where is this order on the ask chart?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hi franki,

          We should still be able to see the execution marker on the ask chart.

          The order is a buy order to close a short position, is this correct?
          Yes, the target it's buy order 75 ticks in short possition, but the short make 133 ticks

          Originally posted by NinjaTrader_ChelseaB View Post

          Buy orders fill at the ask. Where is this order on the ask chart?
          I add new images and log

          Enter Trade!
          Code:
          08/02/2018 15:28:05|1|32|Order='0f8ff1fb2e8c47f589f2bd6eedf68b0d/Sim101' Name='Sell short' New state=PendingSubmit Instrument='YM 03-18' Action=SellShort Limit price=24846 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:05|1|32|Order='0f8ff1fb2e8c47f589f2bd6eedf68b0d/Sim101' Name='Sell short' New state=Accepted Instrument='YM 03-18' Action=SellShort Limit price=24846 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:05|1|32|Order='0f8ff1fb2e8c47f589f2bd6eedf68b0d/Sim101' Name='Sell short' New state=Working Instrument='YM 03-18' Action=SellShort Limit price=24846 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:06|1|32|Order='0f8ff1fb2e8c47f589f2bd6eedf68b0d/Sim101' Name='Sell short' New state=Filled Instrument='YM 03-18' Action=SellShort Limit price=24846 Stop price=0 Quantity=1 Type=Limit Filled=1 Fill price=24846 Error=NoError Native error=''
          08/02/2018 15:28:06|1|16|Execution='82ab77f99f3648c3b4686118cef1b5b3' Instrument='YM 03-18' Account='Sim101' Exchange=Default Price=24846 Quantity=1 Market position=Short Operation=Insert Order='0f8ff1fb2e8c47f589f2bd6eedf68b0d' Time='08/02/2018 15:28:06'
          08/02/2018 15:28:06|1|64|Instrument='YM 03-18' Account='Sim101' Avg price=24846 Quantity=1 Market position=Short Operation=Insert Currency=Unknown
          08/02/2018 15:28:06|1|32|Order='966558939e554d36a7c1eb59d0dd7e6e/Sim101' Name='Stop loss' New state=PendingSubmit Instrument='YM 03-18' Action=BuyToCover Limit price=0 Stop price=24876 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:06|1|32|Order='5a6988e3cd7c48e29b1b19fc345a412c/Sim101' Name='Profit target' New state=PendingSubmit Instrument='YM 03-18' Action=BuyToCover Limit price=24771 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:06|1|32|Order='966558939e554d36a7c1eb59d0dd7e6e/Sim101' Name='Stop loss' New state=Accepted Instrument='YM 03-18' Action=BuyToCover Limit price=0 Stop price=24876 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:06|1|32|Order='5a6988e3cd7c48e29b1b19fc345a412c/Sim101' Name='Profit target' New state=Accepted Instrument='YM 03-18' Action=BuyToCover Limit price=24771 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:28:06|1|32|Order='5a6988e3cd7c48e29b1b19fc345a412c/Sim101' Name='Profit target' New state=Working Instrument='YM 03-18' Action=BuyToCover Limit price=24771 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          Exit Trade!
          Code:
          08/02/2018 15:30:02|1|32|Order='5a6988e3cd7c48e29b1b19fc345a412c/Sim101' Name='Profit target' New state=Filled Instrument='YM 03-18' Action=BuyToCover Limit price=24771 Stop price=0 Quantity=1 Type=Limit Filled=1 Fill price=24734 Error=NoError Native error=''
          08/02/2018 15:30:02|1|32|Order='966558939e554d36a7c1eb59d0dd7e6e/Sim101' Name='Stop loss' New state=PendingCancel Instrument='YM 03-18' Action=BuyToCover Limit price=0 Stop price=24876 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
          08/02/2018 15:30:02|1|16|Execution='75cb00f76a3246209b6f26bab5e845ca' Instrument='YM 03-18' Account='Sim101' Exchange=Default Price=24734 Quantity=1 Market position=Long Operation=Insert Order='5a6988e3cd7c48e29b1b19fc345a412c' Time='08/02/2018 15:30:02'
          08/02/2018 15:30:02|1|64|Instrument='YM 03-18' Account='Sim101' Avg price=24734 Quantity=0 Market position=Short Operation=Remove Currency=Unknown
          08/02/2018 15:30:03|1|32|Order='966558939e554d36a7c1eb59d0dd7e6e/Sim101' Name='Stop loss' New state=Cancelled Instrument='YM 03-18' Action=BuyToCover Limit price=0 Stop price=24876 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
          Although the error favors the trade, it distorts the real result.
          With the NQ instrument, it also happens the same and so I think it's not an isolated situation and this bug will be repeated
          Thx!!
          Attached Files

          Comment


            #6
            Hello franki,

            Thank you for your response.

            Is this the first occurrence you have seen of this on the Sim101 account for real-time executions?

            I would recommend repairing the database at this point but this would not correct any previous executions at the incorrect price level.

            What version of NinjaTrader 7 are you using? You can check this by going to Help > About in the Control Center.

            I look forward to your response.
            Last edited by NinjaTrader_PatrickH; 02-09-2018, 03:51 PM.

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello franki,

              Thank you for your response.

              Is this the first occurrence your have seen of this on the Sim101 account for real-time executions?

              I would recommend repairing the database at this point but this would not correct any previous executions at the incorrect price level.

              What version of NinjaTrader 7 are you using? You can check this by going to Help > About in the Control Center.

              I look forward to your response.
              Hello PatrickH
              Version NinjaTrader 64-bit 7.0.1000.37

              my system was formatted and installed all over again two months ago

              Thank you PatrickH

              Comment


                #8
                Hello franki,

                Thank you for your response.

                Have you seen this behavior occur previously? Have you seen it occur before or after your reinstalled two months ago?

                I look forward to your response.

                Comment


                  #9
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello franki,

                  Thank you for your response.

                  Have you seen this behavior occur previously? Have you seen it occur before or after your reinstalled two months ago?

                  I look forward to your response.
                  Hello PatrickH

                  I remember seeing that behavior before the reinstallation, but I did not give importance because the bot was not yet ready for the live market
                  Now I use another bot and I can discard relation with the previous bot and platform ninjatrader.
                  Before I used unirenko bars and now I use 10NTRenko bars
                  2 months ago I lived in another city and used another internet connection.
                  During today I have not appreciated any errors
                  Thank you PatrickH

                  Comment


                    #10
                    In your first post, you said "NTRenko10", and just now you said "10NTRenko".

                    Could you explain more? What exactly is the bartype you're using?

                    Are you trying to say your chart is using the standard NinjaTrader "Renko" bar with a BrickSize set to 10?

                    Backtesting a strategy with standard Renko bars does not give valid results.

                    Comment


                      #11
                      Originally posted by bltdavid View Post
                      In your first post, you said "NTRenko10", and just now you said "10NTRenko".
                      You can see the images of my first post.

                      Originally posted by bltdavid View Post
                      Could you explain more? What exactly is the bartype you're using?
                      I always refer to NTRenkocandele (being strict and exactly) value 10
                      Originally posted by bltdavid View Post

                      Are you trying to say your chart is using the standard NinjaTrader "Renko" bar with a BrickSize set to 10?
                      no, i'm never using stardar renko bars

                      Originally posted by bltdavid View Post
                      Backtesting a strategy with standard Renko bars does not give valid results.
                      The backtesting of the strategy is done in real time and is not done with "strategy analyzer"
                      You can check a high percentage of success, except when ghost targets occur
                      Have you seen this type of targets before?

                      thx bltdavid

                      Comment


                        #12
                        It is not an isolated incident
                        It continues to happen frequently

                        Today...
                        Attached Files

                        Comment


                          #13
                          Hello franki,

                          Thank you for your response.

                          As a test please try a new database by renaming your current database. You can rename your database by following the steps below.
                          • Shutdown NinjaTrader and Go to the Start Menu
                          • Select My Documents--> NinjaTrader 7--> DB--> NinjaTrader.SDF.
                          • Right click on NinjaTrader.SDF and select "Rename." *Name it "OLDNinjaTrader.SDF."
                          • Then restart the software and NinjaTrader will create a fresh database file to use

                          Please let me know if the behavior continues on the Sim101 account when trying a new database.

                          Comment


                            #14
                            Originally posted by NinjaTrader_PatrickH View Post
                            Hello franki,

                            Thank you for your response.

                            As a test please try a new database by renaming your current database. You can rename your database by following the steps below.
                            • Shutdown NinjaTrader and Go to the Start Menu
                            • Select My Documents--> NinjaTrader 7--> DB--> NinjaTrader.SDF.
                            • Right click on NinjaTrader.SDF and select "Rename." *Name it "OLDNinjaTrader.SDF."
                            • Then restart the software and NinjaTrader will create a fresh database file to use

                            Please let me know if the behavior continues on the Sim101 account when trying a new database.
                            Hello PatrickH

                            After having followed your advice
                            the same error continues to appear in the target
                            Thx
                            Attached Files

                            Comment


                              #15
                              Hello franki,

                              Thank you for your update.

                              So the strategy is running on the custom bar type in these instances, correct? Do you continue to see the issue if the strategy runs on the Renko bars type or something simple like a 1 Minute bars type?

                              I look forward to your response.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by rtwave, 04-12-2024, 09:30 AM
                              2 responses
                              19 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Started by tsantospinto, 04-12-2024, 07:04 PM
                              5 responses
                              67 views
                              0 likes
                              Last Post tsantospinto  
                              Started by cre8able, Today, 03:20 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post cre8able  
                              Started by Fran888, 02-16-2024, 10:48 AM
                              3 responses
                              49 views
                              0 likes
                              Last Post Sam2515
                              by Sam2515
                               
                              Started by martin70, 03-24-2023, 04:58 AM
                              15 responses
                              115 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X