Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, TedMar), 837 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 586
Austria
Petra Offline
Support
Petra  Offline
Support

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