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 AaronKoRn, Today, 09:49 PM
    0 responses
    6 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,976 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X