Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
It doesn’t do quite what I want, but I’m hopeful I can use it as a guide to creating what I do want.
In the long case, I am looking to code a trailing stop based on the most recent low.
For me, an up move persists for as long as each candle takes out the high of the preceding candle. When a candle fails to take out the high of the preceding candle, in my definition, this is the start of the pullback.
When that previous high is taken out, then the pullback is over, and the most recent low is the lowest point between the previous high, and the point where it was taken out.
Sometimes the pullback is just one candle so the most recent low is simply the low of that candle.
I know this is perhaps a slightly unusual way to define structure, but for me (trading M5 and M15), this exit has given the best results of any method I’ve tested.
It seems to be impossible to code though (for me at least!).
It’s not quite spotting the most recent lows by my rules. Taking the last one at 467 as an example, rather than the low being the low of the big red candle, it would actually be the low of the green candle two bars back, because the bar before that failed to take out the high of the previous candle, which means it is the start of the pullback. Then the green candle made a lower low before the following red candle took out the high, indicating the pullback is over.
The low is the lowest point between the old high (red candle 3 bars after the run of green candles), and the new high which took that out. In this case, it’s the low of the green, round about 475.