Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is AverageFillPrice available after EnterLong?

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

    Is AverageFillPrice available after EnterLong?

    I'm entering at market with a price-based stoploss. I want to scalp out one contract at 1:1 R/R.

    If I EnterLong and hold an order reference, e.g.:

    var order = EnterLong();

    am I able to immediately access the order.AverageFillPrice property? Or will this be unavailable until the OnOrderUpdate callback?

    This is roughly what I want to do:

    Code:
    var stopPrice = DonchianChannel(3).Lower[0];
    var scalpEntry = EnterLong(1, "Scalp");
    var entryPrice = scalpEntry.AverageFillPrice; // is this value guaranteed to be available at this point?
    var target = entryPrice + Math.Abs(entryPrice - stopPrice);
    SetProfitTarget("Scalp", CalculationMode.Price, target, false);

    #2
    Hello kevinenergy,

    Thanks for the post.

    As long as the Order object is not null it will hold information on the order. It would be recommended to wait for OnOrderUpdate to get any information from the Order object. The order will appear instantly with the Sim101 account, but that behavior could vary while trading live.

    Please let me know if I can assist further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X