Get current 10 minutes candle and last 10 minutes candle
#2
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;
}
  Reply


Messages In This Thread
RE: Get current 10 minutes candle and last 10 minutes candle - by askmike - 07-26-2018, 02:11 PM

Forum Jump:


Users browsing this thread: