SwiggitySwerve

TD SAR-Quential

First version of using the TD Sequential system in tandem with the Lucid SAR developed by Casey Bowman & Co. and used by many (Credits in the indicator code)
Release Notes: Upgraded with options to have enter/exit maximum points on candle closes
Sadly the "Take Profit" points are not working, either there's some Pine Script syntax that I'm not aware of that lets you close percentages of your position (I'm using qty_percent in strategy.exit()) or it's just broken and I can't exactly prove it.
Release Notes: Cleaned up a few things
Release Notes: Fixed all the Take Profit points to work as expected, this is designed to be offset by a minimal amount for placing limit orders to avoid taker fees

There are some conditions that have exits and entries on the same candle and I'm still working to figure out if those are correct according to the system itself.

For now it's 95% polished for the base functionality
Release Notes: Small fix on the SAR Exit conditions, combined them because if they aren't used this way then the SAR can flip but the exit point can be missed
It's a small detail of calculation but it improved some of my results up to +50%!
Release Notes: Features Added:
  • Ability to enable/disable longs or shorts
  • SMA Threshold to plot if the current trend is above or below to signal a trend towards longs or shorts
Release Notes: Fix some weird issue when only enabling just short or long that would stop the order chain from continuing past the first dozen or so which was throwing off results
Release Notes: Cleanup on input numbers and SMA start point as well as exit conditionals
Release Notes: Fix default input values and strategy defaults, SAR exit order on strategy, etc.
Release Notes: Default change
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?