Mike Fishy and Automation System Programming (Bots)


#464

Should i contact to HP printer support for printing solution. What is the process to getting a bit coin?


#465

I am making a bit of code that might be considered as a bitcoin printing press… The will is there at least. Time will telll

Crash


#466

That’s a great name for your bot Mr Crash Gutenberg! :moneybag::moneybag::dollar::newspaper:


#467

Hi all,

Will get back to doing more code soon, but something I always wanted to build in was an API call to Google Trends to evaluate sentiment with something along the lines of:

https://trends.google.com/trends/explore?date=now%207-d&q=BTC%20to%20USD,Bitcoin%20price,how%20to%20buy%20Bitcoin

Could be interesting and open up the bot to some easy AI data.

Stay Fishy


#468

Been working a little on the Google Analytics, it has been interesting, some data below:

When the BTC price goes down, the number of searches for “buy bitcoin” goes up.
There is other correlations where the number of searches for bitcoin trends up hours before a price increase.

Some cool stuff here, but time to get back into things for this new year!

Stay Fishy


#469

I came across this announcement from Google related to crypto indexing at minute 18:35 by Ivan on Tech that will help with gauging “sentiment” and other goodies: https://youtu.be/A23uFiUc7zM


#470

Hi all,

Quick update and I’m going to let you in on some of my secrets.

Based on our current “Follow the Trend” code, you may have noticed (as @mwlang has with all his screenshots a while back), that the bot makes some good choices, but also makes some bad choices.

This is because it is missing a signal we call the “Trade BIAS”.

The Trade BIAS is a signal on the Long Moving Average. We take last last 9 LMA values and create an average. If the average is above the LMA, then our Trade BIAS is “Go Long”, whereas if the average is below the LMA, then our Trade BIAS is “Go Short”. This is similar to the MACD indicator and gives us an idea if the price action is bullish or bearish.

Then we also need some logic on the Short Moving Average and Medium Moving Average as well, plus we need to have more logical values than just guessing what they should be.

So here are the secrets.

The Short Trend should be a small value, the Medium Trend should be the Short Trend times 4 and the Long Trend should be the Medium Trend times 6. Our BIAS indicator should always be 9.

As the Short trend moves to crossing the Medium Trend when in a price dip, then as it approached this area, the price action going down should be at a diminishing rate.
IE: for each iteration of the price, the difference between the current price and the previous price should be reducing - or compressing, which indicates that the sell pressure is dropping and the bulls are taking the reigns.

The Short Trend should be calculated as the number of iterations between the time it takes for the short trend to cross the medium trend and back (a full cycle).

Then logic starts to be geared around: If the Trade BIAS is “Go Long” then “Do trades”, otherwise don’t do trades and wait. Then the “Do trades” is when the short and medium cross with the good indication of price action compression.

I hope this makes sense and I will try and get code together to show how this works and why it works and how it makes the bot execute in a much more positive way with significantly less stop losses.

However, my values and logic secrets are out :slight_smile:

Stay Fishy


#471

Hi all,

After putting together some code and reviewing my old code, I realised that statement above is wrong.

I will provide the correct method once I make sure my code is right :slight_smile:

Cheers…

Mike Fishy


#472

Awesome. That write up was indeed a missing piece of the puzzle here. I know from my own experimentation that we needed to be trading with the trend but finding a good method of calling the bias as you termed it – that’s been a huge challenge all in all. So I definitely look forward to learning how you approached this with code.


#473

@Mike_Fishy,

One other critical piece of the puzzle, which I think you allude to in the above excerpt, that is missing in the current scripts is dynamically measuring cycle lengths so as to adaptively set short, mid, and long term durations. To that end, since you’ve been quiet, I’ve been studying and learning about cycles vs. trend mode from John Ehlers’ books on the subject and using his techniques for dominant cycle measurements. So I get a “DC” value (for dominant cycle) that looks something like this:

Once I had this, I started calculating RSI and momentum from the DC value and it’s working fairly well. The main problem is during extended down-trend, profits indeed are eroded and I recognized even before your post about trend bias that I needed to not be trading when overall trend is down/flat AND volatility is also low.

I am still working to understand cycle measurement and what values are the ideal values to use for tracking trends, so I hope you’ll address cycle lengths as they pertain to setting the short, mid, and long durations.

