Support Board
Date/Time: Sun, 12 Jan 2025 11:46:42 +0000
Post From: How to set condition to trigger email?
[2016-09-28 07:54:30] |
User701247 - Posts: 117 |
I would like to know on what wrong it is: 1) Build Custom Studies DLL 2) Select Analysis >> Studies on the menu. Press the Add Custom Study... button. Locate the name of your advanced custom studies DLL file in the list of studies. It will have the name specified in the CustomDLLName() code line. Press the plus sign (+) by it, and select the study you just made (Example: My New Study Function). Press the Add button to add the selected study to the list of studies on the chart, and press the OK button on the Chart Studies window to apply it to the chart. Your new study is now on the chart and fully calculated. 3) the Chart show nothing at all Do I place the code on the wrong place? Do you have any suggestions on what wrong it is? Thank you very much for any suggestions :> // The top of every source code file must include this line #include "sierrachart.h" // For reference, refer to this page: // Advanced Custom Study Interface and Language (ACSIL) // This line is required. Change the text within the quote // marks to what you want to name your group of custom studies. SCDLLName("Custom Study DLL") //This is the basic framework of a study function. Change the name 'TemplateFunction' to what you require. SCSFExport scsf_TemplateFunction(SCStudyInterfaceRef sc) { // Section 1 - Set the configuration variables and defaults if (sc.SetDefaults) { sc.GraphName = "Template Function"; // During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance. sc.FreeDLL = 1; sc.AutoLoop = 1; //Automatic looping is enabled. sc.Subgraph[0].Name = "Name"; sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE; sc.Subgraph[0].PrimaryColor = RGB (0, 255, 0); sc.Input[0].Name = "Float Input"; sc.Input[0].SetFloat(0.0f); return; } // Section 2 - Do data processing here // Get the sum of the volumes from all of the prices at this bar by using sc.VolumeAtPriceForBars->GetNextHigherVAPElement() unsigned int TotalVolume = 0; int CurrentVAPPriceInTicks = INT_MIN ; // This will be incremented from the lowest to highest price tick in the bar const s_VolumeAtPriceV2 *p_VolumeAtPrice; while (sc.VolumeAtPriceForBars->GetNextHigherVAPElement(sc.Index, CurrentVAPPriceInTicks, &p_VolumeAtPrice)) { TotalVolume += p_VolumeAtPrice->Volume; //Calculate the price. This requires multiplying p_VolumeAtPrice->PriceInTicks by the tick size float Price = p_VolumeAtPrice->PriceInTicks * sc.TickSize; //Other members available: //p_VolumeAtPrice->AskVolume; //p_VolumeAtPrice->BidVolume; //p_VolumeAtPrice->NumberOfTrades; } } Date Time Of Last Edit: 2016-09-28 07:55:36
|
Sampe1.cpp - Attached On 2016-09-28 07:50:29 UTC - Size: 1.99 KB - 378 views Sample.png / V - Attached On 2016-09-28 07:55:29 UTC - Size: 64.97 KB - 305 views |