Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
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:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (flink, Edgar_Herrera), 695 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 7 1 2 3 4 5 6 7
Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #469413
11/15/17 10:10
11/15/17 10:10
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Vinsom,

here the Zorro.ini :

[BITTREX]
PrivateKey = ""
PublicKey = ""
DisplayCurrency="BTC"
BaseTradeCurrency="BTC"
IntervalSec = "15"
DemoTrading="0"
EnableLog="0"
UseCryptoCompareHistory="1"
MinOrderSize="100000"
LimitOrderMaxOrderBookDepth="0.5"
WaitAfterOrderForCheckSec="2"

and the asset list :

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
RLC/BTC,50,0.00000512,0,0,0.00000001,0.00000001,0,1,0.65,0.000000,
TRST/BTC,50,0.00000512,0,0,0.00000001,0.00000001,0,1,0.65,0.000000,

It seems that the PIP cost is not fixed, even if the strategy is not restarted.
I will fix the PIPCost as a workaround !

thank you for your help, I appreciate it.

BR, Johan

Re: BitTrex Plugin (Crypto Trading) [Re: Cheulmen] #469430
11/15/17 13:02
11/15/17 13:02
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline
Senior Member
nanotir  Offline
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Originally Posted By: Cheulmen
Go here: https://github.com/vinsom68/CryptoCompareHistoryAPI/tree/master/LatestBuild

And copy all of those files in your Zorro folder; in my case it is C:/users/Administrator/Zorro


thx... I cant really make it work. Shall I use another Crypto asset list?
My bittrex connection works perfectly so I am not sure where I am doing it wrong.

Re: BitTrex Plugin (Crypto Trading) [Re: nanotir] #469434
11/15/17 19:42
11/15/17 19:42
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Nanitek.
Not sure I understand what is not working.
Can you post more details on the steps you are you doing and what is the issue ?
Are you using the download_coins_SHARE.c script I posted for downloading data with the CryptoCompareHistoryAPI tool ?

Cheers

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #469443
11/16/17 09:03
11/16/17 09:03
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi JohnAu,
I reproduced the issue and fixed it.
Please get last compiled dll from github.

Cheers
Vince

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #469444
11/16/17 12:30
11/16/17 12:30
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Vinsom,

Amazing, thank you a lot for that. Can't wait to try it !!

Johan

Re: BitTrex Plugin (Crypto Trading) [Re: JohanAu] #469512
11/19/17 07:51
11/19/17 07:51
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi Again,

I took the latest build here : https://github.com/vinsom68/Zorro-BitTrex-Plugin/tree/master/LatestBuild

and did some testing :


Enter 2L XLM/BTC at 21:43:37
!Trade id: - Price: 0.00000458
!Type: buy Price: 0.00000458 Amount: 438
!Quantity: 438 QRemaining: 0 Commission: 0.00000502
BrokerBuy XLM/BTC: 2751 ms
[XLM/BTC::L1418] Long 2@0.00000 at 21:43:37
Units: 438 Margin: 0.00 MCost: 0.0010 PCost: 0.00000
Asset : XLM/BTC
pip cost : 0.00000217
lot : 2.00000000


[Sun 17-11-19 00:42]
Exit [XLM/BTC::L1418]
!Trade id: - Price: 0.00000474
!Type: sell Price: 0.00000474 Amount: 421
!Quantity: 421 QRemaining: 0 Commission: 0.00000499
BrokerSell XLM/BTC: 2832 ms
[XLM/BTC::L1418] Sell 2@0.000004750: -0.00 at 00:42:07
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp -0.00 Rol 0.00 Com 0.00

Asset : XLM/BTC
price : 0.00000473
pip cost : 0.00000217
lot : 2.00000000


Seems that the PIPCost is correctly fixed but the quantity is still not the good one. I suspect that the lot amount is varying as well. I believe it shall be fixed at the init of the strategy as well.
Will do some more testing.

Johan

Last edited by JohanAu; 11/19/17 09:43.
Re: BitTrex Plugin (Crypto Trading) [Re: JohanAu] #469513
11/19/17 08:56
11/19/17 08:56
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Johan,
Is demo trading or live ?
Can you send me the log (remove the API keys, those are logged too) ?

Thanks for doing some more beta testing
Vince

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #469514
11/19/17 09:01
11/19/17 09:01
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Also, has the strategy been restarted between entry and exit ?
Is the account set to NFA ?

if settings are the same as before don't need to send again.

Cheers
Vince

Re: BitTrex Plugin (Crypto Trading) [Re: vinsom] #469516
11/19/17 10:07
11/19/17 10:07
Joined: Sep 2016
Posts: 20
France
J
JohanAu Offline
Newbie
JohanAu  Offline
Newbie
J

Joined: Sep 2016
Posts: 20
France
Hi,

Yes I have set NFA otherwise trade cannot be closed by Zorro.
Yes settings are the same and this is live trading.
I have fixed the lot amount for each asset I am using as a workaround, let see if the issue is fixed with that.

I have also spotted strange behaviour for asset where PIPCost > 0.00000001 (1 satoshi) but I don't know if it is plugin related.

1- The Commission cost is not computed correctly :

in this example, I just enter and exit the trade after few seconds :

Trade: TradeTest XLM/BTC 2017-11-19
Buy Long XLM/BTC
Enter 1L XLM/BTC at 08:38:55
!Trade id: Price: 0.00000487
!Type: buy Price: 0.00000487 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000250
[XLM/BTC::L0735] Long 1@0.00000 at 08:38:55
Close Long XLM/BTC
Exit [XLM/BTC::L0735]
!Trade id: Price: 0.00000485
!Type: sell Price: 0.00000485 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000249
[XLM/BTC::L0735] Sell 1@0.000004870: -0.00 at 08:38:55
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp 0.00 Rol 0.00 Com 0.00
commission cost: -0.00102881
commission : 0.00000500 => roundturn fee from bittrex which is 0.5%
lot amount : 205.76131687
BalanceLong : -0.00102881
pipcost: 0.00000209


The Balance long indicate a loss of -0.00102881 BTC which is huge.

To solve that, I need to set the commission variable to: Commission = 0.00000500*PIP/PIPCost;

Trade: TradeTest XLM/BTC 2017-11-19
Buy Long XLM/BTC
Enter 1L XLM/BTC at 08:41:03
!Trade id: 54fe52f4-09e4-4db9-95a4-af249c879133 - 1511080864 - Price: 0.00000487
!Type: buy Price: 0.00000487 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000250
[XLM/BTC::L0864] Long 1@0.00000 at 08:41:03
Close Long XLM/BTC
Exit [XLM/BTC::L0864]
!Trade id: 54fe52f4-09e4-4db9-95a4-af249c879133 - 1511080869 - Price: 0.00000486
!Type: sell Price: 0.00000486 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000249
[XLM/BTC::L0864] Sell 1@0.000004870: -0.00 at 08:41:07
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp 0.00 Rol 0.00 Com 0.00
commission cost: -0.00000493
commission : 0.00000002
lot amount : 205.76131687
BalanceLong : -0.00000493
pipcost: 0.00000209

Seems correct since Commission cost is equal to Commission*LotAmount*PIP/PIPCost : 0.00000500*205.76131687*0.00000001/0.00000209 = 0.00000492


2- I suspect that the spread cost is also wrong for the asset where pip cost is > 1 satoshis and the factor PIP/PIPCost shall also be applied. I don't really mind since I have set it to zero for now but we need to be aware.


It is all for now laugh my analysis may not be correct but I am here to contribute so everyone may benefit from this !


Last edited by JohanAu; 11/19/17 10:08.
Re: BitTrex Plugin (Crypto Trading) [Re: JohanAu] #469517
11/19/17 11:11
11/19/17 11:11
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi JuhanAu,
Au is for Australia ? I live in Au too.

For the PIPCost , this is hardcoded in the plugin to 0.00000001, as as far as I know, is the same for all pairs on Bittrex. Correct me if I'm wrong.

The commission is set in the asset List to 0.000005, that is the commission for 1 lot (the min amount set in the config of 100k sat).
(I mentioned in the readme).
But I think you set it to a different value in your config.


I'll have a look at the Lot Amount when I have a bit more time,

Cheers

Page 4 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