Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Money Flow Indicator

Reference

classMFI(bt.Indicator):lines=('mfi',)params=dict(period=14)alias=('MoneyFlowIndicator',)def__init__(self):tprice=(self.data.close+self.data.low+self.data.high)/3.0mfraw=tprice*self.data.volumeflowpos=bt.ind.SumN(mfraw*(tprice>tprice(-1)),period=self.p.period)flowneg=bt.ind.SumN(mfraw*(tprice<tprice(-1)),period=self.p.period)mfiratio=bt.ind.DivByZero(flowpos,flowneg,zero=100.0)self.l.mfi=100.0-100.0/(1.0+mfiratio)

And here a view of how the indicator works

MFI View


[8]ページ先頭

©2009-2025 Movatter.jp