I have a question about filling orders. In some cases when a position is taken the market turns on you before hitting the first (small) target and never comes back (false move). You end up losing all your positions against your StopLoss price. Creating a very tight StopLoss protects you against big losses, but will often stop you out too early in a potential good trade.
Question: Would it be possible to make a Limit order that looks at the direction it is appoached?
Example for long order:
1. Go long conditions are met
2. Submit Limit order few Ticks below the market
3. Market goes down below the Limit price
4. Limit order does not get filled yet!
Scenario 1:
5. Market turns up before hitting the StopLoss
6. Go long conditions are still met
7. Market hits Limit price and order gets filled
8. Market keeps on rising making a good trade!
Scenario 2:
5. Market does not turn up
6. Go long conditions are no longer met
7. Limit order will be cancelled
8. It was a false move but no money lost!
To my knowledge there is no standard order type with that behavior. Are there any suggestions for some code that simulates this behavior? It should work with 'calculate on bar close' too!