Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Does anyone have any experience programming APQ in NinjaTrader?
NinjaTrader has an estimated place in queue column that can be added to the SuperDom. The code base for this can be found: NinjaTrader 8 > bin > Custom > SuperDomColumns > APQ.cs. I am enclosing this as well.
Before I get too far into reverse engineering this, I just wanted to punt this out there and see if anyone else has integrated this into one of their strategies. My goal would be to access this as a variable in my code to see where I am at in the queue throughout the life cycle of my trade via ninjascript. I know this is possible to reverse engineer, but I am wondering if there is an easier way to call this directly via a function, or anything.
Does anyone have any experience with trying something similar?
Thanks!
Ian
Can you help answer these questions from other members on NexusFi?
We programmed an original estimated queue position for AlphaReveal. We don't support trading--so it is simulated and frankly not of much use (you can click a price column on fill). I have doubts as to the utility but if I recall this is the algo I developed
1. If the depth on the level is not visible then set a watch for that level and grab the max size when lit. Assume worst position.
2. If the depth is visible on submit then grab the number of orders visible. Now you start tracking this number. This is your queue position.
3. You decrease your queue position any time an order is transacted on that level.
4. Anytime the depth drops below your queue position, you reduce your queue position to this level. This represents pulled orders.
5
Example
You submit and we see 300 orders. Your position is 300. If anytime after that, the depth increases you ignore it and you track the order flow against your virtual position. For example, your position is 300, 100 transact, your position is now 200. If the depth drops below 200 at any time, you set your queue to the lower position. Say it drops to 150 for a split second then goes to 400. Your position is 150.
This is not the only sort of implementation but is pessimistic and doesn't need to make any assumptions.
Thanks for the quick feedback on this. What you described is more or less in line with the approach that I am using. I have been developing my own queue estimation code, and I have it more or less working for tracking one order. The problem I am running into is that I don't want to scale this to track multiple open positions. The way I wrote my code, it wasn't designed to scale well, so I am looking for a way to possibly just use the existing APQ.cs from NinjaTrader. I haven't hacked around too much with it, yet, but I figured I would punt it out here and see if any other programmers had looked to integrate it.
Thanks,
Ian
In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.