Mike Fishy and Automation System Programming (Bots)


#121

Crypto is Crazy

So technically, trading two supposed “stable coins” against each other where both are supposedly backed by the USD, makes the USD a Forex to the USD and volatility occurs.

Is it just me, or is this complete craziness? :stuck_out_tongue:

Stay Fishy


#122

Added a new strategy to the bot today, so far the code seems stable.

The new strategy is called Traffic Lights and is a bit complex, but a very aggressive bot and is doing quite well so far. Its been running for about 3 hours and has done over 100 trades already, but really small percentages, so its only managed to turn the 2 BTC I gave it into 2.39482 BTC.

Still was an interesting new strategy to add to the collection and my source code now just exceeded 800Mb.

The market volatility in this “trade war news hype” period has been awesome, things are all over the place. Shall be yet another interesting weekend for the analytics.

Stay Fishy


#123

Fixed a metric ton of bugs in the new strategy code and added some new features.

It now reports how much I’m making Binance in fees since the new strategy can do just over 1000 trades a day due to it’s excessive aggressiveness. Seems Binance is starting to love me with how much the bot makes them LOL.

Anyways, back to the grind, need to complete a few more tasks before turning in.

Stay Fishy


#124

@Mike_Fishy Are you planning to create a buyable product from your bot with different setups? If it has a GUI which can be interpreted by ordinary people it would have a good market I think. At least I would probably buy a copy of it with a basic setup for training purposes. :star_struck: Maybe I would try to use it without GUI too.

Sorry if this question came up before.


#125

So, what is this new aggressive strategy? “Traffic Lights and is a bit complex” is kinda obtuse, ya know? :slight_smile:


#126

The new strategy works by tracking over 1800 trading pairs and pre-defined milestones.

As each CDA reaches certain milestones, it preps the bot to rapid trade it in succession, generally pulling 0.35% at a time, which after fees (0.1% buy and 0.1% sell), results in 0.15% trades.

Still very much in testing stage and it takes about 1.5 hours to start up before it fires off rapid trades, but basically looks like this (this is the BNB one, there is separate ones for BTC and ETH as they need to all run in parallel and talk to each other for cross-trade opportunities).

TL

So yes, a lot more complex as the 3 tasks also open socket connections with each other to communicate milestone data, while a 4th process (the monarch) controls the traffic lights (stop, start, idle).

When coding such bots, need to stop thinking like a human and start thinking like a parallel computing platform (or a team of humans that need to work together for a strategic goal).

However, in terms of the milestones, there is basic rules at the moment which I am expanding upon.

All still very much in testing stages and so far it seems to make Binance more money than me LOL.

Stay Fishy


#127

Fascinating stuff. I get the concept of multiple bots talking to each other for cross-trade opportunities. That’s smart and a good way to segment logic. What I don’t quite get: What constitutes a milestone?


#128

The milestones are broken down into functions that cause the decision making of the bots.

  • Buy Ready - there is no current orders on the DCA by any of the processes and is available in the pool of CDA’s to trade.
  • Buy Prep - the TA has decided that the CDA is heading to a buy potential
  • Buy Order - the CDA has reached the buy potential and the bot buys some and signals the other bots it is active on the CDA or if cancelled, releases the CDA back to the Buy Ready milestone state.
  • Buy Completed - the buy order has completed or adjusted to get completed - order management to get the order completed. Signals other bots it has bought the CDA with quantity and estimated value.
  • Sell Ready - any of the bots look for the TA milestones that the CDA purchased is headed for a sell opportunity.
  • Sell OK - one of the bots has identified the CDA has reached a sell potential and signals the other bots it is active on the CDA.
  • Sell Order - the sell order has been completed or been cancelled or adjusted to get completed - order management stuff is done. If cancelled, places CDA back to the Sell OK milestone state.
  • Sell Done - marks CDA to the Buy Ready milestone state and perform calculations on how much fees were paid, the volume of CDA that was processed in the trade, the amount of BNB, ETH and/or BTC made and the running percentage.

Edit: there is a few other milestones as well, but you get the jist of it.

Edit: quick example I just pulled off the bot logs:

==========================
Runtime 89.63
Buy Limit order placed on IOTABNB at 0.08370000 with quantity 1314
Array
(
    [symbol] => IOTABNB
    [orderId] => *edited out*
    [clientOrderId] => *edited out*
    [price] => 0.08370000
    [origQty] => 1314.00000000
    [executedQty] => 0.00000000
    [status] => NEW
    [timeInForce] => GTC
    [type] => LIMIT
    [side] => BUY
)
==========================
==========================
Runtime 92.12
Sell Limit order on IOTABTC placed at 0.00015523 with quantity 1313
Array
(
    [symbol] => IOTABTC
    [orderId] => *edited out*
    [clientOrderId] => *edited out*
    [price] => 0.00015523
    [origQty] => 1313.00000000
    [executedQty] => 0.00000000
    [status] => NEW
    [timeInForce] => GTC
    [type] => LIMIT
    [side] => SELL
)
==========================

Quite Fishy


#129

Oh, I see! I was totally going down a different road thought-wise when you mentioned “milestones” It’s more like a mutex/semaphore on the CDA itself to ensure both correct bot is working and no two bots crossing paths on any one CDA at any given moment.

Thanks for clearing that up!


#130

Seems to be coming along nicely now, need to fix a couple of little bugs and some rounding errors :stuck_out_tongue:

Iteration = 4260
Current BNB Price is: 12.90000000 T:DOWN
Running Time: 375.2 mins
Running Strategy: Traffic Lights
AutoBot BNB Made: 65.204330400001
Binance BNB Fees: 15.4548848
AutoBot running Percentage: 59.38

At least it is making me more than it is making Binance now \o/

Stay Fishy