I have made a preliminary rtdman version for feeding amibroker with OFA through aux1 and aux 2. But I am not sure if I have coded the c++ correctly in worker Cpp. the logic is:
if LTP equals ask price then LTQ equals ask vol (avol) - passed to aux1
if LTP equals Bid price then LTQ equals bid vol (bvol) - passed to aux 2
when I compiled and checked with quote editor live, the LTQ was equal to either the aux1 or aux2 and not both which is correct. but what is bothering me is:
1. some time LTQ doesnt appear either at aux1 or aux2 both showing zero.
2. when archive is on the updation to ami is anywhere between 5 to 8 secs
and when archive is off then between 1 sec to even 5 secs. this although nest/ninja showing updations which doesnt reflect in ami.
I am attaching the source code (remove spaces) for checking by any of you guys and solve the above problems while I am also at it.
the next immediate once above problems solved TODO will be to make OFA afl for amibroker.
http s://my.pcloud.co m/publink/show?code=XZngA8ZA6x2Dqd7vuj8KMQYP8upHzd4PtH7
@Boarders
I find some merit in your calculation of Ask Bid volume. However, in this case I do not see any necessity to store Bid|Ask volumes in Aux1 and Aux2 since ...
if LTP equals ask price then LTQ equals ask vol (avol) - passed to aux1
if LTP equals Bid price then LTQ equals bid vol (bvol) - passed to aux 2
This can be easily done in AFL instead of doing it in RTDMan. We can save Ask|Bid rates in Aux1|Aux2 respectively. Other fields remain the same.
I do not know whether other users concur with this.
As for LTQ, I am coming to the conclusion that it has to be calculated by Volume Traded Today less Previous tick Volume Traded Today. Adding LTQ has not given correct results yet.