How to make a Promise function such that only when a stock price reaches a certain level before I can trigger a BUY/SELL signal?
Would be weird to do this with a promise. This is exactly why you want Reactivity or event based systems:
SomeEventstream.on('data', () => {
if(val === requiredValue) {
// Trigger signal here
}
});
Since you didn’t give any context, I can’t really help you. If it’s UI related you might just want to use Meteor’s / Reacts / Blazes or whatever Reactivity to track value changes and dispatch an action when a certain value has reached.