Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/02/26 18:13
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
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, Quad), 4,993 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro Gives Wrong Spread #488791
06/22/25 15:28
06/22/25 15:28
Joined: Apr 2023
Posts: 61
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 61
I have set EURUSD spread = 0.00001 in the AssetFix.csv file, and also didn't set any spread in my EURUSD.t6 file.

Code
[69: Mon 23-01-02 05:45] (1.06935)
[EURUSD::S06901] Short 10@1.06953 p at 05:45:00
Price = 1.06935, Spread = 0.00001


However, Zorro seems to enter in the wrong price 1.06953, which is significantly higher than the price 1.06935. Zorro should be entering in 1.06934 based on what I set in AssetFix, which is what I want.

I am not sure where went wrong, since my other backtest script gives the correct spread.

Last edited by vicknick; 06/22/25 15:31.
Re: Zorro Gives Wrong Spread [Re: vicknick] #488792
06/23/25 03:27
06/23/25 03:27
Joined: Feb 2017
Posts: 1,812
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,812
Chicago
What Fill setting are you using?

Re: Zorro Gives Wrong Spread [Re: vicknick] #488793
06/23/25 13:33
06/23/25 13:33
Joined: Apr 2023
Posts: 61
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 61
I didn't set any Fill.

Code
function run()
{
	 set(LOGFILE);
	 set(PLOTNOW);
	 History = "*m5.t6";
	 StartDate = 2023;
	 EndDate = 2025;
	 BarPeriod = 5;
	 LookBack = 60;
	 Spread = 0.00001;
	 asset("EURUSD");

         //...rest of the code

}

Last edited by vicknick; 06/23/25 13:33.
Re: Zorro Gives Wrong Spread [Re: vicknick] #488794
06/23/25 13:39
06/23/25 13:39
Joined: Feb 2017
Posts: 1,812
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,812
Chicago
Right, so this means you are using Fill mode = 1, which is the default.
Quote
1 Realistic order filling (default). Trades open or close at the most recent price quote plus Slippage or Penalty. When Slippage and Penalty are 0, this mode simulates a latency-free connection to the market that immediately reacts on any price quote. If an entry or exit limit is hit and no Penalty is set, the position is filled at a price replicating live trading as accurate as possible with a slight pessimistic bias (see details below). 'Cheating' is not possible. With daily bars, this mode simulates trading right before the market closes.
https://zorro-project.com/manual/en/fill.htm

Maybe you wanted fill mode 0?

Re: Zorro Gives Wrong Spread [Re: AndrewAMD] #488795
06/23/25 14:38
06/23/25 14:38
Joined: Apr 2023
Posts: 61
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 61
But fill mode = 0 will gives entry at exact closing price, but I wanted to include the spread of 0.00001 when entry

Re: Zorro Gives Wrong Spread [Re: vicknick] #488799
06/24/25 16:51
06/24/25 16:51
Joined: Feb 2017
Posts: 1,812
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,812
Chicago
OK, what about your Slippage setting?


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1