Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Script name in the broker dll #482490
02/14/21 11:00
02/14/21 11:00
Joined: Oct 2018
Posts: 90
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 90
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.

Last edited by 7th_zorro; 02/14/21 11:19.
Re: Script name in the broker dll [Re: 7th_zorro] #482498
02/15/21 11:30
02/15/21 11:30
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
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.


Re: Script name in the broker dll [Re: 7th_zorro] #482507
02/16/21 06:16
02/16/21 06:16
Joined: Oct 2018
Posts: 90
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 90
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?

Last edited by 7th_zorro; 02/16/21 06:31.
Re: Script name in the broker dll [Re: 7th_zorro] #482509
02/16/21 13:58
02/16/21 13:58
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
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


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1