The Litepresence Report on Cryptocurrency

Anyone got some "falling knife" advice? I'm thinking of setting a spread of descending limit orders.

if the market is bear, and 12h ma2 < 12h ma90;

if 12h ma2 < 0.75* 12h ma55

catch the knife; hold minimum 12 hours after ma2 > .75*ma55


15 instances; +/- 20% average gain since jan 2012
 


Ultra low frequency
6 SAR Harmonica Open Source recently Bought
[2014-11-15 09:00:00] D-Stroy
[2014-11-15 09:00:00] SELL: 2.63492783 BTC (at 378.667 USD)
[2015-03-03 15:00:00] ARMY
[2015-03-03 15:00:00] BUY: 3.59612963 BTC (at 276.899 USD)
36.6% BTC GAIN


https://tradewave.net/strategy/yAQIvxLfgg/editor


IMAGE FROM MY PERSONAL 'DIRTY DUTCH' TUNE WHICH ALSO EXECUTED THE SAME LAST TWO TRADES:

KUsCRSe.png
 
Last edited:
Been running the 80x version of HB with a throw-away amount. coinsetter has yet to give the $100 despite emailing them twice...thinking HB needs to make a trade first?

[2015-03-02 20:57:07] Starting...
[2015-03-02 20:57:10] Found existing storage containing 30 keys.
[2015-03-02 20:57:10] >> Starting portfolio:
[2015-03-02 20:57:10] >> [0.10423516 BTC]
[2015-03-02 20:58:00] 0
[2015-03-03 20:58:00] 1
[2015-03-04 20:58:00] 2
[2015-03-05 20:58:00] 3

The 6 SAR Harmonica sold in November and sat still until now? That's strange.

Nice beats in that video. You need a bot called cthulhu. :cool:



When he sells, he sleeps. When he buys, he dreams (of the bankers losing their power)
 
Last edited:
Been running the 80x version of HB with a throw-away amount. coinsetter has yet to give the $100 despite emailing them twice...thinking HB needs to make a trade first?

send me a pm with your user name there, I'll contact Jaron for you


The 6 SAR Harmonica sold in November and sat still until now? That's strange.

Yes. The bot, as released freeware, is designed mostly to divide the long chart up in to managable segments. Each is classified and could be later subdivided again. It has made only 16 trades in the past 2 years. I'm building code to trade each subsection for an upcoming commercial release; hopefully towards April/May. This is the same way I began the Honey Badger project; but here I'm using a SAR mesh instead of several long MA's.

Nice beats in that video. You need a bot called cthulhu. :cool:

I dig it. Next major brainstorm. I have a MACD / Bollinger Band script I've been mulling.


6 SAR was built under the influence of Turkish Electro House Music and while watching Arabian Nights:

All the logs are either quotes from Arabian Nights, names of Turkish House DJ's or tracks, or when selling... reference well known scams

log('%s Arabian Nights' % int(rest))
log('We`ll continue after I`ve had my rest')
log('Until then the silk road')
log('will fulfill your requirements')

log('Oyle Bir Gecer Zaman Ki')
log('Uzun Ince Bir Yoldayim')


log('I`m Nigerian Princess Zubaru Zalani')
log('Send Money Order to Inherit Your Fortune')

log('Tony76 says `release funds immediately`')
 
You need a bot called cthulhu. :cool:

By request. Open Source.

x2wTx4C.png



Code:
# Bollinger Bands Mean Reversion v3.0 
''' CALL OF CHTULHU '''
# litepresence

# with rolling max drawdown

######################################################
# Sail with Caution:  Chtulu Will Eat You!
######################################################
DEPTH = 2
MA_PERIOD = 40
STD_PERIOD = 40
THRESHOLD_1 = 20.00
THRESHOLD_2 = 1.000
THRESHOLD_3 = 1.000
THRESHOLD_4 = 1.000
THRESHOLD_5 = 1.000
THRESHOLD_6 = 1.000
THRESHOLD_7 = 1.000
THRESHOLD_8 = 2.000
THRESHOLD_9 = 2.000
MIN_WIDTH = False
MAX_DRAW = False
######################################################
######################################################
######################################################

