Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by Grant. 05/23/26 20:53
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
Purchase A8 full licence version
by NeoDumont. 05/13/26 20:17
Black Book, 4th edition
by TipmyPip. 05/11/26 08:40
No errors in the command line
by jcl. 05/08/26 10:59
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 2,774 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
jayden, liu, Koti, curry, DeepxKalsi
19220 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: 61
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 61
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,814
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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