Beispiel #1
0
    if len(ticker) != 3:
        continue
    _volume = ticker_data['nmTotalTradedQty']
    _minVol = getMinVolumeByTime()
    if type(_volume) is not int or _volume < _minVol:
        continue
    open = ticker_data['openPrice']
    close = ticker_data['matchedPrice']
    highest = ticker_data['highest']
    lowest = ticker_data['lowest']
    total_height = highest - lowest
    body = abs(close - open)
    head = _upf(close, open, highest)
    tail = _botf(close, open, lowest)

    condition1 = True if tail > 0.65 * total_height else False
    condition2 = True if total_height > 0.05 * close else False
    # today has a long tail
    if condition1 is True:
        # print(ticker)
        if condition2 is True:
            # print(ticker)
            history_ticker_data = stockHistory.getStockHistoryData(
                ticker)  # not include today data
            # # print(history_ticker_data)
            htd = jModel.convertToJapanCandle(history_ticker_data)
            _close = htd.Close.to_numpy()
            isDownTrend = jModel.isDownTrendV2ByRSI(_close)
            if isDownTrend is True:
                # print(ticker)
                sendTelegramMessage(ticker)
Beispiel #2
0
#
import vn_realtime_stock_data.stockHistory as stockHistory
import method.JavCan as jModel
#
ticker = 'ACB'
history_ticker_data = stockHistory.getStockHistoryData(ticker)
htd = jModel.convertToJapanCandle(history_ticker_data)
_close = htd.Close.to_numpy()
isDownTrend = jModel.isDownTrendV2ByRSI(_close)
print(isDownTrend)