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 Kaledus, Today, 01:29 PM
    0 responses
    3 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by PaulMohn, Today, 12:36 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    18 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X