Support Board
Date/Time: Sat, 21 Dec 2024 17:51:55 +0000
Post From: Histogram
[2014-12-08 17:42:08] |
Sierra Chart Engineering - Posts: 104368 |
Actually, we realize what you want to do. Here is the source code which will accomplish this: SCSFExport scsf_VolumeWithNegativeDownVolume(SCStudyInterfaceRef sc) { SCSubgraphRef Volume = sc.Subgraph[0]; if (sc.SetDefaults) { sc.GraphName = "Volume - With Negative Down Volume"; sc.ValueFormat = 0; sc.AutoLoop = true; sc.ScaleRangeType = SCALE_AUTO; Volume.Name = "Volume"; Volume.DrawStyle = DRAWSTYLE_BAR; Volume.PrimaryColor = RGB(0, 255, 0); Volume.SecondaryColor = RGB(255, 0, 0); Volume.SecondaryColorUsed = 1; Volume.LineWidth = 2; Volume.DrawZeros = false; sc.DisplayStudyInputValues = false; return; } if(sc.Close[sc.Index] >= sc.Open[sc.Index]) { Volume[sc.Index] = sc.Volume[sc.Index]; Volume.DataColor[sc.Index] = Volume.PrimaryColor; } else { Volume[sc.Index] = sc.Volume[sc.Index] * -1; Volume.DataColor[sc.Index] = Volume.SecondaryColor; } } To compile this, refer to the documentation here: https://www.sierrachart.com/index.php?page=doc/doc_BuildCustomStudiesDLL.html Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |