Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 3.11
by madpower2000. 07/16/26 13:49
What are you working on?
by NeoDumont. 07/15/26 16:38
Z9 getting Error 058
by jcl. 07/15/26 15:07
Zorro version 3.0 prerelease!
by madpower2000. 07/14/26 20:11
Accepting new programming clients
by AndrewAMD. 07/14/26 19:32
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, Quad, ukgamer), 1,429 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 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,821
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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