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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X