3600 times an hour???… Do you know how a trailing stop works…?
I think I do, yes.
But possibly you don’t;
Your code provides a
functional trailing stop. Not the Trailing Stop as how it can exist with PRT-IG. And thus :
Sell at newSL STOP
If your code would be able to sustain the trailing for an hour after it has begun (
and does not stop in between), it would mean …
60 times 60 new Pending Orders. Maybe that is not 3600 ?
What I also suggested in the other thread is that a 1 second system won’t do much for trailing. Yea, trail at a mile distance maybe, but people tend not do do that. So maybe you have been looking very hard for 6 pending orders in a row which change the price each 1 second. But … you could not find that and showed rows of changed trail prices “once per x seconds” (which is more than one).
What you do is change the trailing price now and then (once in a relative while). The effect ? your changed order has x seconds to be digested by the broker (and beyond). That is a lot more than one second (I hope you get the gist of
that).
So instead of me not knowing how a trailing stop works, you … bash as always. 🙁
Now try to explain to us how a Pending Order which lasts for 1 second is going to bring benefit. No need to put forward sample code like you did. Just explain to us how that would work. Because remember, that is the context in that other thread.
Maybe I can try something myself;
So we have a price at 5 points distance of my trail(ing price). In the most common circumstances this range is covered in say 10 seconds (or much more). So my trailing price at 5 points distance will never catch the falling price within the 1 second this pending order lasts.
The price goes up, and my trailing price goes up equally (or maybe parabolic, but this is not related for now). Next bar ? same problem. It is useless.
Alternatively we have a price at 0.5 points distance. Ah, now we’re talking because the price easily changes 0.5 points in 1 second. All good. So price moves up with 0.5 points, and so will my trail ? Yeah, in your dreams that is, because no price will move up 0.50 points while not going down again 0.75 points or more in that same 1 second (and up again). This is to be read as :
Your trail won’t do a thing because it always goes out right away at this small distance. See picture below (step is 0.25, time span is just over 1 second).
Maybe if you set the distance at 1.5 point, which normally is not met (say downwards) then you could hope for that spike down. But your hope is not worth much, because before that spike occurred, the price will just have gradually dropped and out you are. The trailing again does nothing.
Think of this last sentence please. This suggests trailing as how trailing normally works. This is not what you do in your program – there you shut it off. So no spike down will fall in any pending order. You thus do something else to get out. Also see your last picture and the 1 minute elapse time before you go out there. How ?? I like to learn.
Might you not get it in full yet – compare with a 1 minute system and a similar trailing means (may also be the real one from PRT-IG). Now things suddenly *do* work. Or does this need extra explanation ? Here too you may not always re-do the pending order. But when you do, now at least the pending order has a chance to catch the price.