CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 66 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

[The Zorro Project] Configuration, Backtesting, Simulation and Live Trading at Darwinex

Commissions are wrong, 0.50€/$ … its based to 10.000 … 0.1 Lot

http://zorro-project.com/manual/en/account.htm

CFD’s i cant tell you 100% but it not correct in my opinion as well, have to check it, just write a simple script, test it with
ONE trade and look if the numbers (spread, commi, roll) are realistic

5.5 for contract ie 100.000. minimum lot 0.01 -> 5.5 * 0.01 -> 0.055USD to be converted in Eur.
Am I wrong?

yes,…

Commission Roundturn commission in account currency units for opening and closing one contract, or 10000 contracts for currency pairs. Accessible with the Commission variable. When manually entering the commission, double it if was single turn. For currency pairs make sure to convert it to 10000 contracts.

10.000 => 0.1 Lot, same for Roll values, for all FX pairs use values for 0.1 lot when you use the download script and load the whole asset list this values should be correct!

LotAmmoutn for FX pairs should be 1000 (0.01 Lot) for smallest tradeble size.

ok, never dealt with such complexity. I will update my calculation and return.
Probably all the cfd are messed up and I do not how to deal with it.

just like i said, test it, 1 trade, best is overnight and have a look at all values from the backtest

1 Like

Updated the forex currency. Are this more realistic?

CFD will be tested during Trading hours next week., Yet to decide how to handle the triple size of roll cost. maybe RollCost*7/5…

Name Price Spread RollLong RollShort PIP PIPCost MarginCost Leverage LotAmount Commission Symbol
AUS200 60697 19 -3.79607 0.75534 1.0000 0.64559 0 50.00 1 3.55075 AUS200
EU50 34604 14 -1.59000 -1.11000 1.0000 1.00000 0 50.00 1 5.50000 STOXX50E
FR40 54517 7 -2.40000 -1.67000 1.0000 1.00000 0 50.00 1 5.50000 FCHI40
IBEX35 98313 38 -4.49000 -3.13000 1.0000 1.00000 0 50.00 1 5.50000 SPA35
GER30 128106 7 -7.04000 -5.33000 1.0000 1.00000 0 50.00 1 5.50000 GDAXI
NIKKEI225 22807 6 -0.80573 -0.56125 1.0000 0.77000 0 50.00 1 0.53900 J225
NAS100 71713 8 -5.79414 0.03398 1.0000 0.84958 0 50.00 1 4.67269 NDX
SPX500 27752 5 -2.33635 0.01699 1.0000 0.84958 0 50.00 1 0.46727 SPX500
WS30 25261 1 -2.19192 0.51824 1.0000 0.84958 0 50.00 1 0.59471 WS30
UK100 77347 7 -5.20416 -1.60215 1.0000 1.13628 0 50.00 1 6.24954 UK100
SILVER 1683 0 -4.24790 -2.54874 0.0100 4.24790 0 50.00 1 -0.005% XAGUSD
GOLD 129748 13 -9.51530 3.22840 1.0000 0.84958 10.19 0.00 1 -0.005% XAUUSD
NATGAS 297 0 -17.84118 -21.23950 0.0100 8.49580 0 33.33 1 -0.005% XNGUSD
PALLADIUM 102400 120 1.10445 -14.10303 1.0000 0.84958 0 25.00 1 -0.005% XPDUSD
PLATINUM 90400 90 -2.20891 -0.50975 1.0000 0.42479 0 25.00 1 -0.005% XPTUSD
USCRUDE 6561 4 -30.83975 -36.78681 0.0100 8.49580 0 33.33 1 -0.005% XTIUSD
EUR/USD 118150 3 -0.93454 0.43329 0.0001 0.84958 0 200.00 1 0.50000 EUR/USD
AUD/USD 76422 4 -0.17841 -0.16992 0.0001 0.84958 0 200.00 1 0.32280 AUD/USD
GBP/USD 133870 6 -0.81560 0.26337 0.0001 0.84958 0 200.00 1 0.56814 GBP/USD
USD/CAD 129778 6 -0.28886 -0.29735 0.0001 0.84958 0 200.00 1 0.32816 USD/CAD
USD/CHF 98123 6 0.49306 -0.92557 0.0001 0.86502 0 100.00 1 0.42479 USD/CHF
USD/JPY 10999 0 0.26180 -0.69300 0.01 0.77000 0 200.00 1 0.42479 USD/JPY

