Support Board
Date/Time: Tue, 26 Nov 2024 00:55:33 +0000
Post From: Volume by Price - Valleys and Peak data not on spreadsheet
[2020-10-30 19:34:13] |
BreadWinner'sAssoc. - Posts: 7 |
@User355030 I didn't post my complete code. Here is the complete code if you want to compile and test it :) Make sure you set the region to 1 to overlay the main price graph. SCSFExport scsf_PeakValley(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "PeakValley Test"; sc.AutoLoop = 0; sc.Input[0].SetStudyID(1); sc.Input[0].Name = "Volume by Price Study"; sc.Subgraph[0].Name = "Line1"; sc.Subgraph[0].PrimaryColor = RGB(0, 255, 0); sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE_FROM_END_OF_CHART_LEFT_TO_RIGHT; sc.Subgraph[1].Name = "Line2"; sc.Subgraph[1].PrimaryColor = RGB(255, 255, 0); sc.Subgraph[1].DrawStyle = DRAWSTYLE_LINE_FROM_END_OF_CHART_LEFT_TO_RIGHT; return; } float PeakValleyLinePrice = 0; int PeakValleyType = 0; int StartIndex = 0; int PeakValleyExtensionChartColumnEndIndex = 0; if (sc.GetStudyPeakValleyLine(sc.ChartNumber, sc.Input[0].GetStudyID(), PeakValleyLinePrice, PeakValleyType, StartIndex, PeakValleyExtensionChartColumnEndIndex, -1, 0)) { sc.Subgraph[0][sc.Index] = sc.GetStudyPeakValleyLine(sc.ChartNumber, sc.Input[0].GetStudyID(), PeakValleyLinePrice, PeakValleyType, StartIndex, PeakValleyExtensionChartColumnEndIndex, -1, 0); } sc.Subgraph[1][sc.Index] = PeakValleyLinePrice; } |