@algoguy235 said in StopTrail(Limit):
@backtrader I have the same question as @Michael172.
No you don't. His question is about a specific approach to the market he has and you claim that Interactive Brokers is doing something ... but this isn't actually the case.
@algoguy235 said in StopTrail(Limit):
Why is the trailing stop based off close
It is not. Please read again the description of the functionality and the answer given above.
@algoguy235 said in StopTrail(Limit):
For example if my trailing stop is set to trailamount=20, if the high bar has a close of 2800, and a high of 2810, the stop price should be 2790. That's how IB implements a trailing stop.
This is plainly WRONG.
IB uses the LAST available price to calculate the stop. If it used the high it could be using a price which is very OLD and miles away from the current LAST price. This could lead to immediate execution of the Stop, which would make the trailing functionality *pointless
Even if it seems incredible, the LAST price is always the CLOSE price. In most cases it is just a temporary close because the current bar isn't closed. It can of course be the LAST, the CLOSE and the HIGH, all at the same time (and even the OPEN and LOW if one is operating only with ticks)