Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 7 1 2 3 4 5 6 7
Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468800
10/20/17 02:46
10/20/17 02:46
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Jcl,
I sent an email to support about a couple of issues found in Zorro 1.66 in the way Zorro handles crypto and decimals with a couple of simple test I did.
Please let me know what you think.

Thanks
Vincenzo

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468802
10/20/17 16:39
10/20/17 16:39
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I have seen your email. We can help with the decimals, and will probably implement some way to set them up for the account. You had also issues with pip size or pip cost - not sure which one - but this should be easy to solve, just check the parameter in your asset list or broker function. If the value is extremely small, it can also be some spreadsheet reading error from the asset list. In that case please send the list to support, they'll look into it.

Re: BitTrex Plugin (Crypto Trading) [Re: jcl] #468811
10/21/17 10:57
10/21/17 10:57
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Jcl,
I calculate the PipCost in the broker plugin.
And fill the pPipCost variable in BrokerAssef plugin function.

I replied to support highlighting the issue and waiting for a reply.
THanks
Vincenzo

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468817
10/21/17 16:04
10/21/17 16:04
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Vincenzo,

Thank you for your clarification.
I am playing live with your plugin (very simple strategy for now to ensure that everything is running correctly).
Could you describe to me the issue with the PIPCost ? just to verify that we have the same behaviour.

A small test I have done is this one :

- Buy 1 lot of the asset FUN/BTC
- Sell after few seconds.

It seems that the computation of the profit/loss is not good :

[557: Sat 17-10-21 17:31] 0.00000284/0.00000284�.00000284/0.00000284
!Trade id: b675939f-986b-4e9c-a64d-1b20e12e0b64 - 1508607061 - Price: 0.00000286
!Type: buy Price: 0.00000286 Amount: 352
!Quantity: 352 QRemaining: 0 Commission: 0.00000252
[FUN/BTC::L7061] Long 1@0.00000286 p
Session end at 17:31
!Trade id: e44a3e6c-2c3c-4b72-a352-0b94ab1fb6db - 1508607080 - Price: 0.00000284
!Type: sell Price: 0.00000284 Amount: 352
!Quantity: 352 QRemaining: 0 Commission: 0.00000250
[FUN/BTC::L7061] Sell 1@0.00000286: -0.00352113
Logout.. ok

It says that the loss is -0.00352113 BTC which is not the correct amount.

Is this related with what you are experiencing ?


By the way I am really happy that you develop this plugin laugh


EDIT :

Seems that there is a factor applied to the calculation of the profit.
The correct loss is -0.00000352113 BTC. if we compute the formula (found in the documentation of Zorro) : x * Lots * PIPCost/PIP with x the price difference we get the correct amount.
So there is a factor of 1000 applied in Zorro. Don't know where this is coming from.




Last edited by JohanAu; 10/23/17 09:01.
Re: BitTrex Plugin (Crypto Trading) [Re: JohanAu] #468841
10/23/17 11:06
10/23/17 11:06
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Check the LotAmount. A factor 1000 looks like a LotAmout 1000 instead of 1.

Re: BitTrex Plugin (Crypto Trading) [Re: jcl] #468849
10/23/17 15:20
10/23/17 15:20
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Jcl,

I have done a new test while printing the differents Zorro variable :

[FUN/BTC::L1401] Sell 1@0.00000317: -0.00317460
pip cost : 0.00000318
pip UNIT : 0.00000001
lot : 1.00000000
lot amount : 318.47133758
spread : 0.00001000 => HUGE !


This is caused by the spread. For the profit calculation, the roundturn cost is subtracted : Spread*PIPCost/PIP which in fact is the cause of the drift!

However the plugin seems to return a correct spread : 0.00000003.
It seems that Zorro do not take it into account in the same way as the commission. Will try to investigate why.

Vincenzo, to sum up, it seems that Commission and spread from the plugin are ignored by Zorro. It is however still possible to recompute them and set them with custom code.

BR, Johan

Last edited by JohanAu; 10/23/17 16:13.
Re: BitTrex Plugin (Crypto Trading) [Re: JohanAu] #468852
10/23/17 16:13
10/23/17 16:13
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi JohanAu,
Thanks for your help doing some test.
Zorro support just told me there is a new beta version where you can set the mumber of decimals.

"we have today uploaded a new beta version 1.17.9 where you can set up the account decimals in the Currency column of the account list, f.i. "BTC.8" for 8 decimals."

Thanks for your input. Will do some more testing with this version as soos as I have some time.
Vincenzo

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468881
10/25/17 10:18
10/25/17 10:18
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi JohanAu,
I did a bit of test with zorro 1.71 beta and spread and commission looks to be considered, so numbers looks ok.

Cheers
Vincenzo

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468882
10/25/17 10:22
10/25/17 10:22
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Jcl,
I sent to support 3 issues I found for crypto trading.
I'll post it here below again for information to other users.

------------------------------------------

Hi,
I just did a small test with Zorro 1.71 Beta and this is what I see:

- The balance of 0.08018764 Ethereum is still displayed as 0 in Zorro UI, even if I set the currency in Accounts.csv to BTC.8 or ETH.8, and in the html report profit has the $ symbol (see attachment)

- I read Jcl post about BrokerTrade not being called for NFA accounts. Actually I thought that was by design. When this function will be enabled in next version, there would be a problem for this Bittrex plugin as the TradeId is a GUID, like "54fe52f4-09e4-4db9-95a4-af249c879133", and can't be returned to BrokerBuy to then be passed to BrokerTrade. Would be nice to have optional functions that have a char* instead of an int as the TradeID

- Profit/Loss still with dollar symbol $ in the backtest report in several places (see attachment)

-----------------------------------
Cheers
Vincenzo

Attached Files
BitTrex Plugin 2.txt (417 downloads)
BitTrex Plugin 1.JPG
Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #468884
10/25/17 15:39
10/25/17 15:39
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Vinsom,

I carefully read what you have written. I have done the same test with the same Asset and it works perfectly fine :

[DASH/BTC::L5581] Sell 1@0.051800000: -0.00

pip UNIT : 0.00000001
commission cost: -0.00000010
commission : 0.00000500
lot amount : 0.01940459
lot : 1.00000000
spread : 0.00026581
win - loss in btc : -0.00000525

The spread is correctly set, as well as the commission.

But with asset where the spread is less than 0.00001000 (which happen with a lot of asset). Then the spread is ignored somehow. It seems that there is minimum with that value.






Last edited by JohanAu; 10/25/17 15:40.
Page 2 of 7 1 2 3 4 5 6 7

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1