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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    71 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X