This is a realistic account data for a Darwinex demo account. You can get something similar, changing your preferences, following zorro instructions:

http://zorro-project.com/manual/en/account.htm
“There is a special asset list named Assets.csv in the Log folder. This list is updated on every [Trade] session with the parameters of all assets that are selected in the script. If assets are not selected or if certain asset parameters are not available, they are replaced by the content of the current asset list. This is a convenient way to simulate your current broker account: just connect to the broker with a script that selects all needed assets (f.i. the Download script), then copy Assets.csv to the History folder under the name of the asset list that you are using for testing. It’s preferable to do this a Monday, Tuesday, or Thursday, as on weekends most assets have an unrealistic spread and no rollover fee, and on Wednesdays or Fridays often the rollover is three times as high for compensating the weekend. For permanently simulating a certain asset/account state, copy the corresponding asset line from Assets.csv into the History\AssetsFix.csv file. Zorro must be restarted when AssetsFix.csv was modified. Below you’ll find examples for adding assets and downloading price data with the Download script”

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
AUD/USD,0.75733,0.00005,-0.2853,-0.0865,0.00010,0.086453,31.5111,20.778,1000.00,0.600,AUDUSD
AUS200,6070,19,-3.7961,0.7553,1.00000,0.645590,0,50.000,0.10,3.551,AUS200
EU50,34604,14,-1.5900,-1.1100,1.00000,1.000000,0,50.000,1.00,5.500,STOXX50E
EUR/CHF,1.07962,0.00004,0.0800,-0.2600,0.00010,0.092630,75.0000,13.334,1000.00,0.800,EURCHF
EUR/JPY,123.359,0.006,-0.3000,0.0900,0.01000,0.081066,10.0000,100.002,1000.00,0.800,EURJPY
EUR/USD,1.21763,0.00003,-0.1050,0.0430,0.00010,0.086453,33.3300,31.584,1000.00,0.600,EURUSD
FR40,54517,7,-2.4000,-1.6700,1.00000,1.000000,0,50.000,1.00,5.500,FCHI40
GBP/USD,1.39443,0.00007,-0.8559,0.2161,0.00010,0.086453,37.1220,32.475,1000.00,0.600,GBPUSD
GER30,128106,7,-7.0400,-5.3300,1.00000,1.000000,0,50.000,1.00,5.500,GDAXI
IBEX35,98313,38,-4.4900,-3.1300,1.00000,1.000000,0,50.000,1.00,5.500,SPA35
NAS100,4185,1,-0.1000,0.0000,1.00000,0.087100,2.0000,182.257,0.10,0.000,NDX
NATGAS,297.000,0.000,-17.8412,-21.2395,0.01000,8.495800,0,33.330,1.00,0.005,XNGUSD
NIKKEI225,22807,6,-0.8057,-0.5612,1.00000,0.770000,0,50.000,1.00,0.539,J225
NZD/USD,0.67752,0.00007,0.6000,-1.3200,0.00010,0.088713,7.0000,85.864,1000.00,0.800,NZDUSD
PALLADIUM,102400,120,1.1044,-14.1030,1.00000,0.849580,0,25.000,1.00,0.005,XPDUSD
SPX500,2651.8,0.5,-3.2800,0.4200,0.10000,1.000000,1236.8200,21.441,1.00,0.000,SPX500
UK100,7393.3,0.6,-0.5558,-0.1002,0.10000,0.111382,421.9750,19.515,1.00,0.000,UK100
US30,25889,2,-2.2979,0.5766,1.00000,0.860622,1114.0200,20.000,1.00,0.000,WS30
USCRUDE,6561.000,4.000,-30.8398,-36.7868,0.01000,8.495800,0,33.330,1.00,-0.005,XTIUSD
USD/CAD,1.28363,0.00006,-0.0729,-0.3646,0.00010,0.066292,28.8144,29.532,1000.00,0.800,USDCAD
USD/CHF,0.98255,0.00006,0.4834,-0.9317,0.00010,0.087899,28.8144,29.973,1000.00,0.600,USDCHF
USD/JPY,109.330,0.000,0.2886,-0.7331,0.01000,0.077989,28.8144,29.591,1000.00,0.600,USDJPY
XAG/USD,16.580,0.000,-0.6000,-0.1000,0.01000,0.500000,63.0017,13.158,50.00,0.000,XAGUSD
XAU/USD,1323.710,0.130,-11.7000,4.1000,0.01000,0.008645,51.3657,22.278,1.00,0.000,XAUUSD

Good Luck!

1 Like

Hi, thank your for your hint.

Sorry but I do not think that this is correct. I am in contact with Zorro’s support in order to see if there is a mistake from their side.

For sure the commission of metals that has to be reported as negative (they are % of the trade)

You can refer to this post.

Unfortunately it seems that nobody is simulating a Darwinex account with Zorro.

Ciao

@NicolasDarwinex @DarwinexLabs , Would it be possible for Darwinex to offer Zorro’s asset configuration file with updated information? I suppose this information can be queried from a Darwinex database.

Hi @MatPed / @Aimak :slight_smile:

So I’ve just read through this entire thread to get a sense for what’s being addressed.

I am familiar with Zorro myself (introduced to it by @CavaliereVerde and took an instant liking since my background includes Lite-C), albeit using it purely for strategy R&D at this point in time, not actual trading - though I can certainly help where possible.

Please pardon my ignorance… but could we please attempt to answer the following questions to get a better sense of what the problem is?

1) What exactly is the issue being addressed here? From what I understand from the conversation above:

  • Are the RollLong/Short and Commission values returned via the MT4/5 Zorro Bridge not congruent with what’s displayed on the Darwinex Execution Conditions page?

  • Something else I’ve missed?

  1. OANDA has direct API access to Zorro, so we can rule out the Bridge relevance in its case - has anyone here observed the same issue when running the Zorro MT4/5 Bridge with other brokers?

If yes, then odds of the discrepancy being in the Bridge and not the brokers themselves, are obviously high.

If not, then there’s room to investigate further.

3) In terms of AssetsFix.csv values, can these not be set to realistic values based on the data on the Execution Conditions page? (what am I missing, please shed some light on this for me so I can understand the situation better).

Ultimately, I’m sure we can all get to the bottom of this.

My own 2 cents on AssetsFix.csv values for RollLong/Short and Commission are that if they are adjusted to 10,000 (0.1 lots) as advised in the Zorro Manual (also previously reiterated by @easyFX) then setting them to values down to the 2nd or 3rd decimal place is likely unnecessary (but I could be wrong, so let’s discuss).

Cheers :thumbsup:

p.s. I’ve updated the thread’s title and tags to make this more accessible to people looking for similar information.

Hi Aimak,
I’ve asked to Darwinex’s support. The answers received were polite and timely, unfortunately was not good enough to fix the issue.
All the info regarding Assets execution conditions are clearly published on Darwinex, Unfortunately they are not coherent from what you can download from the MT4/5 bridge this lead to unrealistic testing results.

It goes without saying that if somebody of Darwinex support gives a call to JCL of Zorro, they could solve this issue in minutes.
I know I am the weak ring of the chain :slight_smile:

Ciao

Hi Integracore,
I am sorry that I am not able to clarify the problem. It is, without doubts, my fault, but the issue is subtle. And I am investing hours of my time and wasting hours of Zorro’s support, to fix it.

