Skip to content

Latest commit

Β 

History

History
63 lines (42 loc) Β· 3.76 KB

CStringUtils-README.md

File metadata and controls

63 lines (42 loc) Β· 3.76 KB

Sierra Chart Custom Studies

A collection of custom studies (ACSIL / C++) for Sierra Chart, built as compiled DLLs (Advanced Custom Study Interface & Language).

πŸ“ Contents

File Description
VolImbRenko.cpp Volume Imbalance detector for Renko-style bars. Flags consecutive same-color bars where the current bar's open gaps beyond the prior bar's close, marks them with a colored dot + horizontal line, and fires a Sierra Chart alert. Includes a helper for posting alerts to a Discord webhook.
SCStringUtils.cpp Standalone SCString helper library β€” string prefix/suffix checks, case conversion, trimming, find/replace, split/join, padding, and numeric/bool conversions for Sierra Chart's SCString type.

Update this table as you add more files β€” one row per study/file, with a short note on what it does.

πŸ—‚οΈ How This Repo Is Organized

  • Most .cpp files are standalone Sierra Chart custom studies (SCSFExport scsf_*), meant to be compiled into a DLL via Sierra Chart's Custom Study build process.
  • Some files (e.g. SCStringUtils.cpp) are shared utility code β€” not studies themselves, but helpers meant to be #included into a study source file.

πŸš€ Getting Started

These files are written against Sierra Chart's ACSIL API and require sierrachart.h (provided by a Sierra Chart installation) to compile.

  1. Clone this repo, or copy the desired .cpp file, into your Sierra Chart ACS_Source folder.
  2. Open Sierra Chart β†’ Analysis β†’ Build Custom Studies DLL, and build the file.
  3. Add the resulting study to a chart via Analysis β†’ Studies.
git clone https://github.com/your-username/your-repo.git

πŸ“„ File Notes

VolImbRenko.cpp

  • Study function: scsf_VolImbRenko
  • Detects "volume imbalance" candles: two consecutive bars of the same color where the current bar's open is beyond the prior bar's close (a price gap between bar bodies).
  • Draws a marker (DRAWSTYLE_POINT) above/below the imbalance bar and an AddLineUntilFutureIntersection line at the open price.
  • Fires sc.AlertWithMessage on new bars where an imbalance is detected.
  • Includes SendDiscordWebhook() for posting alert messages to a Discord webhook via sc.MakeHTTPPOSTRequest (not currently called from the study body β€” wire it in where you want notifications sent).
  • ⚠️ Heads-up: in both the green and red imbalance branches, hc2, lc2, hc3, and lc3 are declared twice in the same scope β€” this will fail to compile as-is. Remove the duplicate double hc2 = ... line in each block before building.

SCStringUtils.cpp

A grab-bag of SCString helpers, since ACSIL's SCString doesn't ship with much built-in string manipulation:

  • Checks: StartsWithSC, EndsWithSC, ContainsStringSC, EqualsIgnoreCaseSC
  • Case/whitespace: UpperCaseSC, LowerCaseSC, CapitalizeFirstSC, TrimSC
  • Search/replace: FindStringSC, ReplaceAllSC (SCString), ReplaceAllStr (std::string)
  • Split/join: SplitSC, SplitStringSC, JoinSC
  • Formatting/parsing: PadLeftSC, ToStringSC, ToDoubleSC, ToFloatSC, ToIntSC, ToBoolSC

Meant to be dropped into another study's source (or included as a shared header) rather than compiled as its own DLL β€” it has no SCSFExport entry point.

  • ⚠️ Note: SplitStringSC and SplitSC do the same thing (split on a char delimiter via std::getline) β€” likely redundant; consider keeping just one.

🀝 Contributing

If others can contribute, briefly note how (e.g., "Open an issue or submit a pull request"). Otherwise, delete this section.

πŸ“œ License

Specify a license if applicable (e.g., MIT, Apache 2.0), or note that this repo is for personal/reference use only.


Last updated: