Support Board
Date/Time: Mon, 06 Jan 2025 10:47:05 +0000
Post From: Subgraphs blank until I reload
[2015-01-29 18:30:05] |
joshtrader - Posts: 494 |
Custom study. Code is very simple, really only 1 line, plots the % change. When I change the time frame, the study values disappear, and I have to "reload and recalculate" and they come back. Why is this? SCSFExport scsf_PercentChangeSinceClose(SCStudyInterfaceRef sc)
{ if(sc.SetDefaults) { sc.GraphName="Percent Change Since Close"; sc.StudyDescription="Calculates the percentage a stock is up or down, based on the prior close."; sc.AutoLoop = 1; sc.GraphRegion = 0; sc.FreeDLL = 1; sc.ValueFormat = 2; sc.Subgraph[0].Name = "Percent Change"; sc.Subgraph[0].PrimaryColor = RGB(100,100,100); // Gray sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE; return; } sc.Subgraph[0][sc.Index] = ((sc.Close[sc.Index] / sc.PreviousClose) - 1) * 100; } Date Time Of Last Edit: 2015-01-29 18:30:25
|