What's the variable holding the last filled buy order price?
#2
(09-20-2019, 02:30 AM)orpheous Wrote: Is there a feature that holds the last filled buy order price that I can include in my strategy?

Yes, call the onTrade function for all sorts of trade information. The onTrade function is called every time an advice is acted upon.

Example code;

Code:
strat.onTrade = function(trade) {
 if (trade.action == 'buy') {
   log.info('trade price: ', trade.effectivePrice);
 }
}
  Reply


Messages In This Thread
RE: What's the variable holding the last filled buy order price? - by Hallonstedt - 09-23-2019, 08:32 AM

Forum Jump:


Users browsing this thread: