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, 05-11-2026, 05:56 AM
    0 responses
    67 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    202 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    366 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X