Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,038 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
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