Module: MyTradeWizard::TechnicalIndicator
- Included in:
- TradingSystem
- Defined in:
- lib/mytradewizard/technical_indicator.rb
Instance Method Summary collapse
Instance Method Details
#SMA(bars) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/mytradewizard/technical_indicator.rb', line 4 def SMA() x = 0 n = 0 .each do || x += .close n += 1 end return x / n end |