Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Calculate Open Lots for Different Algo Without Executing Trades #488454
12/03/24 07:56
12/03/24 07:56
Joined: Apr 2023
Posts: 60
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 60
I have a script that runs two Algo (Algo A & B) that calculates daily optimal position for each Algo, then open or close trades accordingly.

For example on Monday, optimal position for Algo A = 3, Algo B = 0. If on Tuesday, optimal position is Algo A = 4, Algo B = 1, then the script will calculate net position is 2 long: (4 - 3) Algo A + (1 - 0) Algo B.

However if on Tuesday, optimal position is Algo A = 4, Algo B = -1, then the script will calculate net position is 0: (4 - 3) Algo A + (-1 - 0) Algo B. Thus, the script will not open or close any position.

But since no trades is being made, the script will consider the number of open trades for each Algo remains the same (Algo A = 3, Algo B = 0), even though it should be Algo A = 4, Algo B = -1.

How do you make Zorro to consider the number of open trades for each Algo without executing trades?

Re: Calculate Open Lots for Different Algo Without Executing Trades [Re: vicknick] #488455
12/03/24 15:34
12/03/24 15:34
Joined: Feb 2017
Posts: 1,809
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,809
Chicago
With Zorro hedge modes 5 and 6. With 6, explicitly call the tradeUpdate() function to execute balancing trades.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1