lets start to answer to your second question. As far as I know the Mt4/5 bridge works for other brokers. When bugs are reported usually they are timely fixed by Zorro’s team.

Question 1 and 3 are just part of the story. I have done all the testing recommended by easyFX, but have not solved all the issues.

The AssetFix.csv file is used by Zorro for several tasks:

  1. testing a strategy
  2. training a strategy
  3. provide the info in order to calculate the Factors to allocate money to the different components of the portfolio (portfolio money management)
  4. send correct lot information to the broker in live trading in order to open, track and close trades during trading time. If the strategy set Hedge = 5 in order to reduce trading costs this is absolutely relevant.

Usually when discussing the assets.csv impacts the points 3 and 4 are not taken into consideration. To be more practical RollLong & Short, Commission, Pip cost, Margin/Leverage and lot size has also to be correct not only from a mathematical point of you (that’s easy), but the values must generate tradable lot quantities.Tradable quantities depends from the settings of Mt5 broker’s server (not the end user platform platform) the Zorro’ Bridge and Zorro’s itself.

So if you train and test a Strategy on 2 brokers with similar leverage (As it is now, after the ESMA) on the same historical data you should receive similar results. On top of this you should be able to trade the strategy on the 2 brokers without errors i.e you should respect minimum contract size and its multiplier.

My strategy reach an AR of 45% on Oanda and 171% on Darwinex using the data Assets Data downloaded from the 2 brokers. When I modified the Assets file accordingly with the easyFX hint the lot calculation in live training was wrong and Zorro’s was not able to trade correctly on Darwinex.

This is the issue I would like to fix

You can make your own testing on your PC even it will be time consuming:

  1. grab workshop 6 enlarge the assets loop including all the darwinex Assets
  2. prepare the assets.csv to train, test and trade with Oanda and Darwinex
  3. You should find similar results
  4. Live trade the 2 strategy on the 2 brokers in order to see that trades are opened correctly i.e. no orphan trades will be generated

I hope it is more clear. Ciao

1 Like

Hi @MatPed,

Thanks for sharing some more detail.

I’ll take a look and return with some more questions/feedback.

In the meantime, could you please attach your current AssetsFix.csv file in a reply comment here?

Thanks.

Hi, the email exchanged with Zorro’s support up to now.

Also for training. The Darwinex rollover fees are exceptionally high, so they have an effect on training result. Most brokers have smaller rollover fees for CFDs.

Best regards
Zorro Support Team
oP group Germany GmbH

Betreff: Re: AW: MT5 Assets download issue

Ok, thank you.
Do you recommend to train and test with roll costs to 0 or only testing?

I will do some testing.

Ciao

Il giorno 28 ago 2018, alle ore 08:23, oP group support support@opgroup.de ha scritto:
Hi,

you see in your trade list that the large rollover was caused by shorting Gold. Maximum was $1339 by 9 contracts and ~50 days trade. 50 * 9 * 3.1 = ~1400, so the gain is real. You just were lucky as far as we see.

Since you cannot rely on always positive rollover for shorting gold, better test this system with rollover set to 0.

Best regards
Zorro Support Team
oP group Germany GmbH
http://zorro-project.com

Thank you,
I did not noticed the large positive rollover.
Based on the trades file attached I do not see any rogue trade.
On the contrary, most of the Assets as Gold or EUR/USD present only positive roll over in all the trades.
Only few Assets shoes some negative rollover in some trades

I will run all the test or simulation you required, but I am not able to identify the issue by myself.

Ciao

Hi Matteo,

you can see in the .txt files that the Darwinex simulation had large positive rollover. The rollover in your NATGAS example was correct. So the problem is somewhere else. Either one of your assets had a wrong positive rollover value, or your strategy produced a rogue trade that never closed and thus had an unrealistic rollover gain. The sum of long and short rollover must be always negative, so the problem should be easy to catch.

