const shootingstar = require('technicalindicators').shootingstar;
var shootingStarData = [
{
name: 'Bearish',
data: {
open: [29.50, 33.10, 36.00, 42.80, 40.90],
high: [35.90, 37.60, 41.80, 42.80, 43.10],
close: [33.10, 36.00, 40.90, 40.90, 38.05],
low: [26.90, 27.70, 28.00, 33.10, 37.50],
},
},
{
name: 'Bullish',
data: {
open: [29.50, 33.10, 36.00, 40.90, 40.90],
high: [35.90, 37.60, 41.80, 42.80, 43.10],
close: [33.10, 36.00, 40.90, 42.80, 38.05],
low: [26.90, 27.70, 28.00, 33.10, 37.50],
},
},
];
shootingStarData.forEach((patternSet) => {
const result = shootingstar(patternSet.data) ? 'yes' : 'no';
console.log(`Is Shooting Star pattern: ${patternSet.name}? : ${result}`);
});