Real Time Data Now / Nest Trader to Amibroker, Fcharts

josh1

Well-Known Member
If we get tick data for Amibroker, and bid ask at LTP, ask can go into High and bid can go into Low. Ask size and bid size can go into aux1 and aux2 respectively. LTP can go into O and C
How to handle them in AFL is to be seen
AFL easily accommodates anything as OHLC. as we did in heikin ashi plotting if i'm not wrong.

Code:
HaClose =EMA((H+L+C)/3,3);

HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );

HaHigh = Max( H, Max( HaClose, HaOpen ) );

HaLow = Min( L, Min( HaClose, HaOpen ) );

O=HaOpen; H=HaHigh; L=HaLow; C=HaClose;

PlotOHLC( O, H, L, C, "Modified " + Name(), Colorblack , styleCandle | styleNoLabel );
That means, if we manage to get tick data and are willing to keep it as it is (without converting it into 1 sec or higher time frame bars) we can easily accommodate ask|bid rates and qty in Amibroker.

Am I correct?

I guess Happy Singh will be able to confirm this. He knows AFL better.
Its simple - we can plot aux1 or aux2 or both simultaneously - no problem.

u dont have to plot it as plotohlc statement

rgds
bro.... plz look at wht josh asked...?

yes wht u said is right we can simply plot AUX but wht he asked is whether we can assign any other values to open, hi , lo and close.
even we can assign anything to Volume also.

for tht purpose i shown him we can do tht.
Ok. Let me make this simpler. What I am asking is ....

1. If we manage to get tick data ... and

2. If we get Ask|Bid, Ask|Bid Qty(size) at LTP .... and

3. We push each record to Amibroker like this
Open = LTP, High = Ask Price, Low = Bid Price, Close = LTP, Volume = LTQ or Last Trade Qty, Aux1 = Ask Qty, Aux2 = Bid Qty

What will be the effects of this strategy on Amibroker database?

1. Advantages
2. Disadvantages

One advantage I can think of is that we do not need to turn to Ninja for indicators that require Bid | Ask

One disadvantage I think of is that database will have to remain tick based only. It cannot be converted into 1 min candles since Ask |Bid values ( embedded in H and L), for 1 min will be meaningless.

Edit -- backfill not available for Bid|Ask
 
Last edited:

sr114

Well-Known Member
bro.... plz look at wht josh asked...?

yes wht u said is right we can simply plot AUX but wht he asked is whether we can assign any other values to open, hi , lo and close.
even we can assign anything to Volume also.


for tht purpose i shown him we can do tht.
yes we can assign any values to open, high , low, close and do calculation on that or apply indicator.

for plotting we can use the plot function only ;
no need to apply plotohlc exclusively

rgds
 

sr114

Well-Known Member
Ok. Let me make this simpler. What I am asking is ....

1. If we manage to get tick data ... and

2. If we get Ask|Bid, Ask|Bid Qty(size) at LTP .... and

3. We push each record to Amibroker like this
Open = LTP, High = Ask Price, Low = Bid Price, Close = LTP, Volume = LTQ or Last Trade Qty, Aux1 = Ask Qty, Aux2 = Bid Qty either Open or Close will be suffice to build the database

What will be the effects of this strategy on Amibroker database?

1. Advantages
2. Disadvantages

One advantage I can think of is that we do not need to turn to Ninja for indicators that require Bid | Ask definitely yes

One disadvantage I think of is that database will have to remain tick based only. It cannot be converted into 1 min candles since Ask |Bid values ( embedded in H and L), for 1 min will be meaningless.


see the quotes - the database is formed from the ltp only - we can transform this database [ second based] to 1 min tf - definitely

see Trash's recos also [ http://www.traderji.com/amibroker/94016-import-tick-data-bid-ask-how.html#post969871]
this structure will help

rgds
 

sr114

Well-Known Member
Last edited:

extremist

Well-Known Member
Ok. Let me make this simpler. What I am asking is ....

1. If we manage to get tick data ... and

2. If we get Ask|Bid, Ask|Bid Qty(size) at LTP .... and

3. We push each record to Amibroker like this
Open = LTP, High = Ask Price, Low = Bid Price, Close = LTP, Volume = LTQ or Last Trade Qty, Aux1 = Ask Qty, Aux2 = Bid Qty

