Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Modify spread for training/testing #435780
01/14/14 08:14
01/14/14 08:14
Joined: Jan 2014
Posts: 28
Adelaide, South Oz
R
Radar Offline OP
Newbie
Radar  Offline OP
Newbie
R

Joined: Jan 2014
Posts: 28
Adelaide, South Oz
Hey Gang,

Just wondering if there's a way to set/modify the spread for training and testing a system.

My way of thinking might be crazy, but I want to train/test any systems against double my broker's average spread, to give me a more reasonable expectation of trading results.


Have fun!
Radar =8^)
Re: Modify spread for training/testing [Re: Radar] #435784
01/14/14 09:34
01/14/14 09:34
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
For a spread of 10 pips:

Spread = 10*PIP;

Re: Modify spread for training/testing [Re: jcl] #435793
01/14/14 10:46
01/14/14 10:46
Joined: Jan 2014
Posts: 28
Adelaide, South Oz
R
Radar Offline OP
Newbie
Radar  Offline OP
Newbie
R

Joined: Jan 2014
Posts: 28
Adelaide, South Oz

Ok... Silly question number two...

Where, exactly, would I put that?


Have fun!
Radar =8^)
Re: Modify spread for training/testing [Re: Radar] #435801
01/14/14 14:00
01/14/14 14:00
Joined: Nov 2012
Posts: 126
B
blaub4r Offline
Member
blaub4r  Offline
Member
B

Joined: Nov 2012
Posts: 126
Inside the run function, at the beginning before you open any trades

Re: Modify spread for training/testing [Re: blaub4r] #435802
01/14/14 14:25
01/14/14 14:25
Joined: Jul 2013
Posts: 522
D
dusktrader Offline
User
dusktrader  Offline
User
D

Joined: Jul 2013
Posts: 522
There is another way that I like better: create a custom AssetFix.dta file for your simulation. The reason you would want to do this is so you don't have to answer the question of "what is my spread now?" which you would need to know if you were creating a crippled spread like you suggest (which btw I think is a GREAT line of thinking, not crazy at all)

This method is especially helpful if you are managing more than a handful of assets:

1) First let Zorro create your Assets.dta file and include all the assets you will use. In my case, I track 27 assets that are available in the 2 brokers I most primarily use. You can get Zorro to add the entries into Assets.dta (as well as download the actual history data) using the Download.c script

2) Then make a copy of Assets.dta and name it something meaningful like "Assets-FXCMmicro-spread100.dta" (this is my 100% spread-crippled simulation)

3) Open your copy of the .dta file with a spreadsheet program using (space) as the delimeter

4) In your spreadsheet program, apply whatever multiplier factor you want on the Spread column (3rd column)

5) In your Zorro script, use a command like this to tell Zorro to use the crippled spread file. I like to build strategies using the actual spread simulation, then do a final check with the crippled spreads.
Code:
AssetList = "Assets-FXCMmicro-spread100.dta";


Re: Modify spread for training/testing [Re: dusktrader] #435804
01/14/14 15:33
01/14/14 15:33
Joined: Jan 2014
Posts: 28
Adelaide, South Oz
R
Radar Offline OP
Newbie
Radar  Offline OP
Newbie
R

Joined: Jan 2014
Posts: 28
Adelaide, South Oz
Thanks Blaub4r & Dusktrader,

Looks like the next step for me then, is to code it so it creates a copy with adjusted spread automatically after downloading history, and on the fly when getting ticks from the broker or mt4.



Have fun!
Radar =8^)

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1