presence
Member
- Joined
- Dec 20, 2011
- Messages
- 19,330
I wasn't bot trading, but my open source breakout indicator caught the bottom this past week. Think of it like a Ricter Scale. Note the long period of "no activity" There are actually many smaller spikes to +10 -20 +50 -35 etc. which can be used for more micro scale bidding... but look at what this indicator did to last weeks low:
Image may extend off edge of page:
On 60 days scale, 1h candles:
Zooming into 1m candles of just August 19th; you can see that the volatility indicator was sub -1000 when price was still at $400 and falling. The indicator went months with a low no more extreme than around -50; then it registered the earthquake with alarm bells minutes before the bottom. It first registered sub -1000 at 7:41; price was $400 and falling. Five minutes later price hit absolute bottom; about an hour later the volatility indicator returned to "normal"
Here it is normalized:
if v < -1000:
v = -1000
Which shows the explosion to sub -1000 occurred minutes before the bottom.
import talib
SHORT = 2
LONG = 10
LIMIT = 6
def breakout():
pair = data(interval=intervals._1h).btc_usd
shortMa = float(pair.ma(SHORT))
longMa = float(pair.ma(LONG))
longHigh = talib.MA(pair.period(LONG, 'high'), timeperiod=LONG)[-1]
longLow = talib.MA(pair.period(LONG, 'low'), timeperiod=LONG)[-1]
shortHigh = talib.MA(pair.period(SHORT, 'high'), timeperiod=SHORT)[-1]
shortLow = talib.MA(pair.period(SHORT, 'low'), timeperiod=SHORT)[-1]
longRange = 100 * (longHigh - longLow) / shortMa
shortRange = 100 * (shortHigh - shortLow) / shortMa
diff = longRange - shortRange
volatility = round(((diff) * (diff) * (shortMa - longMa)) * 100) / 100
if volatility > LIMIT:
breakout = 1
elif volatility < -LIMIT:
breakout = -1
else:
breakout = 0
return volatility, breakout
def tick():
v, b = breakout()
plot('v', v, secondary=True)
plot('low', data.btc_usd.low)
https://discuss.tradewave.net/t/breakout-indicator/146/6
Image may extend off edge of page:
On 60 days scale, 1h candles:

Zooming into 1m candles of just August 19th; you can see that the volatility indicator was sub -1000 when price was still at $400 and falling. The indicator went months with a low no more extreme than around -50; then it registered the earthquake with alarm bells minutes before the bottom. It first registered sub -1000 at 7:41; price was $400 and falling. Five minutes later price hit absolute bottom; about an hour later the volatility indicator returned to "normal"

Here it is normalized:
if v < -1000:
v = -1000

Which shows the explosion to sub -1000 occurred minutes before the bottom.
import talib
SHORT = 2
LONG = 10
LIMIT = 6
def breakout():
pair = data(interval=intervals._1h).btc_usd
shortMa = float(pair.ma(SHORT))
longMa = float(pair.ma(LONG))
longHigh = talib.MA(pair.period(LONG, 'high'), timeperiod=LONG)[-1]
longLow = talib.MA(pair.period(LONG, 'low'), timeperiod=LONG)[-1]
shortHigh = talib.MA(pair.period(SHORT, 'high'), timeperiod=SHORT)[-1]
shortLow = talib.MA(pair.period(SHORT, 'low'), timeperiod=SHORT)[-1]
longRange = 100 * (longHigh - longLow) / shortMa
shortRange = 100 * (shortHigh - shortLow) / shortMa
diff = longRange - shortRange
volatility = round(((diff) * (diff) * (shortMa - longMa)) * 100) / 100
if volatility > LIMIT:
breakout = 1
elif volatility < -LIMIT:
breakout = -1
else:
breakout = 0
return volatility, breakout
def tick():
v, b = breakout()
plot('v', v, secondary=True)
plot('low', data.btc_usd.low)
https://discuss.tradewave.net/t/breakout-indicator/146/6
Last edited: