07-26-2018, 02:11 PM
I'm working on some strategy guides and some videos. What you want to do is "store" the previous candle in your strategy like so:
Code:
strat.check = function(candle) {
this.currentCandle = candle;
// use the current and previous one
if(this.currentCandle.close < this.previousCandle.close) { ... etc }
// call the current candle previous one so the next time
// the check function runs you can still access it
this.previousCandle = this.currentCandle;
}