Support Board
Date/Time: Mon, 25 Nov 2024 02:45:36 +0000
Keyboard shortcut that will allow me to copy the ticker from a chart?
View Count: 237
[2024-04-01 22:18:14] |
User584005 - Posts: 27 |
Is there a way to select one of my charts and do a control-c to be able to copy the ticker the chart has open? Is there a study that might enable this or is it possible to do using ACSIL?
|
[2024-04-02 23:56:58] |
User584005 - Posts: 27 |
I was able to write a script that saves the ticker to a text file and i can use other apps to get the ticker. However the file just constantly updates what whichever chart the study is on. Does anyone know of a way I can force this script to run only when i want it to. Maybe something like stamping a marker on the chart will tell it to export that ticker symbol to the file. #include "sierrachart.h"
SCDLLName("CopyTickerToClipboardDLL") // This line names your DLL SCSFExport scsf_CopyTickerSymbolToFile(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "Copy Ticker Symbol To File"; sc.StudyDescription = "Writes the chart's ticker symbol to a text file."; sc.GraphRegion = 0; sc.UpdateAlways = false; sc.AutoLoop = false; return; } // Main code execution SCString tickerSymbol = sc.Symbol; // Specify the path to the text file SCString filePath = "C:\\SierraChart\\SierraChartInstance_2\\SymbolOutput.txt"; // Open file stream std::ofstream outputFile(filePath.GetChars(), std::ios::out); if(outputFile.is_open()) { outputFile << tickerSymbol.GetChars(); outputFile.close(); // Optionally, log to Sierra Chart Message Log SCString logMessage; logMessage.Format("Ticker Symbol %s written to file.", tickerSymbol.GetChars()); sc.AddMessageToLog(logMessage, 0); } } |
[2024-04-03 00:38:17] |
Sierra_Chart Engineering - Posts: 17166 |
To answer your last question, refer to: Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events Your ACSIL function can also copy it to the Windows clipboard. There is a Windows API function for that. 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: