Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/08/26 18:50
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, clint000, AndrewAMD), 14,969 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using leverage in backtests #484961
01/05/22 03:07
01/05/22 03:07
Joined: Jan 2022
Posts: 29
C
coinpump Offline OP
Newbie
coinpump  Offline OP
Newbie
C

Joined: Jan 2022
Posts: 29
Hi again, new zorro s user here.

How can I use leverage in my tests? I changed the "market" column in the assets but I don't think I'm doing it correctly. Is there a way to do it programmatically in the script?

Thank you! Great software by the way.

Re: Using leverage in backtests [Re: coinpump] #484974
01/05/22 11:32
01/05/22 11:32
Joined: Apr 2008
Posts: 600
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 600
Austria
Set MarginCost to the current price divided by leverage.

Re: Using leverage in backtests [Re: Petra] #484979
01/05/22 15:22
01/05/22 15:22
Joined: Jan 2022
Posts: 29
C
coinpump Offline OP
Newbie
coinpump  Offline OP
Newbie
C

Joined: Jan 2022
Posts: 29
Can you give me an example doing this inside a script? Is it as simple as this?

MarginCost = price(0) / 3;

I have tried changing the MarginCost in the assets file, but the test results are the same. Can you give me an example of changing the leverage with both the assets file and inside a script?

Last edited by coinpump; 01/05/22 15:46.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1