Login Page - Create Account

Support Board


Date/Time: Fri, 23 Apr 2021 05:44:55 +0000



What should be the HINSTANCE value with Sierra Chart?

[2021-04-07 22:34:33]
User741184 - Posts: 35 | Ending Date: 2021-05-01
Hi,

I am creating a Window using CreateWindowEx() function from the Windows API and one of the parameters should be set to HINSTANCE value. What value should be given for it?
[2021-04-08 09:35:07]
User310645 - Posts: 15 | Ending Date: 2021-10-01
If you mean a new window for doing your own drawing then the Sierra exe handle. This can be obtained from the windows API call GetModuleHandle(NULL).

If common control windows (edit boxes/buttons etc) then the hInstance of the window you are drawing in. (ie the window provided by Sierra through SCStudyInterfaceRef.ChartWindowHandle or the above value for the new window).
[2021-04-08 15:01:08]
User741184 - Posts: 35 | Ending Date: 2021-05-01
Its a common control window with a table and few buttons on it. SCStudyInterfaceRef.ChartWindowHandle will be supplied as the Parent window handle. No? I have supplied SCStudyInterfaceRef.ChartWindowHandle as the Parent window handle but no idea what to supply for HINSTANCE value?
[2021-04-08 15:46:24]
Ticks - Posts: 17 | Ending Date: 2020-11-28 [Expired]
The experts at SC should just provide its paying customers an example .cpp file for creating a working form with edit boxes, labels and buttons on it.

They are the SC experts and probably could provide one in a few days instead of its paying customers having to struggle and beg fellow users for help.
[2021-04-08 16:12:41]
User310645 - Posts: 15 | Ending Date: 2021-10-01
I've only created either "top level" windows in which I've drawn my own GDI components or added common controls (ie. those from comctl32.lib) directly to an existing chart window.

In the first case the hWndParent would be NULL and the hInstance is the SierraChart.exe hInstance as described previously.
In the second, hInstance is NULL and hwndParent is the chart window handle.

Not being a windows GUI programmer and not knowing your use case I don't know if you mean you want to embed a window inside another and if this is possible. Maybe just draw the components directly to the chart window?

To add a comment to Ticks, to be fair to Sierra, this is Windows GUI programming. It has nothing to do with SierraChart so you can see why they wouldn't want to get bogged down answering general windows programming questions. There is already masses of information on the internet covering this especially Microsofts own documentation although I admit its sometimes difficult to find if you don't know what you're actually looking for.
[2021-04-09 01:54:45]
Ticks - Posts: 17 | Ending Date: 2020-11-28 [Expired]
@310645
Sierra Charts is a Windows GUI programming.
SC is built with C++ code and they are coding their own windows, forms, etc.
The "Trade Window" itself is a windows form.
So yes, they would be the best to provide a working example of creating a custom trade window.

already masses of information on the internet covering this
There are also masses of information on the internet covering how to trade.That hasn't stopped people from writing books and creating videos on it either.
[2021-04-09 02:27:37]
Sierra Chart Engineering - Posts: 95944 | Ending Date: 2022-04-10
So yes, they would be the best to provide a working example of creating a custom trade window.
There is an immense amount of complexity and code to this. And not really sure how it would be accomplished from ACSIL. We do not even really know ourselves.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2021-04-09 09:06:46]
Ticks - Posts: 17 | Ending Date: 2020-11-28 [Expired]
There is an immense amount of complexity and code to this. And not really sure how it would be accomplished from ACSIL. We do not even really know ourselves.

Thanks for the reply.
Would it be possible to provide a sample .cpp file that could interact with an strat? Such as change or override its default input variables?
I have attached a screenshot of a form that would be great if we could get a working example cpp file.

Note that I`m not asking SC to provide all the features on the form, but perhaps one of each button, input box, checkbox and display trade data.
Something we can expand upon on our own after that.
Just please give us a working example .cpp to work with.
Date Time Of Last Edit: 2021-04-09 09:41:22
imageexample form.PNG / V - Attached On 2021-04-09 09:07:51 UTC - Size: 57.72 KB - 18 views

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

Login

Login Page - Create Account