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 Tburg1073, Today, 08:36 AM
    0 responses
    5 views
    0 likes
    Last Post Tburg1073  
    Started by alexstox, 10-16-2018, 03:29 PM
    10 responses
    333 views
    0 likes
    Last Post Tburg1073  
    Started by smartromain, 03-13-2024, 01:42 AM
    6 responses
    98 views
    0 likes
    Last Post smartromain  
    Started by Jonker, 04-27-2024, 01:19 PM
    4 responses
    29 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Started by Yasharandom, Today, 07:45 AM
    0 responses
    5 views
    0 likes
    Last Post Yasharandom  
    Working...
    X