Arbitrage bot for Cryptocurrency Trading Exchanges (Binance, Poloniex, Huobi...) - YouTube

Channel: ROBBIE FLETCHER

[8]
hello everyone in this video we're going
[10]
to show you how to use the latest
[12]
feature that we've added to our crypto
[14]
trader program this feature is called
[16]
triangular self arbitrage and to get to
[19]
that feature please click on tools
[22]
and then click on the triangular self
[24]
arbitrage button
[26]
so the idea behind this feature is to
[29]
let the user engage in what's known as
[31]
triangular arbitrage
[34]
trading within a single exchange within
[36]
one exchange so in other words whenever
[39]
there's a cross-currency imbalance
[41]
between quotes the user can trade
[43]
different assets and shift from one
[46]
asset to another
[48]
so
[49]
there are three tabs at the top
[52]
there is a change tab
[53]
an exchange tab
[55]
and a monitor tab
[58]
so we're in the chains
[60]
tab right now in the change field this
[62]
is where we indicate the chain itself or
[64]
the chains that we would like to use
[66]
so let's click on the add button at the
[68]
bottom
[69]
[Music]
[70]
and let's call our chain
[73]
test ethereum
[75]
let's say we want to sell ethereum and
[77]
buy
[78]
bitcoins so
[80]
let's enter the symbols
[84]
so we're selling
[87]
[Music]
[88]
ethereum and buying bitcoins
[94]
we're then going to
[95]
sell
[97]
bitcoins
[99]
the big ones through the box and then
[102]
buy usd and finally sell
[105]
us dollars and
[108]
buy ethereum
[110]
so just to recap sell ethereum bitcoins
[113]
means we're selling ethereum to buy
[115]
bitcoins
[116]
uh we then sell bitcoins and buys in the
[118]
us currency
[120]
and finally following that we sell the
[122]
us dollars to buy back
[125]
ethereum so the net results of all these
[127]
trades is that we end up where we
[128]
started we began the chain based on
[130]
ethereum
[131]
and we now
[132]
we've just now applied that here in back
[135]
we can create as many chains as we want
[138]
the important thing is to make sure that
[140]
the label of each chain is always
[141]
different so pay attention to that to
[143]
that otherwise you will confuse the
[144]
program
[146]
so moving on to the exchange tab this is
[147]
where we add our exchanges so this is um
[151]
we do it right here
[152]
we'll select bitstamp as our example
[155]
hence the commission will be set to 0.5
[158]
because the trading balance is less than
[160]
10 000
[163]
now we do have um the symbols our
[166]
symbols
[168]
in place but in the events that you
[170]
don't
[171]
um you can see here right here that we
[173]
have all the symbols that we need but if
[175]
let's say if you don't have them all you
[177]
need to do is just click on the ads full
[179]
symbols button and then the necessary
[181]
symbols will be added automatically
[185]
also keep in mind that in some cases you
[187]
may need to disconnect the exchange and
[189]
then reconnect it again with market data
[191]
in order to start getting calls
[193]
and you can add as many exchanges as you
[196]
want as many as you need
[198]
so moving on to the monitor tab this is
[200]
where we create automatic rules for our
[202]
arbitrage tip
[204]
so click here and select
[207]
create
[208]
create automatic rule
[213]
and then let's go over the columns um
[216]
for for um for our rules so active
[219]
indicates whether or not
[222]
the rule is active
[225]
self-explanatory trades indicates
[227]
whether this rule can be used for
[230]
for trading
[231]
with chain you indicate the chain for
[233]
which you want to use this rule so we'll
[236]
use the chain that we created
[237]
[Music]
[239]
exchange this is where you choose the
[240]
exchange
[243]
so let's go with this time and then we
[246]
then select the lot size that we would
[247]
like to trade
[249]
we'll go with 0.1 this means 0.1
[252]
ethereum
[255]
we then choose the methods now with the
[257]
methods you have the option to choose
[259]
all or one by one if you have all the
[262]
currencies that you need for the trade
[264]
so if you have us dollars
[266]
you've got ethereum you've got your
[267]
bitcoins and if you have a sufficient
[269]
quantity of each assets in order to
[272]
perform the triangular arbitrage trade
[274]
all you need to do is just select all
[276]
and that means that all the orders will
[278]
then be done right away consecutively
[281]
if however we only have ethereum
[284]
and we'll then will then need to sell it
[286]
in order to buy bitcoins and then sell
[288]
the bitcoins to buy u.s dollars and then
[290]
sell the us dollars to buy bank
[293]
ethereum we select one by one
[296]
and will then need to sell ethereum like
[298]
bitcoins or bitcoins by usd
[301]
uh and
[302]
finally sell the usd and why back in
[305]
theory
[307]
that's one
[308]
[Music]
[309]
we then need to set the profit that we
[311]
want that we need to make in order to
[313]
cover the expenses
[315]
incurred in doing the trades in this
[317]
case i will enter one percent
[320]
and this also takes into consideration
[323]
the commission fees this accounts for
[324]
the commission fees that need to be paid
[327]
on the trades
[329]
current profit shows the current profit
[332]
that we have at the present time
[335]
so that's self-explanatory and the last
[338]
column shows the maximum profits that
[341]
was made
[342]
during the life of this rule
[345]
so let's set this rule to active and
[347]
then click on the run
[354]
so we can see that if we were to use
[355]
these values this would be our profit
[359]
in ethereum the current profit
[364]
now do note that when the rule is
[367]
working
[368]
the methods
[369]
lots exchange and chain columns cannot
[372]
be modified you can only change the
[374]
active
[375]
trade and profit columns if the rule is
[379]
is working
[381]
[Music]
[383]
so let's say that we want to do a little
[384]
test just to see how the rule
[387]
works even if it's going to leave us
[389]
with a small loss so let's check out the
[391]
trade box and insert a negative
[394]
value in the
[397]
in the profit column
[400]
so we'll we'll go with
[402]
let's say negative two percent
[407]
so check off trade
[409]
inserts negative two
[411]
and this is just to see how the rule
[413]
performs
[414]
[Music]
[419]
okay so we can see that our our first
[422]
order was rejected because the lot size
[425]
was less than the equivalence of
[428]
25
[430]
and the software attempted to open three
[432]
consecutive orders all that were
[434]
rejected the program determined so there
[437]
was something wrong with the rule and
[439]
after three mistakes in a row the rule
[441]
was automatically disabled and you can
[444]
see that the active box
[446]
has been unchecked
[447]
that's because the rule is disabled if
[449]
we set it to active again
[452]
the program will attempt
[454]
the same
[455]
sequence of trades we'll attempt to
[457]
attempt to do the same sequence of
[459]
trades
[459]
but the result
[462]
will be the same
[465]
[Music]
[469]
and this is what happens
[471]
as you can see so we've
[473]
checked it off again and the results are
[477]
so what we need to do at this point is
[479]
to increase the plot size
[483]
so to do that we need to stop the
[485]
strategy and let's set
[487]
the lot size to 0.2
[493]
stop this
[495]
enter 0.2
[498]
we'll leave the profit as is at negative
[500]
2
[503]
and we'll make
[504]
the rule active again
[506]
now when we set a rule to active the
[509]
error indicator the indicator showing as
[511]
our errors is reset
[516]
now if we look at our
[518]
trading balance and i hope you can see
[520]
this well um i apologize if you don't if
[523]
we look at our balance we can see that
[525]
our we have some bitcoins but we need to
[528]
top up our ethereum balance it's
[530]
practically depleted
[532]
so we need to
[535]
buy some ethereum so let's click here
[541]
choose
[542]
a symbol right here
[544]
during bitcoin
[545]
select mark it as type this quantity
[550]
and we then hit
[552]
buy
[554]
[Music]
[556]
let's wait for the balance to change
[562]
okay so we have zero points
[566]
eight ethereum now so we can now try to
[569]
try it with our
[570]
rule again
[572]
[Music]
[575]
now as this is just a test
[577]
uh we're going to uncheck the uh let's
[580]
go back here
[581]
close this
[583]
so because this is just a test
[585]
we're going to uncheck the
[588]
trade button as soon as the first order
[589]
is complete so we just want to make sure
[591]
that it works
[592]
so let's run it
[596]
click on the run button
[598]
and then uncheck trades
[602]
[Music]
[610]
okay and
[612]
we can see that the so let's check this
[616]
we can see that the chain worked as
[618]
intended so the first order was done
[620]
[Music]
[621]
uh successfully in the log right here
[624]
we can see the orders that have taken
[626]
place and the price at which the orders
[627]
were done
[629]
and if the chain was executed
[634]
properly
[636]
the status at the top
[638]
will display
[640]
success the word success
[642]
and we'll also be able to view the
[644]
entire path
[645]
of the chain right here the path of the
[648]
chain is the exact sequence of the works
[650]
and that's how it works thank you for
[651]
your time have a great day
[656]
[Music]
[668]
you