Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart doesnt show trade

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

    Chart doesnt show trade

    I loaded my strategy and it took the trade when it should ...sent to my broker... also same strategy is loaded on tradingview.. it also took the trade... the log file shows it took the trade.. however later on when i reload the strategy it doesnt show it anymore on the chart.. even the candles etc are the same? Why would it disappear from screen now when strategy is enabled later on or screen was refreshed.. out put still shows it i believe
    Attached Files
    Last edited by SevanKambel; 03-30-2023, 06:33 PM.

    #2

    Comment


      #3
      Hello SevanKambel,

      You need to leave the strategy enabled to be able to view its performance, if you reload the strategy that will clear the previous trades it made and then it has to re process the historical data again. If the strategy doesn't work exactly the same historically as it did in realtime then it may not re produce the same trade on the chart. The live trade it originally made would now be considered a historical trade when the strategy processes that time again, if it does not place a historical trade during processing then nothing will appear on the chart.
      JesseNinjaTrader Customer Service

      Comment


        #4
        can i go back and see these historical trades on the chart? Its weird some stay but some disappear when i re enable the strategy ..almost makes me afraid its not working properly as now its saying it wouldnt have taken that trade.. or atleast thats how that appears

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello SevanKambel,

          You need to leave the strategy enabled to be able to view its performance, if you reload the strategy that will clear the previous trades it made and then it has to re process the historical data again. If the strategy doesn't work exactly the same historically as it did in realtime then it may not re produce the same trade on the chart. The live trade it originally made would now be considered a historical trade when the strategy processes that time again, if it does not place a historical trade during processing then nothing will appear on the chart.
          So realistically your back-test are not accurate??

          Comment


            #6
            Originally posted by SevanKambel View Post
            So realistically your back-test are not accurate??
            Of course, it is not accurate. Does that surprise you?

            But now you have to define what you mean by 'accurate'?

            If you want 100% accuracy, forget it. Live markets have too many
            movements where sitting orders are left behind. Consider when
            market price changes direction, some sitting orders may get filled
            at the 'turning' price and some may not -- some may partially fill.

            The point is, you may see live market price 'touch' your limit order
            or stop order price, but yet your order does not fill.

            How should back-testing software mimic that?

            Back-testing should always be taken with a grain of salt.

            Comment


              #7
              Hello SevanKambel,

              You can use the New -> Trade Performance to view the actual live trades your strategy made, that view will contain all execution data.

              Its weird some stay but some disappear when i re enable the strategy ..almost makes me afraid its not working properly as now its saying it wouldnt have taken that trade.. or atleast thats how that appears
              That can happen based on what you coded and what settings you are using. A very simple example would be running a strategy that uses OnEachTick calculation in realtime. Historically that property is not available because historical data is less granular than realtime, that would result in the strategies OnBarUpdate code being run differently for historical bars and realtime bars. That would produce the result that you are seeing where in realtime the condition becomes true at a certain time but when you re run the strategy it no longer places a trade at that time. The problem is not that the backtest is not accurate the problem is that the code was executed differently based on the settings of the strategy. That is very likely what you are seeing based on either the settings you are using or the condition/code in the script.

              Here is a good post about the differences that you would see between historical and live modes which includes details on how you can debug your code to better understand the differences that you see: https://ninjatrader.com/support/foru...ay-performance

              You can also find some common discrepancies that you would run into here: https://ninjatrader.com/support/help...lightsub=discr
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by traderqz, Yesterday, 09:06 AM
              3 responses
              20 views
              0 likes
              Last Post NinjaTrader_ThomasC  
              Started by f.saeidi, Today, 10:19 AM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by kujista, Today, 06:23 AM
              5 responses
              15 views
              0 likes
              Last Post kujista
              by kujista
               
              Started by traderqz, Today, 12:06 AM
              3 responses
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by RideMe, 04-07-2024, 04:54 PM
              5 responses
              28 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X