What will be the effects of this strategy on Amibroker database?

1. Advantages
2. Disadvantages

One advantage I can think of is that we do not need to turn to Ninja for indicators that require Bid | Ask

One disadvantage I think of is that database will have to remain tick based only. It cannot be converted into 1 min candles since Ask |Bid values ( embedded in H and L), for 1 min will be meaningless.

Edit -- backfill not available for Bid|Ask
now i come straight to the point :
O = -----;
H = -----;
L = -----;
C = -----;

u can assign anything there.

then do

Directly PLOTOHLC(c,c,c,c,---------

by doing this u will get freedom of converting tht data to any desired Time frame.

and

the Advantage u were talking over NINJA will not be there. Coz Ninja Is ninja.

and the disadvantage u were mentioning will be gone if u go like as i mentioned above in afl.

As simple as it.
 

boarders

Well-Known Member
now i come straight to the point :
O = -----;
H = -----;
L = -----;
C = -----;

u can assign anything there.

then do

Directly PLOTOHLC(c,c,c,c,---------

by doing this u will get freedom of converting tht data to any desired Time frame.

and

the Advantage u were talking over NINJA will not be there. Coz Ninja Is ninja.

and the disadvantage u were mentioning will be gone if u go like as i mentioned above in afl.

As simple as it.
very good idea, but one must be careful in using afls which depends on H/L values in their calcs, so under this circumstance, must check the afl for same before using.

1. one other way is to pass only the bid/ask prices to aux1 and 2.

2. another way is to modify the config file in RTDman scripx part like the following example and then use "foreign in afls" (this will slow down the afls) or use independant plots as required.

Scrip3=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILTBQ;Total Bid Qty;LTT;
Scrip4=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILTAQ;Total Ask Qty;LTT;
Scrip5=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILBR;Bid Rate;LTT;
Scrip6=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILAR;Ask Rate;LTT;
Scrip7=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILQ;LTQ;LTT;
Scrip8=mcx_fo|CRUDEOIL16MARFUT;CRUDEOILP;LTP;LTT;

This above method was used by me by making modification to source code of "NestRTD", the previous version of rtdman and had used own method / afl for trading until I migrated to OFA and NInja, Before NestRTD was published by tracerbullet, I was using DDE.dll with excel sheet for my data.
 
Last edited:
That means, if we manage to get tick data and are willing to keep it as it is (without converting it into 1 sec or higher time frame bars) we can easily accommodate ask|bid rates and qty in Amibroker.

Am I correct?

I guess Happy Singh will be able to confirm this. He knows AFL better.
Ok. Let me make this simpler. What I am asking is ....

1. If we manage to get tick data ... and

2. If we get Ask|Bid, Ask|Bid Qty(size) at LTP .... and

3. We push each record to Amibroker like this
Open = LTP, High = Ask Price, Low = Bid Price, Close = LTP, Volume = LTQ or Last Trade Qty, Aux1 = Ask Qty, Aux2 = Bid Qty

What will be the effects of this strategy on Amibroker database?

1. Advantages
2. Disadvantages

One advantage I can think of is that we do not need to turn to Ninja for indicators that require Bid | Ask

One disadvantage I think of is that database will have to remain tick based only. It cannot be converted into 1 min candles since Ask |Bid values ( embedded in H and L), for 1 min will be meaningless.

Edit -- backfill not available for Bid|Ask
Hi

Interesting developments :)

You guys rock :thumb:

Writing AFL for manipulating / displaying / aggregating the data present in Amibroker fields in any way is quite simple.

But just wondering if we can maintain the data in 2 separate tickers . . .
for eg. if we have Nifty_F1 with one minute data can we also have a ticker Nifty_T1 in the format Josh has mentioned above.

if we can do that then no need to convert the tick data into OHLCV format using AFL for using existing strategy / charts code / plotting etc.

We can use everything old as it is and now use info from this new ticker for Order Flow Analysis / Foot Print charts etc.

Thanks
Happy :)

Edit: The data base will be in tick format, but all the existing tickers can be maintain/updated the same 1 minute mode, so back fill for them remains same.
 
Last edited:

Similar threads