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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    91 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X