Mike Fishy and Automation System Programming (Bots)


@mwlang opening TV now to look at the LazyBear hack, thanks. I had “RSI review” on my notepad so your post was well timed.

My bot wasn’t running during the recent drop but it was in semi-automatic mode during Saturday’s move up. It’s now in fully automatic mode and I’m waiting for the next big move to see how resilient Binance’s API is.

As indicated by the screenshot below, the bot handles normal trading periods without any major problems. One fail in the last 150+ trades and possibly a problem with my WISP. The bot is also on a cloud server and that has even fewer problems i.e. no timestamp hacks required etc.

I’ll get the bot to try the trade a few times if it fails as currently it just skips the trade until the CDA receives the next trading signal.

Like @mwlang I’m very grateful for the inspiration you have provided throughout this thread.


I think it’s line 15 which prior to edit is:

b1= 2.0*a1 * cos(1.414*180 /bandedge)

Link: https://www.tradingview.com/script/ieFYbVdC-Ehlers-Universal-Oscillator-LazyBear/

@mwlang actually the mod is failing to compile on my TV.

OK now, for some reason the edit was losing a couple of multiplications.


@Blynker, looks like you were right…I must’ve inserted a blank line into my version to help me read it better.

First time I’m attempting to publish anything on Trading View:

Hopefully it makes sense and works.


Yes. Ps4 is the way to go now. Especially given the capacity to upgrade the storage PS4 turns into an unstoppable gaming machine. Check the guide https://www.ps4storage.com.


You are my people. This whole thread is fascinating. Thank you for sharing your journey and this sick project.


@Mike_Fishy, which do you find a better strategy:

Given a pool of say, $1000 USD allocated to any one CDA

  1. run one trade at a time, investing full amount allocated plus all profits from each trade, relying on power of compounding to grow the total funds.
  2. split the $1000 into, say four equal amounts of $250 and watch for buy signals and buy at $250 a pop until full funds utilized (eventually, theoretically, you’ll have 5 trades at $250 once $1000 grows to $1250, 6 at $1500, and so on…)


We put our bot into live trading for about 10 hours today (details to follow in the other thread) and it came out with a tiny profit after 74 trades (37 CDA buy and sell).

Currently BTC dictates most CDA trading so you could simply trade a single CDA, but alts tend to have greater volatility. This can be a good or bad thing depending how well your algorithms are working.

Our bot will only hold one pot for any given CDA so from the @mwlang example it would be $1000 for each CDA rather than up to $250 * 4 for each CDA. We don’t actually allocate a specific pot to any CDA though. It’s simply the total trading pot split over the set maximum of CDA’s for each BUY.

We too have a question for the bot masters (2 * Mike).

Do you have a “kill” switch for your bot and does it help mitigate losses on down days?

We have coded up a kill switch that will sell off all CDA’s if BTC dives. We also have a manual kill that we use to close out all our live trades when switching from live to simulated trading. We don’t want to have to manually sell the CDA’s.


I split it into multiple amounts, but then my bot trades multiples of a single CDA as well as multiple CDA’s.

For example: Lets say a CDA has a trend change and starts going up, you buy a position. If it trends up more than 1%, my bot buys a second position. If it trends up another 1%, it buys a third position. As you buy positions on the way up, the highest position is your stop loss where all positions are sold.
IE: as the highest position hits the stop loss risk threshold, all the lower positions are sold as well.

The strategy works only on longer time frames (less aggressive bot). If you want to go the aggressive bot with single positions on short time frames, then use small amounts across as many CDA’s as you can (of course excluding all the ones that just don’t perform).

So I use lots of small positions and with $1000, I would use 100 x $10 positions across multiple CDA’s at once.

However, there is no perfect strategy, it is mostly about managing risk.

Stay Fishy


Any news here in and progress with coding? Thanks a lot for this man! :):slight_smile:


@Mike_Fishy, Thanks for sharing on how you approach this. I like that strategy of buying on the way up. Might as well keep betting on the winning horse until it’s not winning any more.

Do you martingale on losses? That is double your position size for the next buy after a loss.

The reason I ask is because I think it’s a strategy that can go hand in hand with buying on the way up at the 1% marks. After all, we’re reasonably sure the price action will reverse at some point.


Yes, if the ST/MT/LT are good and you buy a position, but it drops and hits your stop loss, wait for the next ST/MT/LT when it is down and buy another position instead of doing a stop loss.

Market is like an elastic band, it always tries to go back where it was in the short term on average. However, if the second position hits the stop loss, then I generally take the loss and flag the CDA as “Dont Trade” for a week. Frees up funds to play on CDAs which are doing better.

After a while, you build up a list of CDAs that are on the “Dont Ever Trade” list (like BCash) :stuck_out_tongue:

That’s why even in the code which was pasted above, there is the “exclude” list.
If it is not performing and end ups on the “Don’t Trade” list a few times, I look at how it is doing overall and if bad, it gets added to the exclude list. My exclude list is a bit long :slight_smile:

New code I’ve been working on, doesn’t get prices from the price API call, I am using the “Depth” API call instead. So far, it doesn’t seem to make a lot of difference other than getting the volume indicator working. The code is getting ugly though, I really need to re-work it.

I’m looking forward to hearing how 3rd party integrations are going to work in Yen.io
I think as a team, we could build an auto trade tool as an extension for people to use.

Stay Fishy