1bbotpro
Posts: 1
Joined: Wed Jun 20, 2018 7:14 pm

1b bot PRO

Wed Jun 20, 2018 7:16 pm

We are glad to present to Your attention the next product of 1B BOT line. We have tried to implement many of the wishes of users of the Lite version.

1B BOT PRO has got the following features :

1. Built-in Pascal programming language (with OOP support).
2. Pending order.
3. Inter-exchange arbitration.
4. Internal arbitration
5. Support for more than 10 cryptocurrency exchanges and all version features LITE(Btc-e.com,Cryptsy.com,Bitstamp.net,GOC.IO,Bter.com,Bittrex.com,Cex.IO,Mintpal.com,BTCChina.com,Cryptonit.net).

The PRO version has a built-in compiler (very fast). Now you can describe almost everything. Unlike the Lite version which, due to the simple writing of the rules, has restrictions on writing technical nature, the new bot does not have them.

A little technical data for users writing strategies on their own:
In the new version, the predefined class TBaseStrategy is responsible for trading. This class has 9 predefined procedures(the list will expand as the bot is updated):
typeTTradeStrategy =class(TBaseStrategy)public procedure OnCreate;override;
procedure OnDestroy;override;
procedure CanBuy (varRCanBuy:boolean;varRAmnt,RPrice:Double);override;
procedure CanSell (varRCanSell:boolean;varRAmnt,RPrice:Double);override;
procedure CanSellMax (varRCanSellMax:boolean;varRAmnt,RPrice:Double);override;
procedure OnSaveState (); override;
procedure onloadState (); override;
procedure OnSendData (); override;functioncancelorder (AOrder:TOrder): boolean;override;end; beginend.

When the bot starts, an instance of this class is created. You can override the procedures by yourself.

procedure OnCreate; - the bot is called one time at startup.
procedure OnDestroy; - called by the bot once when closed.

procedure CanBuy (var RCanBuy:boolean; var RAmnt, RPrice:Double); - is called together with data update, analog of the table of purchase in Lite version (places an order if RCanBuy = True)
procedure CanSell(var RCanSell:boolean; var RAmnt, RPrice:Double); - called with the update data, analog table sale starting from minimum amount to maximum version Lite (puts a warrant if RCanSell = True)
procedure CanSellMax (var RCanSellMax:boolean; var RAmnt, RPrice:Double); - is called together with data update, analog of SELL table MAX in Lite version (places an order if RCanSellMax = True)

For interexchange and vnutriorgannogo arbitration uses the following method :


procedure OnSendData(); - the Procedure for data exchange with other bots PRO. Called by default every second.
In the setup of each bot there is a tab Listener.


In this tab, you specify the name of the current bot PRO and the names of bots PRO from which it will receive data.
After setting the settings, simply specify in this procedure what data to relay.
Example (code of procedure on bot LTC / USD passes its Ticker prices to other bots and calculates the price on the stock glass when buying / selling for a certain volume) :
procedure TTradeStrategy.OnSendData();beginOneOperationVolume:=ReadBotDouble('BTCLTC','OneOperationVolume');// Read the volume of purchase of the bot is configured on a few BTC/LTC WriteDouble('buy',OBCalcPriceIfBuy(OneOperationVolume));// Pass to other bots price glass of LTC/USD at the buying volume OneOperationVolume WriteDouble('sell',OBCalcPriceIfSell(OneOperationVolume));// Pass to other bots price glass of LTC/USD with the sales volume OneOperationVolumeWriteDouble('buyTicker', currTicker.buy); / / pass on the purchase price of LTC/USD WriteDouble('sellTicker') to other bots, currTicker.sell);// pass other bots selling price on тикеруend;

Using this approach, we have an easily scalable arbitration product. And it is still one exchange or different.


Example of the strategy for arbitration (15 bots on all major pairs of BTC-e, the strategy automatically builds all possible pairs of pairs entry USD exit in USD):




Examples of chains from the strategy :

2014-08-31 23 38 48 - ******** NMCUSD ->NMCBTC ->BTCUSD ********
2014-08-31 23 38 04 - Profit = 0.04966928
2014-08-31 23 38 04 - Amount BTCUSD = 100.04966928
2014-08-31 23 38 04 - Amount NMCBTC = 0.28885452
2014-08-31 23 38 04 - Amount NMCUSD = 93.01025163
2014-08-31 23 38 04 - ******** NMCUSD ->NMCBTC ->BTCUSD ********
2014-08-31 23 38 03 - Profit = 0.04966928
2014-08-31 23 38 03 - Amount BTCUSD = 100.04966928
2014-08-31 23 38 03 - Amount NMCBTC = 0.28885452
2014-08-31 23 38 03 - Amount NMCUSD = 93.01025163
2014-08-31 23 38 03 - ******** NMCUSD ->NMCBTC ->BTCUSD ********
2014-08-31 23 20 27 - Profit = 0.62229095
2014-08-31 23 20 27 - Amount USDRUR = 100.62229095
2014-08-31 23 20 27 - Amount BTCRUR = 4 063.20473474
2014-08-31 23 20 27 - Amount BTCUSD = 0.20878705
2014-08-31 23 20 27 - ******** BTCUSD - > BTCRUR ->USDRUR ********
2014-08-31 23 20 26 - Profit = 0.62229095
2014-08-31 23 20 26 - Amount USDRUR = 100.62229095
2014-08-31 23 20 26 - Amount BTCRUR = 4 063.20473474
2014-08-31 23 20 26 - Amount BTCUSD = 0.20878705
2014-08-31 23 20 26 - ******** BTCUSD - > BTCRUR ->USDRUR ********
2014-08-31 23 20 25 - Profit = 0.62229095
2014-08-31 23 20 25 - Amount USDRUR = 100.62229095
2014-08-31 23 20 25 - Amount BTCRUR = 4 063.20473474
2014-08-31 23 20 25 - Amount BTCUSD = 0.20878705
2014-08-31 23 20 25 - ******** BTCUSD - > BTCRUR ->USDRUR ********
2014-08-31 22 58 04 - Profit = 0.00344723
2014-08-31 22 58 04 - Amount BTCUSD = 100.00344723
2014-08-31 22 58 04 - Amount. = 0.20919385
2014-08-31 22 58 04 - Amount LTCUSD = 20.73324212
2014-08-31 22 58 04 - ******** LTCUSD ->. ->BTCUSD ********
2014-08-31 22 58 03 - Profit = 0.00344723
2014-08-31 22 58 03 - Amount BTCUSD = 100.00344723
2014-08-31 22 58 03 - Amount. = 0.20919385
2014-08-31 22 58 03 - Amount LTCUSD = 20.73324212
2014-08-31 22 58 03 - ******** LTCUSD ->. ->BTCUSD ********
2014-08-31 22 58 02 - Profit = 0.00344723
2014-08-31 22 58 02 - Amount BTCUSD = 100.00344723
2014-08-31 22 58 02 - Amount. = 0.20919385
2014-08-31 22 58 02 - Amount LTCUSD = 20.73324212
2014-08-31 22 58 02 - ******** LTCUSD ->. ->BTCUSD ********
2014-08-31 22 57 10 - Profit = 0.14231572
2014-08-31 22 57 10 - Amount BTCUSD = 100.14231572
2014-08-31 22 57 10 - Amount. = 0.2094415
2014-08-31 22 57 10 - Amount LTCUSD = 20.73727452
2014-08-31 22 57 10 - ******** LTCUSD ->. ->BTCUSD ********
2014-08-31 22 57 09 - Profit = 0.14231572
2014-08-31 22 57 09 - Amount BTCUSD = 100.14231572
2014-08-31 22 57 09 - Amount. = 0.2094415
2014-08-31 22 57 09 - Amount LTCUSD = 20.73727452
2014-08-31 22 57 09 - ******** LTCUSD ->. ->BTCUSD ********




The main documentation is in development (will appear within a week).
We invite programmers with the knowledge of Delphi,Pascal to collaborate in writing strategies to users.

The official link to download the bot: https://bitbucket.org/alexandr228080/1b ... BotPRO.rar

Return to “Trading Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests