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 NullPointStrategies, Today, 05:17 AM
    0 responses
    43 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X