Support Board
Date/Time: Wed, 25 Mar 2026 09:08:37 +0000
Post From: Fair Value Gap indicator
| [2026-02-22 12:34:38] |
| SchulzMatthias - Posts: 4 |
|
Here is my optimized code for Sierra Chart ARM. GI has written the code to be more CPU and memory-friendly than the previously pinned code (CPp file). #include "sierrachart.h" #include <vector> #include <algorithm> SCDLLName("FairValueGap_Optimized") struct FVGRectangle { int LineNumber; int BeginIndex; float BeginValue; float EndValue; bool IsFilled; bool IsUp; }; SCSFExport scsf_FVG_ARM_Optimized(SCStudyInterfaceRef sc) { SCInputRef EnabledUp = sc.Input[0]; SCInputRef ColorUp = sc.Input[1]; SCInputRef EnabledDn = sc.Input[2]; SCInputRef ColorDn = sc.Input[3]; SCInputRef Transparency = sc.Input[4]; SCInputRef ExtendUntilFilled = sc.Input[5]; SCInputRef MinTicks = sc.Input[6]; if (sc.SetDefaults) { sc.GraphName = "FVG Optimized"; sc.AutoLoop = 0; sc.GraphRegion = 0; EnabledUp.Name = "Bullish Gaps Aktiv"; EnabledUp.SetYesNo(1); ColorUp.Name = "Bullish Farbe"; ColorUp.SetColor(RGB(0, 120, 255)); EnabledDn.Name = "Bearish Gaps Aktiv"; EnabledDn.SetYesNo(1); ColorDn.Name = "Bearish Farbe"; ColorDn.SetColor(RGB(255, 50, 50)); Transparency.Name = "Transparenz (0-100)"; Transparency.SetInt(70); ExtendUntilFilled.Name = "Erweitern bis Gap gefüllt"; ExtendUntilFilled.SetYesNo(1); MinTicks.Name = "Mindestgröße in Ticks"; MinTicks.SetInt(1); return; } std::vector<FVGRectangle>* p_Gaps = (std::vector<FVGRectangle>*)sc.GetPersistentPointer(0); if (!p_Gaps) { p_Gaps = new std::vector<FVGRectangle>(); sc.SetPersistentPointer(0, p_Gaps); } if (sc.IsFullRecalculation Date Time Of Last Edit: 2026-02-22 12:36:35
|
