Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Plot execution Markers move to wrong position

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

    Strategy Plot execution Markers move to wrong position

    Hi,

    I built a strategy which uses only the generic chart dataseries, (no additional dataseries), and doesn't use any external resources, such as indicator or so. Just the Strategy code. The only thing the strategy draws is changing the background color, when order is submitted using
    Code:
    BackBrushes[0] = entryStroke.Brush;

    No other Drawing or Rendering.

    I am using EnterLongMIT/EnterShortMIT and stop and target are set using Set StopLoss and SetProfitTarget
    Code:
    SetStopLoss(name, CalculationMode.Price, stopPrice, false);
    SetProfitTarget(name, CalculationMode.Price, targetPrice,TargetisMIT);
    owner.EnterLongMIT(qty, enterPrice, name);
    ​

    ​I am using the strategy in the chart with the Chart trader, and as you can see the trade markets move to the wrong position (wrong bar).

    Looking further into it, the trade markers are not scrolling with the chat, as the bars are created.

    Any idea?


    Click image for larger version  Name:	Screenshot 2023-04-21 at 20.36.20.png Views:	0 Size:	1.13 MB ID:	1247579
    Attached Files
    Last edited by Shai Samuel; 04-21-2023, 12:11 PM.

    #2
    Hello Shai Samuel,

    First, ensure that your PC Clock is in sync with internet time to the second.


    To confirm, this chart is showing all trades made in real-time correct?
    (Renko bar types do not backtest accurately so will not be accurate with )

    Last, with a renko bar type, it is completely expected orders can appear outside of the high and low of the bar, as the price can move outside of the bar without a new bar forming. Renko bars do not show the full price movement.

    Are you seeing that there is an execution with a specific time is not showing on the bar with a bar time stamp of after the execution time?
    Are you seeing this in the DataBox?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, thanks for your reply.

      I have 2 charts of different instruments, each using the strategy and running live data on a sim account. What you see is all trades made in realtime. The top chart has these issues, while the bottom one doesn't. Strange...

      As for the Ranko bar type, I am aware of the backtesting issue. Are you aware of any other similar bar type that has an offset and reversal. and is performing better?


      Click image for larger version

Name:	Screenshot 2023-04-21 at 21.32.08.png
Views:	196
Size:	898.5 KB
ID:	1247597

      Comment


        #4
        Hello Shai Samuel,

        These charts are very different.

        Is one missing data?

        If you reload all historical data are the charts the same?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea, They are 2 different Instruments. One is ES and the other NQ.

          Comment


            #6
            Hello Shai Samuel,

            I overlooked that.

            Real-time orders fill with real-time bid and ask prices and are not related to the bars on the chart.

            The bars would not be reflecting the full price movement. However, if you add a 1 tick ask series the buy executions should match up with the ask ticks, and if you add a 1 tick bid series the executions should match up with the bid ticks.

            To confirm, this only occurs with that bar type and is not experienced with a 1 minute chart, correct?

            Further, you have synced the PC Clock as directed and you are still able to reproduce with new real-time orders with the custom bar type?
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            23 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            120 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            63 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            45 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X