def initialize():
    storage.invested = False
    storage.hold = storage.get('hold', False)
    storage.trades = storage.get('trades', 0)
    storage.order_fee = storage.get('order_fee', 0)

def tick():
    
    # build fresh arrays on each tick
    ma = []
    std = []
    upper = []
    lower = []
    width = []
    price = []
    for n in range(DEPTH):
        ma.append(0)        
        std.append(0)
        price.append(0)
        upper.append(0)
        lower.append(0)
        width.append(0)
    for n in range(DEPTH):
        ma[-n] = (data[info.primary_pair][-n].ma(STD_PERIOD))        
        std[-n] = (data[info.primary_pair][-n].std(MA_PERIOD))
        price[-n] = (float(data[info.primary_pair][-n].close))
    for n in range(DEPTH):
        upper[-n] = (ma[-n] + (Decimal(2) * std[-n]))
        lower[-n] = (ma[-n] - (Decimal(2) * std[-n]))
    for n in range(DEPTH):    
        width[-n] = (float(upper[-n] - lower[-n]))        

    # check arrays
    if info.tick == 5:
        log('std')
        for n in range(DEPTH):
            log('%.2f %s' % (std[-n], -n))
        log('ma')
        for n in range(DEPTH):    
            log('%.2f %s' % (ma[-n], -n))
        log('upper')
        for n in range(DEPTH):    
            log('%.2f %s' % (upper[-n], -n))
        log('lower')
        for n in range(DEPTH):    
            log('%.2f %s' % (lower[-n], -n))
        log('width')      
        for n in range(DEPTH):    
            log('%.2f %s' % (width[-n], -n))
        log('price')
        for n in range(DEPTH):    
            log('%.2f %s' % (price[-n], -n))

    min_width = float(min(upper)-max(lower))
    
    if MIN_WIDTH:
        diff = (width[0] - min_width) / (min_width + 0.000001)        
    else:
        diff = (width[0] - width[-1]) / (width[-1] + 0.000001)

    if diff > 1:
        diff = 1
        
    # PRICE IS CHANNELED:    
    
    # ENTER if price is 2 standard deviations BELOW moving average
    # EXIT if price is 2 standard deviations ABOVE moving average
    
    threshold = (float(DEPTH)/float(THRESHOLD_1))

    if diff < threshold:
      if storage.hold == False:    
        if THRESHOLD_2*price[0] < lower[0] and not storage.invested:
            log('Buy Channel')            
            order = buy(info.primary_pair)
            storage.invested = True
            storage.hold = False
            storage.trades += 1
            storage.order_fee += (
                order.fee.to_float() * float(order.price))
        
      if storage.hold == False:                 
        if THRESHOLD_3*price[0] > upper[0] and storage.invested:
            log('Sell Channel')
            order = sell(info.primary_pair)
            storage.invested = False
            storage.hold = False
            storage.trades += 1
            storage.order_fee += order.fee.to_float()

    # PRICE IS TRENDING:
    
    # If CHANNEL opens, ENTER and HOLD if price is ABOVE moving average
    # If CHANNEL opens, EXIT and HOLD if price is BELOW moving average 

    else:

        if (THRESHOLD_4*price[0] > ma[0]) and not storage.invested:
            log('Buy Breakout')            
            order = buy(info.primary_pair)
            storage.invested = True
            storage.hold = True
            storage.trades += 1
            storage.order_fee += (
                order.fee.to_float() * float(order.price))
        if (THRESHOLD_5*price[0] < ma[0]) and storage.invested:
            log('Sell Breakout')            
            order = sell(info.primary_pair)
            storage.invested = False        
            storage.hold = True
            storage.trades += 1
            storage.order_fee += order.fee.to_float()

    # TREND IS ENDING:
    
    # If HOLDING FIAT trend, ENTER if price is ABOVE moving average
    # If HOLDING BTC trend, EXIT if price is BELOW moving average    

    if storage.hold == True:            
        if not storage.invested:
            if THRESHOLD_6*price[0] > ma[0]:
                log('Buy Bottom')                
                order = buy(info.primary_pair)
                storage.invested = True
                storage.hold = False
                storage.trades += 1
                storage.order_fee += (
                    order.fee.to_float() * float(order.price))
        elif storage.invested:
            if THRESHOLD_7*price[0] < ma[0]: 
                log('Sell Top')                
                order = sell(info.primary_pair)
                storage.invested = False
                storage.hold = False
                storage.trades += 1
                storage.order_fee += order.fee.to_float()

    if info.tick % (3600/info.interval) == 0:
        plot('MA', ma[0])
        plot('Upper', upper[0])
        plot('Lower', lower[0])
        plot('diff', diff, secondary=True)
        plot('threshold', threshold, secondary=True)
        if info.tick == 0:
            plot('offset', 5, secondary=True)
            
    if MAX_DRAW:
        dd()
            
