node v4.9.1
version: 2.0.0
const SMA = require('technicalindicators').SMA let period = 8; let values = [1,2,3,4,5,6,7,8,9,10,11,12,13]; SMA.calculate({period : period, values : values})


  • posted 8 months ago by luxyan
    Can anyone tell me the conditions of the indicators, especially the SMA and EMA? I'm talking about I added the indicators in my robot, now in the robot I want to make the strategy, for example in RSI I know that below 30 buys and above 70 sells, but in SMA and EMA what are their values? does it go from 1 to 10? greater than 5 is it above average and below 5 is it below average?
  • posted 2 months ago by ki2thap
    I doubt it. The values should equal an array of numbers like prices. You must provide that data from chart. var prices = [27.59,27.59,22.85,20,24.54,31.12,28.06,17.94,20.47,16.94,32.26,34.21,35.26,33.18]; let values = prices;

sign in to comment