Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 23:50:25 +0000



Customizable Report that Returns Values from Spreadsheet for Trading when Buy Entry K3=1

View Count: 466

[2022-12-31 00:45:16]
PeaceFrog - Posts: 105
Hello,

Is there a way that Sierra Chart can produce a customizable report along the lines of the “Trade Activity Log” that will return the values from the Spreadsheet for Trading, for example the values in ID2.SG1@3, ID2.SG3@3, etc…, when a Buy in K3 and Sell in L3 occurs?

Thank you kindly.
[2022-12-31 08:01:03]
User183724 - Posts: 183
you could write an ACSIL study to do this. the ACSIL study would read the K3 L3 etc as input and if true, read all the ID2 ID3 etc as input and output to a CSV / text disk file.

there are some examples to get started with in the ACS_Source directory of your Sierra Charts.
[2023-01-10 16:47:27]
PeaceFrog - Posts: 105
Thank you for responding. I really appreciate it.

The solution you describe sounds like exactly what I’m looking for.

I’m an absolute beginner when it comes to ACSIL and am unsure which of the file(s) in the ACS-Source directory have this foundation. Would you kindly suggest a couple, that way I will have a starting point and can work towards figuring it out from there.

Again, thank you very much for your help.
[2023-01-10 17:34:23]
User183724 - Posts: 183
ACSILSpreadsheetInteraction.cpp is the example for reading writing to spreadsheets

you'll also need to read the other study info and the functions needed to do that would depend on if the study to be read is attached to the same chart or read from a different chart. there are examples of both in the ACS_Source directory. good luck
[2023-01-10 17:57:08]
PeaceFrog - Posts: 105
Great. Thank you.

All the study info I want to have this Study produce in a CSV file are all in one chart (I'm using Study/ Price Overlay to gather data from other charts into one chart), so sounds like that might make things easier.

I've opened "ACSILSpreadsheetInteraction.cpp" and it looks like a fairly basic study. I don't recognize anything in it that would suggest it pulls data from a chart and then produces a CSV file.

What are the examples in the ACS_Source directory you mentioned that do this? I think from there, once I can see which Functions are being used and figure out how they work, I might be able to pull this off.

Again, thank you very much.
[2023-01-10 18:14:06]
PeaceFrog - Posts: 105
I forgot to ask as well, is there a study in "customchart.cpp", "studies.cpp", "studies2.cpp", "studies4.cpp", "studies5.cpp", "Studies6.cpp", "studies7.cpp", "studies8.cpp", "ExampleCustomStudies.cpp" or "systems.cpp" or any other ".cpp" that you know of that I can use as a guide?

Thank you.
[2023-01-10 18:36:18]
User183724 - Posts: 183
ACSILSpreadsheetInteraction.cpp is just a simple primer to show how to read and write to a spreadsheet. you'll need several more lines of code to get what you want.


there are several examples using the function

sc.GetStudyArrayUsingID()

this is the function used to read the other study subgraph

it is one of several functions available. you can view the others here

sc.GetStudyArrayUsingID()

you can use the Notepad++ >> Search >> Find in files

to search files for examples of how to use most of the more common functions. use: C:\SierraChart\ACS_Source in the 'Directory' box.

good luck

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account