Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Making the STOP LOSS fills of the Backtest More Accurate

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

    Making the STOP LOSS fills of the Backtest More Accurate

    Hi,

    to benefit from the OHLC points of a minute bar and to make the STOP LOSS triggers more accurate on the backtest, I want to convert the following line in our general stop loss management code (the line in bold):

    private void PlaceStopLong(double stopPrice, int offset)
    {
    if (Closes[1][0] <= stopPrice)
    {
    if (stopOrder == null)
    {


    Would we achieve the desired triggering of the STOP LOSS order based on the OHLC of a candle, if the line is converted to (Low[0] <= stopPrice) for longs, and (High[0] >=stopPrice) for shorts. And if not, what line would you recommend to make sure that the High and Low points of a bar and not just the close is taken into account when checking for STOP LOSS on the backtest fills ?


    Best,
    Vispilio

    #2
    Hello Vispilio,

    Thank you for your post

    Please let me know if you would prefer to work her eon the forum or continue by email as we have earlier today.

    I would have to understand the full context of what this line does. Can you provide the remaining code?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    86 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    67 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X