Hi,
the same strategy tested on the same Oanda history price, with the Oanda asset file and Darwinex Asset file (both attached) gives totally different results. The Darwinex is (unfortunately) unrealistic.
After ESMA the leverage of the 2 brokers are the same so I was expecting similar results, but as you can see from the report attached there are huge differences. AR: 61% Oanda Assets File -> 171% Darwinex Assets File

I guess that something is wrong in modeling the Darwinex trading cost structure.
Regarding the Natgas the roll cost and the pip cost of the should be 1/10 of the reported ones, because you are open 1/10 of the standard lot.

What Am I missing?

Oggetto: AW: MT5 Assets download issue

Hi,

so far we did not notice anything wrong with the NATGAS parameters on the Darwinex MT5 platform. The values returned by their MT5 server seem in agreement to their website and to their MT4 server parameters. Small variations of spread, rollover, pipcost are normal and due to varying exchange rates. What exactly is the problem?

Best regards
Zorro Support Team
oP group Germany GmbH

Good morning,
JCL has suggested to report this issue
With the Darwinex broker I connect to the MT5 Server:
MT5 DEMO SERVER
Login:
Password:
Server: demoUK-mt5.darwinex.com
I used the download script and received the attached Assets.csv file (renamed to mpDarwinexESMALive.csv).
Commission have been manually added. Leverage have been fixed and Margin set to 0 as explained in the manual).

Using the assets data downloaded lead to misleading results. I have checked the values with the broker provided data (https://www.darwinex.com/spreads/commodities ).
An Example:

Asset: US Natural Gas/USD (Spot)
Ticker: XNGUSD
Current spread: 0.01 points
Margin: 10.00%
Min. size (contracts): 0.10
Contract size: 10000 XNG
Tick Value (1 Contract): 10 USD
Swap Long* (1 Contract): -13.00 USD
Swap Short* (1 Contract): -4.00 USD
Roundtrip Commission (1 Contract): 0.005% trade value

When I run the the Download.c script with the MT5 bridge. I receive the following information in asset.csv file

Name: NATGAS
Price: 2.93
Spread: 0.00
RollLong: -9.0000
RollShort: -8.0000
PIP: 0.01000
PIPCost: 8.756414
MarginCost: 0
Leverage: 10.000
LotAmount: 1000.00
Commission: 0.050
Symbol: XNGUSD

It seems that RollLong, RollCost and PIPCost are wrong and should be divided by 10 (Min. Size 0.1).

I Have modified the lot amount to 0,1 and it works in testing, but when traded and the TS try to open a new trade I receive the error
[2559: Fri 18-08-24 16:00] 1.1593/1.1640\1.1582/1.1625
{SILVER:MM:s5901} Short 1@14.87 Risk 49 .
Error 075: (SILVER:NET:S) - can’t open 1@0.01 at 16:00:00

The MT5 Log say:
2018.08.24 18:00:00.878 Zorro (EURUSD,H4) Open XAGUSD 0.01@14.862 stop 18.582 slp 10 magic 42380 factor 10.0
2018.08.24 18:00:00.925 Zorro (EURUSD,H4) OrderSend: true10009 Deal 0 Order 3000058855
2018.08.24 18:00:01.939 Zorro (EURUSD,H4) Deal: 0
2018.08.24 18:00:01.939 Zorro (EURUSD,H4) Order failed - Deal not found

The trade have been opened in MT5 but not tracked in Zorro.

Thank you in advance for your help. Ciao

1 Like

Darwinex Asset file. Ciao

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
AUD/USD,0.73159,0.00006,-3.8000,-1.2000,0.00010,0.086070,0,20.000,1000.00,0.036,AUD/USD
AUS200,6265.7,1.5,-6.1800,1.3200,0.10000,0.062965,0,20.000,1.00,0.401,AUS200
EU50,3437.4,1.4,-1.5700,-1.0900,0.10000,0.100000,0,20.000,1.00,0.550,STOXX50E
EUR/USD,1.16184,0.00003,-10.5000,4.3000,0.00010,0.086070,0,30.000,1000.00,0.050,EUR/USD
FR40,5451.9,0.7,-2.4900,-1.7300,0.10000,0.100000,0,20.000,1.00,0.550,FCHI40
GBP/USD,1.28456,0.00007,-9.0000,2.0000,0.00010,0.086070,0,30.000,1000.00,0.056,GBP/USD
GOLD,1204.53,0.05,-10.9000,3.1000,0.01000,0.008607,0,20.000,1.00,-0.050,XAUUSD
NAS100,7519.2,0.5,-8.5800,1.1000,0.10000,0.086070,0,20.000,1.00,0.482,NDX
NATGAS,2.91,0.00,-39.0000,-7.0000,0.01000,8.607037,0,10.000,1000.00,-0.050,XNGUSD
NIKKEI225,22801,6,-1.0400,-0.7200,1.00000,100.000000,0,20.000,100.00,0.553,J225
NZD/USD,0.66778,0.00006,-2.7000,-1.4000,0.00010,0.086070,0,20.000,1000.00,0.029,NZD/USD
PALLADIUM,938.30,4.30,-11.2000,-57.0000,0.01000,0.086070,0,10.000,10.00,-0.050,XPDUSD
PLATINUM,790.60,2.00,-5.0000,-1.0000,0.01000,0.043035,0,10.000,5.00,-0.050,XPTUSD
SILVER,14.82,0.01,-1.2000,-0.3000,0.01000,0.430352,0,10.000,50.00,-0.050,XAGUSD
SPX500,2884.7,0.2,-3.3000,0.4200,0.10000,1.000000,0,20.000,10.00,4.817,SPX500
UK100,7592.3,6.0,-4.9900,-0.9000,0.10000,0.110558,0,20.000,1.00,0.615,UK100
USCRUDE,68.36,0.03,-28.8000,-53.4000,0.01000,0.086070,0,10.000,10.00,-0.050,XTIUSD
USD/CAD,1.30267,0.00006,-1.4000,-5.8000,0.00010,0.066075,0,30.000,1000.00,0.044,USD/CAD
USD/CHF,0.98300,0.00006,5.0000,-10.5000,0.00010,0.087561,0,30.000,1000.00,0.044,USD/CHF
USD/JPY,111.17,0.00,2.9000,-9.0000,0.01000,0.077423,0,30.000,1000.00,0.044,USD/JPY
WS30,25870,2,-2.6700,0.6700,1.00000,0.860704,0,20.000,1.00,0.613,WS30

1 Like

@MatPed - I’m working on a configuration that might address the issue, will post back when ready :thumbsup:

Testing it now.

p.s. Whilst testing, training strategies on a multicore setup via Zorro is certainly very convenient, top marks.

4 Likes

Ok some more info regarding trading with Zorro on Darwinex.
Avoid using Mt5 Bridge, Mt4 Bridge seems to work smoothly.

The full story is that my script was unable to open and close trades. I switched to Mt4 and everything was working correctly. Same script, same Assets file, same broker just different bridge.

With the Zorro’s support we had agreed to run some more test, I do not know when I will have time to run them, but its on my list.
Even the assets parameters downloaded from Mt4 with the download.c, makes a lot more sense.

One of the limitation I discovered is Mt5 bridge does not allow to partially close trades i.e. using Zorro’s Hedge functionalities was not possible. I have received a pimped version of that bridge that fix the problem. I do not know if it will be included in the upcoming version.

Keep you posted, guys…

3 Likes

good morning, i want to start to use zorro to code my strategy but i have no experience in programming, if you have course for robowealth, can you send it to me?

1 Like

Sorry I haven’t. But I heard from other Darwinex members that Roboweath’s courses are good. Subscribe them you will benefit. Ciao

2 Likes