Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ArrowLine End Bar

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

    ArrowLine End Bar

    Hello support --

    I used the following code to draw arrowline

    Execution eX;
    ent_time = eX.Time;
    double enter_double = eX.Price;
    DateTime bb = Time[20];
    IArrowLine enterArr = DrawArrowLine("enter", false, bb, enter_double+0.30, enter_time_dt, enter_double, Color.Crimson, DashStyle.Solid, 3);

    But some times the end of the arrow is placed on the one bar earlier then the bar of execution.

    What is the reason? How fix it?

    Thx

    #2
    Does this happen in real-time, or during backtesting?

    Is it your bb, or enter_time_dt which is off bar a bar? Or are they both shifted by one?

    How is enter_time_dt calculated? Is it also based from the execution event?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew --

      Actualy

      string enter_time = list_view.SelectedItems[0].SubItems[5].Text;
      DateTime enter_time_dt = DateTime.Parse(enter_time);

      but i think i doesn't matter.

      Some times the start bar and the end bar of arrow line are shifted, some times the end only

      Comment


        #4
        This is likely the timing of the fills. Please see the following thread which dicusses this in detail and let me know if you have any questions:

        Support for the development of custom automated trading strategies using NinjaScript.


        If you can clarify the condition in which it sometimes happens (real-time vs backtest) I'll be happy to offer further clarification.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        307 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        348 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        178 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X