09-23-2019, 08:32 AM
(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);
}
}