if MAX_DRAW:
    import time    
    ROLLING = 30 # days       
        
    def dd():
    
        if info.tick == 0:
            storage.start = time.time()    
        dd, storage.max_dd = max_dd(0)
        bnh_dd, storage.max_bnh_dd = bnh_max_dd(0)
        rolling_dd, storage.max_rolling_dd = max_dd(
            ROLLING*86400/info.interval)    
        rolling_bnh_dd, storage.max_rolling_bnh_dd = bnh_max_dd(
            ROLLING*86400/info.interval)
        
        plot('dd', dd, secondary=True)   
        plot('bnh_dd', bnh_dd, secondary=True)    
        plot('rolling_dd', rolling_dd, secondary=True)  
        plot('rolling_bnh_dd', rolling_bnh_dd, secondary=True)       
        
        plot('zero', 0, secondary=True)
        if info.tick == 0:
            plot('dd_floor', -200, secondary=True)
    
    def max_dd(rolling):
        
        port_value = float(portfolio.usd+portfolio.btc*data.btc_usd.price)
        max_value = 'max_value_' + str(rolling)
        values_since_max = 'values_since_max_' + str(rolling)
        max_dd = 'max_dd_' + str(rolling)
        storage[max_value] = storage.get(max_value, [port_value])
        storage[values_since_max] = storage.get(values_since_max, [port_value])
        storage[max_dd] = storage.get(max_dd, [0])
        storage[max_value].append(port_value)    
        if port_value > max(storage[max_value]):
            storage[values_since_max] = [port_value]
        else:
            storage[values_since_max].append(port_value)
        storage[max_value] = storage[max_value][-rolling:]
        storage[values_since_max] = storage[values_since_max][-rolling:]    
        dd = -100*(max(storage[max_value]) - storage[values_since_max][-1]
            )/max(storage[max_value])
        storage[max_dd].append(float(dd))
        storage[max_dd] = storage[max_dd][-rolling:]
        max_dd = min(storage[max_dd])
    
        return (dd, max_dd)
      
    def bnh_max_dd(rolling):
        
        coin = data.btc_usd.price
        bnh_max_value = 'bnh_max_value_' + str(rolling)
        bnh_values_since_max = 'bnh_values_since_max_' + str(rolling)
        bnh_max_dd = 'bnh_max_dd_' + str(rolling)    
        storage[bnh_max_value] = storage.get(bnh_max_value, [coin])
        storage[bnh_values_since_max] = storage.get(bnh_values_since_max, [coin])
        storage[bnh_max_dd] = storage.get(bnh_max_dd, [0]) 
        storage[bnh_max_value].append(coin)
        if coin > max(storage[bnh_max_value]):
            storage[bnh_values_since_max] = [coin]        
        else:
            storage[bnh_values_since_max].append(coin)
        storage[bnh_max_value] = storage[bnh_max_value][-rolling:]        
        storage[bnh_values_since_max] = storage[bnh_values_since_max][-rolling:]  
        bnh_dd = -100*(max(storage[bnh_max_value]) - storage[bnh_values_since_max][-1]
            )/max(storage[bnh_max_value])
        storage[bnh_max_dd].append(float(bnh_dd))
        storage[bnh_max_dd] = storage[bnh_max_dd][-rolling:]    
        bnh_max_dd = min(storage[bnh_max_dd])    
        return (bnh_dd, bnh_max_dd)    
       
 
