Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Blew through stop...

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

    Blew through stop...

    Backtesting a large basket of stocks. I have a set .75 stop loss as shown below based on 1minute bars. On 7/19/12 at 11:18 ticker APC dropped about 3.5pts in 4minutes. It blew right through my stop. Is there any way to avoid this or handle it in a better way? Also I figured in backtesting it would not bypass the stop like it would live?

    for(int i = 0; i < 280; i++)
    if ((BarsInProgress == i + 280)&& (Position.MarketPosition == MarketPosition.Long)
    && Closes[i+280][0] < Position.AvgPrice - .75)//StopLoss
    {
    ExitLong(i+280, 200 , "StopLoss"+i, "EnterLong"+i);
    }

    #2
    Delta007, that's just a market order you issue when triggered - so the bar after the condition to do so became true in backtesting. So that outcome would be expected.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    77 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    27 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
    62 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X