Script name in the broker dll

Posted By: 7th_zorro

Script name in the broker dll - 02/14/21 11:00

Hi.

I am developing broker plugin dll.

I need user selected script name in the broker dll to manage orders separately.

I know there is custom brokerCommand to send some text to a broker dll, but that is not a mandatory functions, does not applied to all scripts.

Is there methods to recognise script name in the broker dll?

If not, please implement new brokerCommand function to send selected script name to a broker dll.

Thank you.
Posted By: jcl

Re: Script name in the broker dll - 02/15/21 11:30

I think a broker DLL that depends on the script name is a bad idea. Better set up the wanted behavior directly in the DLL, with a user command.

For sending text, use a command from 4000..5999.

Posted By: 7th_zorro

Re: Script name in the broker dll - 02/16/21 06:16

Thank you.

But Trading environment changed. Expecially crypto trading.

Exchanges does not calculate profit/loss any more.

I think broker plugin is good place to simulate profit/loss of each script.

Is there any reason plugins must not know what is the script current running?
Posted By: AndrewAMD

Re: Script name in the broker dll - 02/16/21 13:58

Once again, implement a custom broker command:
https://manual.zorro-project.com/brokercommand.htm
Quote
4000..5999 char* User supplied command with a text string.
This should not be a problem, since you are implementing the broker plugin.

Here is an example of a plugin with custom broker commands:
https://zorro-project.com/manual/en/kraken.htm

Alternatively, put a "ScriptName" flag in the user field. Here's an example of flags in the User field:
https://github.com/AndrewAMD/SierraChartZorroPlugin
© 2024 lite-C Forums