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)
OKAY, enough time has passed, and I did spend some time on this
project of finding Significant Pivots through measurement of "inside
Book", or "Market Depth" analysis.
This is a "standalone" NinjaTrader (using NinjaScript Editor) Indicator,
although that's not my preferred way to develop things; but I know
that most people will want the code in that way, source code, and all in a single file, that they can just Paste into the NinjaScript
Editor.
SO.... I'm gonna just throw down the code. But before I do, I want
you to see what will, at first, appear perhaps to "spaghetti-like" and
just Random and Useless. However, on closer examination, I hope you'll
see what I'm talking about.
FIRSTLY, I HAVE TO EXPLAIN A BIT WHAT YOU'RE SEEING IN THE
SNAPSHOT HERE, AND SOME ASSUMPTIONS AND PRINCIPLES
SURROUNDING THE VISUALIZATION AND PREDICTIONS:
I HAVE USED THIS ONLY ON THE NASDAQ NQ CONTRACT, so if you
are going to stray into other instruments, it's uncharted territory.....
1) UNFORTUNATELY, but it must be said, "Your Mileage will Vary" from
what is being shown here. Why? I have a high performance 6 Core
server, co-located <1 millisecond from the CME exchange in Chicago,
AND, more importantly, I'm using LeeLoo's Rithmic Full Market Depth
which is incoming, as you'll see to the OnMarketDepth Indicator
callback.... Many Market Depths are 10 Tiers only on both sides of
the market, which would be OK, except that they may be somewhat
"aggregated". The code is expecting 12 Tiers, but that slight lack
of "tier width" might still yield a decent, usable result; however,
I want y'all to understand there's no way to guarantee that.
2) THIS IS FOR TRADERS WHO CODE, and who are interested in
perhaps picking up some coding tips, or digging into source code.
The code I'll eventually provide will have some redundant areas,
calculations that are never used; and will also use an "Object Oriented"
approach with inline class definitions. As things get more complex,
they can quickly outstrip what you can do in the NinjaScript Editor/
Compiler context; and it would be best to be using Visual Studio
(free Community Edition) as coding becomes even more complex,
so you could split up classes into separate files, and deliver this
Indicator as a DLL file instead..... just saying' that's the direction
in which y'all should be moving, when you're doing anything other
than a "simple or trivial" Indicator.....
3) The Basic Idea here, is that at significant Inflection points in the
short term Price movements; that MORE SIZE appears and is to be
interpreted as PUSHING the Market Price (in the near future) in
a different Trend direction. So, THE CHARTING INVERTS THE
DISPLAY so that More size on the BID side, is represented as UP,
which is our prediction; just as more size on the ASK side is shown
as DOWN. So the Difference between ASK and BID size ( A - B )
is INVERTED, better showing the Prediction for the near future.
4) When the Indicator is dragged onto the Price Chart, as shown,
ensure that the Indicator scale is on the LEFT side, and do not use
Auto Scaling. INSTEAD, use fixed scaling where the ZERO level
BLACK dashed line, is in the middle of the display, and MANUAL
scaling is used to increase or decrease the Lines' deflections.
WHAT DO THE LINES MEAN?
BLUE represents an analysis of 1 POINT (4 Tick or Tier levels)
against the inside market, but I believe it DISCARDS the Inside
BID and Inside ASK level, considered as "junk" or "noise"...
Call these Tiers 0..3 like array indices, where 0 is the extreme
Inside market.
PURPLE represents 4 Tiers which are Tiers 4..7 roughly 1 Point
away from the Inside.
GRAY represents 4 Tiers which are Tiers 8..11 or roughly 1 Points
away from the Inside market. If you have only 10 DOM Tiers,
then a couple will be missing, but I imagine the calculations will
still be done, although I haven't tested that.
The PINK line is a SUMMARY LINE. It is the AVERAGE of the 3 lines
above, where the Average is then MULTIPLIED by 2. So the PINK
line is your best visual indication of the Consensus of the 3
individual Bias Predictions above.
YOU WILL GENERALLY OBSERVE "DIVERGENCE" BETWEEN PRICE
MOVEMENT and these "Opposing Forces" which are preparing to
turn the Market Trending. Visually, this can be useful, and you should
be looking for the Larger such Signals, for the most significant of
Micro Trending changes.
I WILL ANSWER QUESTIONS, OF COURSE, but I really can't "hold your
hands" so please dig into the code before you just throw out a question.
Not trying to be flippant here, but I just don't have time....
YOU ARE ENCOURAGED, once you understand it, and have the skills,
to take the code and modify it for your own purposes. ONLY A FEW
of you will actually do that, and I'm happy to give suggestions...
Nobody (especially myself) is claiming that Measuring these subtle biases, is going to be a nice "clean" signal. The Market's purpose is
to Completely Confuse Traders, and thus make it impossible to make
short term decisions which are correct !! You can throw a lot of
technology at the problem, and you can Fail. I know, since I've done
this for a long time. HOWEVER, sometimes if you stick to a reasonable
Hypothesis, like "I wonder whether Market Maker is PUSHING size onto
the Book" before pushing the Market price the other way....... Just
sometimes, if you are persistent enough; you may be able to find
those OFTEN VERY SUBTLE CLUES which can enable you to Sharpen
Up your trade decisions..... Good Luck, cuz we'll all need it !!! LOL
OK, here's the code, "As Is" no Warranty, use it any way you wish
Clearly, you can paste this, in its entirety, into the NinjaScript Editor
after creating a "dummy" Indicator of the same name, then just
paste this to replace everything and compile.
Any Bugs, and "Mea Culpa" but you can fix them. I've run this thing
for a while, with no problems, but see my Caveats in the prior post...
It ain't polished, may be considered a "hack" but when is anything
really finished ??? lol (I digress) It was an exploration of possibilities,
and I find it quite useful and enlightening for my own work, which
is always nice; it gave me a better understanding.
For example, this thing takes like the Average of the Top N observed
sizes (throwing out the largest) during a Bar Period (like 5 seconds on that screenshot in prior posting, and then clear that on Each Bar update.
Best for something like a 5 second Interval chart; but you can
experiment..... etc...
Enjoy, and hope it helps or even inspires someone to go further !!
should probably be 5 instead..... anyway you decide.
hyperscalper
[EDIT] funny enough, I integrated the basic "highest for interval"
approach into my other Custom Strategy logic; and I believe it does give better
results. Just goes to show that unless you try things; you may never
find ways to improve !!! LOL
[EDIT2] I'd also suggest setting this to FALSE so the Indicator runs even
if window is minimized... I think that's what it means...
IsSuspendedWhileInactive = true; // change to false
Most traders have little choice, so they simply Chase Price.
But close analysis of Price Discontinuities and Spread behavior
show why this is a very bad event.
Most traders who are Chasing Price, are also using Market Orders,
where there is little price control.
As Price is moving in an UPTREND, the ASK/OFFER price is being
elevated, and lesser size is planted close to the market, so
that any Big Lot buying will suffer having to "eat through"
or "consume" higher and higher ASK tiers in order for the
size to be satisfied.
This is by design, and is fundamental to how Market Maker both
controls Her Risk, as well as achieving significant Price advantage.
SO, YOU DEFINITELY WANT TO ENTER BEFORE THE TREND CHANGE
SHOWS ITSELF IN ACTUAL PRICE MOVEMENT.
For many traders, they say they require "Confirmation" of the
new Trend before they will Enter in Trend direction; effectively
"chasing" Price, and hoping that Price exhibits a "Trend Momentum"
which is a dubious assumption at best.
For very short term Scalpers, this InnerTierSize indicator gives a
glimpse into the "sneaky world" of Market Maker; and how Size
placement Bias can be exploited to PREDICT the Trend change,
before the Price gives up the "secret" that the Trend has Changed.
This is a Leading Indicator, because Market Maker exhibits this
"inside market tier size bias" BEFORE the Trend turns... It may be
too FAST for most of you as traders, but it's important to understand
that PRICE does not predict PRICE. Once Price changes, it's
TOO LATE to get the BEST price...
Something OTHER THAN Price must be used to Predict a Price
change BEFORE it actually reveals itself..... Just sayin' LOL
Just something to think about as a Day Trading Fast Scalper...
Most of us think that, when there is High Liquidity, that
Prices jump up or down in 1 Tick amounts, so that there is
never a "GAP" between one Bid price and the next, or between
one Ask/Offer price and the next one.
This is not true. And the Existence of "Gaps" in successive
Prices on the Inside Market might be used to gain an
advantage.
Attached is an image of a simple "Gap" analysis. What do the
numbers mean ?? Here's a chunk, so let's see what each line
means. Just the format of the first marked line:
This means a GAP of 5 ticks was found between the PREVIOUS
BID price, and the CURRENT BID price of 5 Price Ticks. Also
that the ASK gap between the Previous ASK price and the Current
ASK price showed a Gap of 2 Price Ticks. The time between the
Previous and the Current GAP detection was 32 milliseconds.
Additionally, if the size of the BID Gap is significantly greater than
the ASK, then *** is shown; but if ASK Gap is larger, a ###
would have been shown.
WHAT MIGHT WE EXPECT ?? Well, just using Common Sense, near
a Price Trend Bottom, we would expect that the BID would "snap"
lower significantly more than the ASK, as the Price Trend is still
moving down, and any Retail Sellers would then be exposed to
WORSE Pricing, since Market Maker would drop the BID against any
Retail Sellers (who sell to the Bid). On an uptrend, near the Top,
we'd expect the opposite, that the ASK Price would be allowed to
lift and/or have lesser sizes against the market, so that any Retail
Buyers would have a WORSE price.
Using this logic and hypothesis; we could use the existence of Gaps,
and of Gap Imbalances (directional Spread widening) to detect the
imminent Top or Bottom trending conditions, as well, MAYBE.
GAP bid: 5 *** ask: 2 msecs: 32 <====
GAP bid: 3 ask: 4 msecs: 30
GAP bid: 4 ask: 4 msecs: 31
GAP bid: 4 ask: 5 msecs: 336
GAP bid: 3 ask: 4 msecs: 34
GAP bid: 4 ask: 4 msecs: 325
GAP bid: 2 ask: 4 msecs: 23
But the fact that there are Gaps at all, or that they are so large,
might be "food for thought".
This is NQ on the first day of Russia's invasion of Ukraine, but I
suspect it could possibly be useful just about any time.
[EDIT]
IN SUMMARY: If/When we see an ASK Gap, e.g. 8, alongside
a BID Gap of Zero... that means the BID did not move, but the
ASK "snapped" away; likely at a Top... If ASK Gap is zero, but
BID Gap is high, then we have a likely Bottom where the BID
is being dropped, against Retail Sellers probably, while the ASK
is holding firm...
I'll just put in a screenshot showing what we are looking
for with this indicator.
We can see the advanced notice that this Rally is near its
top, as the consensus bias (PINK line) and the lines groupings
are consistently below the zero line (BLACK dashed line).
I call this a "leading indicator" because it uses the fundamental
behaviors of Market Maker shifting size bias before the Price
movement happens....
Sorry if this is can be some stupid idea.
I see a good performance is Renko chart for NQ (I use NinzaRenko like 16-4)
If you like use more longer time frame , for example 2 minute chart, is s good idea to move to every tick ?
thanks you for your time.
Well, I use the indicator on interval charts less than about 10 seconds, so pretty fast.
But there's no reason you can't use it on other chart types, I guess; although until there
is an OnBarUpdate, you won't be seeing the updated measurement.
So, I'd guess that you are correct that OnBarUpdate should be done on every tick
if you used a much longer 2 minute interval. OnBarUpdate coding could be done
differently so that it didn't update every tick, since that would be unnecessary;
so I'll leave that coding to You !
Tweak the code as you like; since you may learn something, and can adapt it to
your requirements. My work uses NQ only; but on Instruments with other "personalities"
some adaptation could make sense...
Maybe I say something without much sense but, what would it be like to apply this indicator to a market with fewer participants but also very volatile as the NQ? I'm thinking of the Ultrabond (UB). I haven't tried it because I don't code, nor am I asking you, it's just an idea. Thank you.