Last candle data
#4
Oh, missed that bit. In init, create a last candle var.
Code:
this.lastCandle={};


Then at the end of the check function update this:
Code:
this.lastCandle = candle

If you'd get errors from an undefined last candle, you can set a first run check and for the very first run set lastCandle to candle before it's checked.
  Reply


Messages In This Thread
Last candle data - by Kris191 - 11-23-2018, 10:47 PM
RE: Last candle data - by Gryphon - 11-26-2018, 08:28 AM
RE: Last candle data - by Kris191 - 11-26-2018, 07:27 PM
RE: Last candle data - by Gryphon - 11-26-2018, 07:33 PM
RE: Last candle data - by Kris191 - 11-26-2018, 07:56 PM

Forum Jump:


Users browsing this thread: