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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X