Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 16:57:30 +0000



[Programming Help] - Remote Build question

View Count: 458

[2023-07-28 06:54:51]
Andre - Posts: 31
Hi,

I tried to build a DLL and followed the step by step instructions. But when i hit remote build, nothing ever happens. As i understand, if there were an issue, it would tell me in the "Build Output" but nothing shows up there. So, can you point me to what i am missing? This is my first DLL so any help/pointers would be greatly appreciatted.
[2023-07-28 06:57:05]
Andre - Posts: 31
This is the updated code I was trying to use. The build worked on another example yesterday but once added to the chart, nothing happended and the window did not display any buy/sell buttons so I deleted it. This is a simpler version but I do not know why it does not get compiled, or how long it takes to remote build it.
Date Time Of Last Edit: 2023-07-28 07:39:45
attachmentSizeRandomizer.cpp - Attached On 2023-07-28 07:39:41 UTC - Size: 2.39 KB - 146 views
[2023-07-28 12:26:03]
Andre - Posts: 31
Sorry to bother you. I am not a programmer so i asked ChatGPT to help but had no luck. I do not think it is a big task for someone who has knowledge with ACSIL but i might be off here.

Here is what i asked ChatGPT and what I am trying to do. Basically, the study should randomize trade sizes between the current position and a maximum position definded i the settings. ChatGPT's answer is attached as well.

Any pointers to the correct structure and/or corrections would help a lot. Thank you very much in advance for your help!





Hi. You are a senior C++ programmer tasked with building a custom study in Sierra Chart using their ACSIL language. Your code will be used to randomize the trade size.

It must do the following:
1)The user will use "Trade Window" function built into Sierra Chart. So you will need take that into consideration.

2) In the "Trade Window" functionality in Sierra Chart, one can manually specify contracts to trade. Your code will have to automatically change the quantity after every buy or sell order to a random contract size between 1 and 6, while keeping track of the current open position and a maximum position allowed, which the user can define in the "Settings and Input" section of the study. That means if the current open position is 8 contracts and the defined maximum is 12, your code must recognize that the maximum trade size can not be more than 4 contracts and therefore, choose a contract size between 1-4 in this case.

3) The user needs to be able to define the maximum position allowed in the study's 3) The user needs to be able to define the maximum position allowed in the study's "Settings and Input" section.

To give you a better idea of what is expected here is an example of a "Buy" trade:

a) the user has currently no position and your code as randomly chosen to set the trade size in the "Trade Window" to 2 contracts based on the above restriction to choose between numbers 1-6.

b) The user clicks the Buy button on the "Trade Window" and 2 contracts get executed.

c)Your code must now recoginze that the open position is 2 contracts while keeping in mind that it can not trade over the amount specified in the "Settings and Input" menu of the study. For this example lets use 12 contracts as the maximum defined by the user in the "Settings and Input" section of the study.

d) Let's assume your code now chose 6 contracts as trade size and this too gets traded which brings us to a total of 8 contracts on the open position.

e) your code now must recognize that a trade size of 6 would equal to a higher open position than was defined in the "Settings and Input" section of the study and therefore, the your code can only set the next trade size to 1-4 contracts.

f) now, let's assume your code set the trade size to 4 and it gets executed. This means, the open position matches the maximum open position as defined in "Settings and Input" section of the study. Therefore, the code has to recognize that and instead of executing further trade, it has to send a message to the user that the maximum open position is reached and no trades will be executed.

I hope this example was helpful and I am sure you, as a senior C++ programmere with knowledge of ACSIL will be able to achieve that. If you have any questions, please refer to the Sierra Chart user guide for answers.

Thank you
attachmentRandomTradeSizeStudy.cpp - Attached On 2023-07-28 12:25:55 UTC - Size: 1.69 KB - 162 views
[2023-07-28 23:44:28]
ForgivingComputers.com - Posts: 960
Contact me if you are interested in a quote to fix this.

brad (at) forgivingcomputers (dot) com

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

Login

Login Page - Create Account