Krypto-trading-bot: Idea: Profit Taking

Created on 13 Jul 2017  路  7Comments  路  Source: ctubio/Krypto-trading-bot

Just thought I'd put this here for discussion.

The idea is to introduce a percentage-profit variable into the ewma_ls/lms calculation. Any profits are saved by selling down to a tbp of 0.00 when the % factor is reached:

image

improvement

Most helpful comment

Hi yep it's quite different, one is a trading strategy the other one is better market making.

The goal is not to drain here but to play with the EWMA / TBP :)

All 7 comments

Hi not a bad idea, in the spirit of a scalper bot :)

However, don't forget that if the market goes 10 / 15 / 20% up you will leave the train with your 2% only :).

I was thinking about something a bit similar or what could be incorporated in a new ewma strategy.

It's not to have a fixed % you put but to start selling when the market goes under the fast ewma line.
28151829-03769664-6795-11e7-8b1f-7949952b81a5

It's only profit once it's been sold ;).

But you're right it could work better either:

  • Record the maximum value EWMA 50 reaches, if it drops below x% of this maximum, begin selling
  • Monitor the gradient of EWMA 50 and sell as it levels out.

We have to consider of course cases where there is a dip and then it continues to rise, however it's better to take a profit sometimes.

True that!

I don't understand why you want to record the maximum ewma value.
I was thinking something like:

If ewmashort > ewmalong && sma3 > ewmatakeprofit
TP = 1
if ewmashort > ewmalong && sma3 < ewmatakeprofit
TP = 1- (% takeprofit)
if ewmashort < ewmalong && sma3 > ewmatakeprofit
TP = -1 + (% takeprofit)
if ewmashort < ewmalong && sma3 < ewmatakeprofit
TP = -1

With TP = 1 -> full BTC
TP = -1 -> 0 BTC
% takeprofit = % of your stack you want to take profit/ take risks with.
ewmatakeprofit = a third ewma to calculate the difference from the price
sma3 = a simple moving average of 3mn to correct from blurry price movement.

Of course, it's not the final equation (it needs to include ewma sensibility) but I think it's quite good.

So it means:
If your ewma are up + price is above your third ewma -> be full BTC
If the ewma are up but the price is under your third ewma -> sell a part of your stack (and put 100% if you want to go all in).
If the ewma are down but the price is above your third ewma -> buy a part of your stack
If the ewma are down and the price is under your third ewma -> be completely out.

What do you think ?

I did a simulation on what it would look like on LTC USD with ewma 20 as the third ewma and 150 / 300 as the main ones:

1) the ewmas are up + price is above your third ewma -> be full BTC
2) the ewmas are up but the price is under your third ewma -> sell a part of your stack (and put 100% if you want to go all in).
3) the ewmas are down but the price is above your third ewma -> buy a part of your stack
4) the ewmas are down and the price is under your third ewma -> be completely out.

capture d ecran 2017-07-13 a 11 20 15

is this different from https://github.com/ctubio/tribeca/issues/100 ?

if is different, are we sure we want 2 ways to aggressively drain?
if is the same or very similar, can we join them and remove one?

Hi yep it's quite different, one is a trading strategy the other one is better market making.

The goal is not to drain here but to play with the EWMA / TBP :)

Unlocking doesn't fix depleted funds anyway 馃嵓

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Camille92 picture Camille92  路  6Comments

werkkrew picture werkkrew  路  5Comments

rconnelly picture rconnelly  路  4Comments

ghost picture ghost  路  5Comments

wulabs picture wulabs  路  3Comments