リアルタイムモニタリングをベースにしたコードを書く方法について

作者: リン・ハーンありません作成日:2019年10月18日 18時20分54秒 更新日:

リアルタイムに価格を監視する ボールコースのどこに位置する コードはどのように書くべきか


もっと

bk_fund currentPrice设置为当前tick.Last的价格,可以获得实时的价格处于boll的位置

bk_funddef boll_locateB_bandWidth ((closeArr, currentPrice=None, time_period=20, critical_std=2.5, ma_type=0): このリストは,このリストのいずれかに該当している. "私は,あなたが知っている. locateB: (最新価格 - 下線) / (上線 - 下線) 帯域幅:帯域幅指標, (上線・下線) /中線 1.locateBは,ブリンズ帯の最新価格の位置を記述します. locate B > 1 は,価格が上線されていることを示します. locate B < 0 は,価格が下線にあることを示します. locateB = 0.5 価格が中盤に 2.locateBは,取引の意思決定において非常に有用なツールです. 3.帯域幅指標は,相対的な概念で,ブリンラインの幅の変化を記述する. 4. 帯域幅は,ブリンラインの収束性を識別するために使用できる. 5. 帯域幅は,市場トレンドの始まりと終わりを識別するために使用できます "私は,あなたが知っている. closeArr = np.array ((closeArr) について) upperband, middleband, lowerband = talib.BBANDS ((closeArr, timeperiod=time_period, nbdevup=critical_std, nbdevdn=critical_std, matype=ma_type) について説明している) lastClose = closeArr[-1] lastUpper = アッパーバンド[-2] lastMiddle = ミドルバンド[-2] lastLower = ローバーバンド[-2] バンドウィッド = (lastUpper - lastLower) / lastMiddle diff_middle = ミドルバンド[-1] - ミドルバンド[-time_period] #locateBの値を計算する if currentPrice is None (現在の価格がない場合): locateB = (lastClose - lastLower) / (lastUpper - lastLower) ローカルB = (lastClose - lastLower) / (lastUpper - lastLower) ローカルB = (lastClose - lastLower) / (lastUpper - lastLower) return round ((locateB,3), round ((bandWidth, 3), round ((diff_middle, 3) について else: はコメントを受け付けていません locateB = (currentPrice - lastLower) / (lastUpper - lastLower) ローカートB = (currentPrice - lastLower) ローカートB = (currentPrice - lastLower) / (lastUpper - lastLower) ローカートB = (currentPrice - lastLower) / (lastUpper - lastLower) ローカートB = (currentPrice - lastLower) / (lastUpper - lastLower) return round ((locateB,3), round ((bandWidth, 3), round ((diff_middle, 3) について

小草基本を学び,図書ライブラリを簡単にできます https://www.fmz.com/bbs-topic/4158