Hi,
here I share a Discord Share Service developed with help AI tools like Perplexity and DeepSeek and that enables sharing charts to a Discord channel or server.
Summary of the Discord Share Service
The Discord Share Service is a custom NinjaTrader 8 component that sends text alerts and/or chart screenshots to a specified Discord channel using a webhook. It is called from indicators or strategies via Share("ServiceName", text, imagePath).
Core Capabilities:
-
Text Delivery: Sends alert text as a formatted Discord embed. It supports
**bold**markers natively, preserves line breaks, and escapes special characters (backslashes, quotes, newlines) to prevent JSON errors. It includes an optional title. -
Image Delivery: When an image path is provided, it is sent as a raw file attachment (not embedded). This means it appears full-width and borderless. The image is always placed above the text block.
-
Color Customization: The embed features a configurable accent color on its left border, selectable via NinjaTrader’s color picker.
Configuration Layout:
-
Credentials Group: Webhook URL, Color, plus NinjaTrader’s built-in Service name and Default fields.
-
Default Values Group: Bot Name (display name in Discord) and Message Title (optional bold header).
Technical Design:
-
The color property includes a hidden serialization companion to ensure settings save correctly to NinjaTrader’s configuration file.
Enjoy the sharing possibilities provided by NT8.
@ProyectoROI25
