Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trading on level 2 values
Collapse
X
-
You're welcome - if I understand you correctly, you wish to know if the orders in front at your price point are increasing or decreasing? You generally have access to the 5 best buy / sell levels, so you can keep track of qty's at the time you're order comes back accepted / working and then you can compare to updates received.
-
kind of,
but in those 5 ,or 10 available levels, when I place a profit tarket for one contract, I want to know where I am in the actual queue of a specific price level. , such that if for example:
profit tarket is placed at 1200, and It is simply waiting and when it was placed there was 300 contract at that price before me, ..
now these 300 contracts before be , some may be canceled or filled, meaning that I am moving up in the queue to sell.
how do I track the actual position that I am at. or is it even possible with the information.
from that I can see, I cant but maybe I am overlooking something.
thanks
Comment
-
-
-
Nothing really yet on our forums here I think, how about checking into http://www.google.com/patents/US7809628 to get more familiar with the topic and thoughts floating?Originally posted by chancehero View Postknow of any treads discussing this?
Comment
-
process
this question I cant see someone has asked but I might as well.
Markov process- any threads discussing this or coding it? or transferring or allowing my ninja script to read some of my Fortran code that computes what I need (more proficient in fortran than c).
thanks
Comment
-
Sorry, nothing I'm aware of for a Markov model here, would encourage to google a bit for starting materials like - http://www.koders.com/csharp/fidCA67...2D6931054.aspx
For your Fortran, you can try generating a DLL to call in this unmanaged code - http://software.intel.com/en-us/arti...l-from-c-code/
Comment
-
disable problem
Hi,
I have a small , but annoying problem.
I built my strategy. and have the disable function called when I have realized my trading goal for the day. I have placed this in the OnMarketDepth area.
the problem is that my buy strategy is also in this same OnMarketDepth area and it sometimes goes off while the strategy is being disabled. so my strategy ends, and I am left with an order waiting to be filled that is running.
NOTE
(1) I placed the disable at the start of the OnMarketDepth
(2) from what I can see, my signal is being generated in the updateOrderBook and then used in the OnMarketDepth to generate my entries and exits. so I placed a print() to tell me that I was closing the strat before disable, and between the print() I get 10-30 signals that have time to be generated before it actually closes my strat.
any easy fix for this? that is simpler than adding a bool variable to make sure that I dont get filled while closing?
Thanks
Comment
-
back testing
hi,
for a while I have been testing my strategy with the sim account using my brokers live data stream ... is there any way that I can use the strategy analyser? im pretty sure I cant but maybe you guys know a ways that it would work.
Note : my strategy runs only in OnMarketDepth
and is there any plans for allowing my to use strategy analyser in the future?
thanks
Comment
-
Hello chancehero,
Unfortunately OnMarketData cannot be backtested.
Code:This method is not called on historical data (backtest)
Since it is the raw stream, it is theoretically not unavailable in history.
What I can suggest you modify your strategy and create an multi-series strategy with a higher granularity bar series. Please refer to this sample code which further demonstrates it.
You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this byJoydeepNinjaTrader Customer Service
Comment
-
before I look too far into this,
would it be possible to create bars for 1 onmatketdata() event, regarless of time?
thanks
Comment
-
data recording
hi,
so Im loggin some data and I had a question
this is what I have presently:
PHP Code:protected override void OnMarketDepth(MarketDepthEventArgs e) { string data_3 = count_save +" , "+ pricenow +" , "+quantitysold +" , "+ GetCurrentAsk() +" , "+ GetCurrentBid() + Environment.NewLine ; File.AppendAllText(log_file_part3,data_3 ); }
and I am noticing that its impossible for me to know from this what was correctly sold using quantitysold defined as :
when the quantity sold are the same.....PHP Code:protected override void OnMarketData(MarketDataEventArgs e) { // to get my price and volume traded if (e.MarketDataType == MarketDataType.Last) { pricenow=e.Price; quantitysold=e.Volume; } }
I included a sample of the file im saving so you can see the problem - or the confusion im having.
any tips on how to get some value or indicator when I get actually something sold....... if they are the same values....
thanksAttached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
602 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment