NexusFi: Find Your Edge


Home Menu

 





Does anyone have any experience programming APQ in NinjaTrader?


Discussion in NinjaTrader

Updated
    1. trending_up 1,488 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 1 attachments




 
Search this Thread

Does anyone have any experience programming APQ in NinjaTrader?

  #1 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148

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

Attached Files
Elite Membership required to download: @APQ.cs
Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Increase in trading performance by 75%
The Elite Circle
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #2 (permalink)
 tpredictor 
North Carolina
 
Experience: Beginner
Platform: NinjaTrader, Tradestation
Trading: es
Posts: 644 since Nov 2011

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.

Reply With Quote
  #3 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148


Hi tpredictor,

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




tpredictor View Post
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.


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.
Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on February 1, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts