@TB,
Please explain this code of yours.
Why are you sending O H L and C as Last to Ninja? I understand volume/4 since one tick is divided into 4 records.
Please explain this code of yours.
Code:
/*
Send OHLC to NinjaTrader
Workaround - Send OHLC as ticks with 1/4 volume
*/
void Worker::pushToNT( const std::vector<ScripBar> & bars ){
int volume = 0 ;
size_t size = bars.size();
const ScripBar *bar;
for( size_t i=0 ; i<size ; i++ ){
bar = &bars[i];
volume = (int)bar->volume/4; // int should be atleast 4Bytes
ninja_trader->Last( bar->ticker, bar->bar_open, volume );
ninja_trader->Last( bar->ticker, bar->bar_high, volume );
ninja_trader->Last( bar->ticker, bar->bar_low, volume );
ninja_trader->Last( bar->ticker, bar->bar_close, volume );
}
}
use LastPlayback instead of last