Real Time Data Now / Nest Trader to Amibroker, Fcharts

boarders

Well-Known Member
@TB,

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 );
	}
}
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.:confused:
thats the way ninja takes offline data using dll...but you can send it in any order,,pls note there is no timestamp it is taking system timestamp and not LTT...so better to
use LastPlayback instead of last
 

TracerBullet

Well-Known Member
@TB,

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 );
	}
}
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.:confused:
NT only takes Tick prices and not OHLC. RTDMan currently buffers prices and sends OHLC bar every second. So to approximate with least amount of effort - i send 4 ticks, each for OHLC. So first tick is open price, last tick is close price and H/L in between and volume distributed between them. This should be good enough for most use cases - its enough for me with 1m/3m. If we change to TICKMODE, we can call Last for each tick.
 

josh1

Well-Known Member
@Tracerbullet,

I downloaded Github/Desktop. Nice GUI tool. I forked your project on Github and downloaded it on my Lappy, made changes, committed and synced. I can see changed code on Github now. So far so easy.

Please help me with this ..........

amibroker.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1> RTDMan.vcxproj -> C:\Users\Satish\Documents\GitHub\TradingTools\AmibrokerFeeder\Debug\RTDMan\RTDMan.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

 

TracerBullet

Well-Known Member
@Tracerbullet,

I downloaded Github/Desktop. Nice GUI tool. I forked your project on Github and downloaded it on my Lappy, made changes, committed and synced. I can see changed code on Github now. So far so easy.

Please help me with this ..........

amibroker.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1> RTDMan.vcxproj -> C:\Users\Satish\Documents\GitHub\TradingTools\AmibrokerFeeder\Debug\RTDMan\RTDMan.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Github desktop - That is nice, didnt know about it. Seems git has many GUIs. So far i have only tried built in GUI.

Its only warning. You can ignore it. Its related to Linker settings, but our project is small so it doesn't matter much.

I got some link error due to INCREMENTAL:Yes so i turned it off. This lead to this warning but since it built fine, i ignored it for now. I think the original issue may have been resolved in VS SP1, i just have not updated yet after reinstall on desktop. So try changing INCREMENTAL:No to INCREMENTAL:Yes - The warning may go away. Else carry on, its not a big deal.
 


As shown in chart there are too much difference in volumes traded.
During the the fall of highlighted candle volume was increased heavily due to market order.
I think Market order not shown in ask/bid qty or LTQ as its market order.
We have to make some other method for calculating volumes traded at market order not LTQ.
It is very difficult to trade with this data. becoz we missed the wild move what we need to observe.

Correct me if I am wrong.....
 

boarders

Well-Known Member


As shown in chart there are too much difference in volumes traded.
During the the fall of highlighted candle volume was increased heavily due to market order.
I think Market order not shown in ask/bid qty or LTQ as its market order.
We have to make some other method for calculating volumes traded at market order not LTQ.
It is very difficult to trade with this data. becoz we missed the wild move what we need to observe.

Correct me if I am wrong.....
my understanding is as follows:

1. Bid/ask qty are pending orders and will keep changing as and when orders get executed, or when orders accumulate awaiting execution or when orders are cancelled. therefore this value has no say in calculations and cannot be relied for trading as it is also used for manipulations by market makers.

2. LTQ is the quantity which got traded at LTT with a price of LTP whether it be any sort of order, sl, limit or market.

3. the proper method of volume calculation is tracerbullet calculation. which is volumetrader today at present bar - volume traded today last bar.
Now unless this value equals with LTQ, we can never derive the exact breakdown of volume.

so now tell me how to figure out at what price the difference volume
got executed, whether at bid price or ask price without which OFA cannot segregate same and give exact picture of breakdown.
 

Similar threads