For others reading this, my Ehlers code for computing dominant cycle length is in Ruby, not PHP. I’ve privately given this code out to pub members in the discord channel for trading-bots, but if others are keenly interested in this same code, let me know. If interest levels are high enough, I may try to pull together into a proper open source project – please be aware, the code is ONLY what’s needed to measure the dominant cycle and a few other of Ehlers indicators as described in his two books,

  • Rocket Science for Traders: Digital Signal Processing Applications
  • Cybernetic Analysis for Stocks and Futures: Cutting-Edge DSP Technology to Improve Your Trading

It’ll be up to you to take such and turn it into profitable trading strategies or adapt to Fishy’s PHP scripts, so please only ask if you’re truly interested in doing what it takes to build your bots.

For those of you learning to code in any language and interested in Ruby, check out the following for how to get started: https://infinum.co/the-capsized-eight/becoming-a-ruby-on-rails-developer

Michael


#474

The Dominant Cycle is an interesting method, mine was significantly more simple :slight_smile:

I simply waited for period of sideways action and looked at how long it took for to go from a low to a high and back, which is generally around 25-27 minutes on average. I then took this number of iterations and divided by 4 for the ST and multiplied by 6 for the LT. Since my code wasn’t all that smart, it would not adjust it again until the next day.

Also, I wrote:

The Short Trend should be calculated as the number of iterations between the time it takes for the short trend to cross the medium trend and back (a full cycle).

That should have read the Medium Trend and during a sideways action period. When you can “guess” the timings of the other bots, you can work with them and ride the waves.

I’ve been out with several friends lately devising the business plans for this year and it’s involved a lot of Baijiu, so my brain is a bit mush still :smiley:

Stay Fishy


#475

It looks to me that with a combination of dynamically tunable dynamic factors and some logic to assess market direction then you have the functionality of a pretty dam good bit of code.

My concerns come down to two main areas:

  1. Indicators - somewhat relieved by the last few posts
  2. Bid management - I have had some advice to just use market orders to ensure that it goes and to keep placing them if it doesn’t complete.

I am still making my way through Crash Course on python. Its a good book. Really enjoying it.

Crash


#476

I wouldn’t use market orders unless its a deep market with liquidity. Even then, market orders are dangerous. Perhaps use a stop limit order that bids over the last offer (if getting long). Good order management is part of your edge. Paying the spread adds up over time.


#477

Entropy,

This is why the pub is so good! You have just given me one hell of an idea. Thanks for your input. Just need to predict as well as I can the cycles and set up the stop loss at that point and if it keeps going long cancelling the stop loss. Its going in the correct way.

Definitely some food for thought. Thanks for a very succinct response.

Crash


#478

I use market orders in my code, but there is a LOT of code for managing the orders.

Using Market buys/sells, does fairly much guarantee the orders complete, but you have to be careful and query the orders to see how much they are and the quantities.

For example, you want to buy 100 of something. If the lowest sell order is $1 and has a quantity of 25, then the next sell order is $1.10 and has 25, then the next one is $1.50 and has 25 with finally the last one at $1.75 with a quantity of 25, then you have to process that to see the average price you bought for.

Market orders tend to be ok on small quantities, but on large quantities, it is worth the effort to code some order management. Setup your buy orders (that you are hoping someone will sell to) and adjust them over a time period that suits the speed of the bot, then cancel any incomplete or partially complete and deal with the outcome.

There is always more trades which can be done, so trying to complete every order is a lower priority than getting the right price.

Stay Fishy


#479

Same for me for the mainline trading strategies. I check the order book depths for a given quantity desired and know the synthesized price from however many rows on the order book would be consumed with my order. I’ve heard the term “slippage” in trading parlance, so I tend to think of the difference between last traded price and the synthesized price as the “slippage” and will skip the trade (or reduce order to consume only the N rows to keep this slippage percentage below a arbitrarily set threshold.

I do use limit orders for some of those CDA’s where stop/loss hunting is happening, but I’m placing the order to a predicted estimate of where the next stop/loss hunt will reach in the order books, so it’s kind of an “out of the money” style of trading. As long as the CDA is going largely side-ways, works great, but if it turns south in a big way, can end up forcing a stop/loss sell.


#480

Hi Team,

I have been putting together code and testing, but going to hold off sharing at the moment as it is kinda buggy and doesn’t quite perform how it should.

Plus, every time you write some code and test it, you always find a way in which it can be better LOL

During some of the testing, I have figured out a method that can be an easy and effective indicator to trade on, so I’m going to iterate on the code more to make something more useful with a modified strategy (that just seems to work right in theory, but when you put it into practise, you find all the gotchas).

Anyway, just an update to say I’m still working on a new unique strategy and code and will post it up once I’m reasonably happy with it.

Stay Fishy