def stop():
    

    if MAX_DRAW:
        # MAX DRAW DOWN
        #########################
        
        log('ELAPSED TIME: %.1f sec' % (time.time() - storage.start))
        log('MAX DD......: %.2f pct' % storage.max_dd)
        log('R MAX DD....: %.2f pct' % storage.max_rolling_dd)
        log('MAX BNH DD..: %.2f pct' % storage.max_bnh_dd)
        log('R MAX BNH DD: %.2f pct' % storage.max_rolling_bnh_dd)               


    
    log('Total Trades.: %s' % storage.trades)
    log('Exchange.....: %s' % info.primary_exchange)
    log('Fee Percent..: %s' %
        fees[exchanges[str(info.primary_exchange)]][info.primary_pair]) 
    log('Fees Paid....: %.2f' % storage.order_fee)
    log('Fees Paid BTC: %.2f' % 
        (storage.order_fee/float(data[info.primary_pair].price)))


v3.0 Oct 1 through Mar 7 Open Source

[2015-03-04 16:00:00] SELL: 48.37389905 BTC (at 269.96 USD)
[2015-03-07 12:00:00] Total Trades.: 104
[2015-03-07 12:00:00] Exchange.....: btce
[2015-03-07 12:00:00] Fee Percent..: 0.002
[2015-03-07 12:00:00] Fees Paid....: 2173.4412192
[2015-03-07 12:00:00] >> Starting portfolio:
[2015-03-07 12:00:00] >> [10000.00 USD]
[2015-03-07 12:00:00] >> Closing portfolio:
[2015-03-07 12:00:00] >> [13032.89975264 USD]
[2015-03-07 12:00:00] >> Profit: 3032.89975264


v3.0 Personal Tune
[2015-03-04 16:00:00] SELL: 55.76185134 BTC (at 269.96 USD)
[2015-03-07 11:00:00] Total Trades.: 114
[2015-03-07 11:00:00] Exchange.....: btce
[2015-03-07 11:00:00] Fee Percent..: 0.002
[2015-03-07 11:00:00] Fees Paid....: 2556.73
[2015-03-07 11:00:00] Fees Paid BTC: 9.47
[2015-03-07 11:00:00] >> Starting portfolio:
[2015-03-07 11:00:00] >> [10000.00 USD]
[2015-03-07 11:00:00] >> Closing portfolio:
[2015-03-07 11:00:00] >> [15023.36245109 USD]
[2015-03-07 11:00:00] >> Profit: 5023.36245109


30% BNH LOSS
50% CASH GAIN
110% BTC GAIN

~1 Trade every 36 hours



v3.04 Released

https://tradewave.net/strategy/yTtpSyggAH
 
Last edited:
where do you guys see the btc going. up or down. when will we be hitting high numbers again
 
pres, Jaron got back to me. Thanks man. :D

Can't PM you, says your inbox is full. Talk to Bryan and he should be able to expand you.
 
It looks like it really wants to go up. It will take a lot more though before I'm convinced the long downtrend is over.
 
Quintessential Behavior of Cthulhu:
lORhqwS.png



1) Price touches bottom of channel; BUY
2) Price touches top of channel; SELL
3) Channel opens; Price is above MA, BUY
4) Hold Trending until Price is below MA, SELL
5) Price touches bottom of channel, BUY
6) Price touches top of channel, SELL
7) Repeat 5
8) Repeat 6
9) Channel opens bearish after sale, wait until expansion stops then, BUY
10) Channel opens bullish after buy, wait until expansion stops then, SELL
11) Expansion continues, BUY and hold
12) Repeat 4
 
310-320 is the top of this wave IMO. Thinking about pulling more out of cold storage. I want that 80-130 scoop before a big phat run.

Need an animating gif of the tiny little BTC boat from the CNN show. Owning those waves.
 
Back
Top