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 Taddypole, 04-26-2024, 02:47 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by futtrader, 04-21-2024, 01:50 AM
    6 responses
    58 views
    0 likes
    Last Post futtrader  
    Started by sgordet, Today, 11:48 AM
    0 responses
    4 views
    0 likes
    Last Post sgordet
    by sgordet
     
    Started by Trader146, Today, 11:41 AM
    0 responses
    5 views
    0 likes
    Last Post Trader146  
    Started by jpapa, 04-23-2024, 07:22 AM
    2 responses
    22 views
    0 likes
    Last Post rene69851  
    Working...
    X