NexusFi: Find Your Edge


Home Menu

 





Design a DayTrader Scalping Order Flow Indicator


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one hyperscalper with 136 posts (239 thanks)
    2. looks_two Chof with 22 posts (12 thanks)
    3. looks_3 Connor with 16 posts (8 thanks)
    4. looks_4 justtrader with 14 posts (8 thanks)
      Best Posters
    1. looks_one bobwest with 2 thanks per post
    2. looks_two hyperscalper with 1.8 thanks per post
    3. looks_3 SpeculatorSeth with 1 thanks per post
    4. looks_4 Chof with 0.5 thanks per post
    1. trending_up 47,448 views
    2. thumb_up 328 thanks given
    3. group 55 followers
    1. forum 248 posts
    2. attach_file 80 attachments




 
Search this Thread

Design a DayTrader Scalping Order Flow Indicator

  #191 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522

CRITICISM OF MY PARAMETERS FILE APPROACH,
and the usage of files in general.

So, I've taken a lot of expected criticism
that I'm not doing things "the right way"
when it comes to using NinjaTrader 8
startup Properties.

The argument is that my choice of putting
variable properties into a "properties file"
is too non-standard, and it doesn't permit
"optimization" which is a part of "backtesting"
of indicators.

Backtesting has as a goal, in part, to find
"the sweet spot" for parameters by "iterating"
through various choices and find the choices
that "work best". In some cases, this can
degenerate into "garbage in" / "garbage out"
in the absence of a hypothesis or theory as
to why an indicator signal level should be predictive.

(LET'S NOT FORGET THE BASICS. In Trading, you
Win, ONLY when you are able to Predict future Price
action, based upon detection of events now, or
the recent past. Excessive Trade Flow Risk levels
are hypothesized to Predict a Trend change. If
they don't, then they are not going to Make You
Money.)

In the worst case, this "optimization" can be bad,
in the sense that we choose parameters
which have "worked in the past" and then
we hope they'll continue to work in the
future. That can also degenerate into Desperation,
trying in vain to find something predictive through
backtesting... But I digress...

The naive trader may believe that this approach
is a good idea, but I can't go into all the ways that
this is deceptive, and perhaps counter productive
in ways that are not that obvious. WITH AN INDICATOR
you need a theory behind the WHY. Why do you expect
this indicator to be predictive? Is it measuring something
"special"?

I could go on and on about Traders' reliance on Generic
Indicators, mostly based on Price action; which give a
false sense of Hope to a Trader. Most generic Indicators
are not going to help you make Money. But that's MY PERSONAL
OPINION ONLY; and I don't want to push it on anyone else.

That's one thing. ANOTHER THING is that
when an Indicator starts up, it first feeds
Historical data in, and then it switches to a
RealTime mode for data going forward.

Specifically, the TradeFlowRisk Indicator
requires that the Bid and Ask prices at the
instant of the Trade be ACCURATE; and this
is difficult to achieve with Historical data.
In fact, special coding is needed to improve
that accuracy for the Historical phase of
Indicator startup, and it will never match
Real Time accuracy. (So, I ask "Why Bother?")

AND THE WORST THING OF ALL, is that when
you change any Parameter value; the Indicator
instance is RESET and Cumulated data is LOST.
You are expected to retrieve/restore your
data from the Historical feed which we just
pointed out, is INACCURATE for the data
which TradeFlowRisk is specifically targeting.

TAKING ALL THESE THINGS INTO CONSIDERATION,
I wrote the Indicator to take RealTime Data only,
where there is full accuracy; and when you want
to Fine Tune or change Parameters in any way,
you do it through.........wait for it !!

....the simple Text Editing of a Parameters File,
which the code periodically reads. This does not
disturb the RealTime Cumulation behavior of
the Indicator and I think it's a SIMPLE and
obvious way to provide a User Interface that
allow for changes to parameters as the Indicator
continues to run.

WHAT IS THE USER INTERFACE? It's a Text Editor
which works on the parameters file.

NOW, LET'S TAKE THE APPROACH A LITTLE BIT
FURTHER. HOW ABOUT THE ISSUE OF TRIGGERING?

Again, one approach for reasonably efficient Signal
Triggering, is to just put a Trigger Signal into a File,
which some other software is reading...

Reading and Writing to a text file, continues to be
a simple and effective way to communicate.

So if we are considering how an Indicator might be
used to trigger a Strategy to initiate trading, I'm
simply saying that File based communication could
be a reasonable way to do that, in a Custom System.

hyperscalper

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Quant vue
Trading Reviews and Vendors
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #192 (permalink)
 Chof 
Edmonton AB. / Canada
 
Experience: Intermediate
Platform: NT 8
Broker: Amp / CQG
Trading: NQ index
Frequency: Several times daily
Duration: Seconds
Posts: 47 since Apr 2017
Thanks Given: 29
Thanks Received: 50

The way you're gathering 'volume' data by using data.packet volume
is the fastest way I've seen to 'sign' and consider the information in
subsequent calculations. This change from using 'bar' volume is what
changed the markets. It used to be that the 'Market Maker' could take
over when a market swung in their favor (I'm talking 15 years ago).
Those were the days when platforms like 'Tradestation' that allowed
backtesting actually could provide an edge. (That was when I started)
But you're methods are proving the MM does this at their peril these
days. It seems they have to be considering other factors at all times.

The 'other factors' like news and reports were always there.. The
influences that take over when the participation drops are what makes
each of our styles propietary and we all have our opinions on what drives
a market other than price..

I used to use a 'collections' method to store volume data from a 'seconds'
chart and plot it in a tick chart in Tradestation through a 'function' that I
wrote and shared in the TS forums - mid 2000's.. (hey and that was "leading
edge" - at the time Tradestation couldn't plot volume information in a tick chart)
but it never led to a 'tradable edge' that I ever found..
that's all trivia.... but using an 'api' was possible back then and
traders would often use it to do calculations in "excel" and pass the order
execution data back to TS..

So, your use of text files is something I haven't seen shared before.. It
must be faster than using "excel". For sure its effective and not everyone has
"excel".

C

Reply With Quote
Thanked by:
  #193 (permalink)
 OpalDragon 
Des Moines, Iowa
 
Experience: Advanced
Platform: Ninja Trader
Trading: 6E, CL, Anything that moves
Posts: 559 since Jun 2012
Thanks Given: 733
Thanks Received: 232



hyperscalper View Post
The algorithm in this thread cumulates continuous Trade Flow (T&S) events over
a Moving Window FIXED period of time, regardless of the Bar format being used,
so completely independent of that.

Please explain then why it should matter what Bar type is being used, except
that it would affect the visualiz(s)ation of the resulting Net Inventory ?

hyperscalper


Ok Hyper --
I am not a programmer so I cannot answer your question from a PROGRAMMING Point of View.

But I experimented with trying to find ultra fast orderflow for quick scalps.... and to find the orderlfow changing before a big trade.

A simple way to see orderlow coming into the market is to put EQUIVOLUME BARS on a 1 tick RJAYS - NO GAP RANGE BARS

Yes ---> I did say 1 tick RJays No Gap Range Bars.

You can see exactly ALL THE VOLUME entering the market with 1 tick range bars





In that example, you can see how obvious all the VOLUME BURSTS are in the NQ.

There is Driving Volume and then there is Stopping Volume

Then there is Long and Short volume

So there are 4 combinations [ as far as I can see, in this particular "theory" ]

Long Driving
Short Driving
Long Stopping
Short Stopping


So -- what I was refering to was using a ultra ultra small chart like this -- to give indication of order flow coming in...

Then analyze the bars that have high volume only to see what are the lot sizes, etc in the "higher volume" bars on this 1 tick range chart....?

That was kind of my theory....


~~~~~~~~~~~~~
I haven't finished reading your entire thread -- so I don't know if that helps you guys on this particular 'mission'.

You seem to be going at it in a completely different way -- to show more of a CHANGE IN TIDE sort of speak.

The TIDE is changing in the back ground and we should be getting ready for a trade in the opp. direction.

At least that is what I think you are getting at....

I could be wrong again -- since I have not read the entire thread = but I just wanted to add something in case it helps.

Reply With Quote
  #194 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522


OpalDragon View Post
Ok Hyper --
I am not a programmer so I cannot answer your question from a PROGRAMMING Point of View.

But I experimented with trying to find ultra fast orderflow for quick scalps.... and to find the orderlfow changing before a big trade.

A simple way to see orderlow coming into the market is to put EQUIVOLUME BARS on a 1 tick RJAYS - NO GAP RANGE BARS

Yes ---> I did say 1 tick RJays No Gap Range Bars.

You can see exactly ALL THE VOLUME entering the market with 1 tick range bars





In that example, you can see how obvious all the VOLUME BURSTS are in the NQ.

There is Driving Volume and then there is Stopping Volume

Then there is Long and Short volume

So there are 4 combinations [ as far as I can see, in this particular "theory" ]

Long Driving
Short Driving
Long Stopping
Short Stopping


So -- what I was refering to was using a ultra ultra small chart like this -- to give indication of order flow coming in...

Then analyze the bars that have high volume only to see what are the lot sizes, etc in the "higher volume" bars on this 1 tick range chart....?

That was kind of my theory....


~~~~~~~~~~~~~
I haven't finished reading your entire thread -- so I don't know if that helps you guys on this particular 'mission'.

You seem to be going at it in a completely different way -- to show more of a CHANGE IN TIDE sort of speak.

The TIDE is changing in the back ground and we should be getting ready for a trade in the opp. direction.

At least that is what I think you are getting at....

I could be wrong again -- since I have not read the entire thread = but I just wanted to add something in case it helps.

Thanks for that; interesting thoughts.

My initial reaction is that you're playing with what I call "Big Lot" directional
trades here; and those can be quite indicative, especially in the context
of Net Inventory being Long/Short so-to-speak.

When there's been an excess of Retail Buyers (MM Short Inventory) and then
Big Lot Retail Buyers start coming in to BUY; then you have a Reversal signal...

When there's been an excess of Retail Sellers (MM Long Inventory) and then
Big Lot Retail Sellers start to appear to SELL; then you have Reversal as well...

The usual explanation for this would be that these Big Lot Retail traders see
an opportunity for Breakout or Breakdown; and are "buying/selling too high/low
respectively".

Also, higher Rates of Trade (per unit time) will appear at these pivot areas as
well, in general.

I've said it before; and who can stop me from saying it Again !? Inventory
Analysis is "situational awareness" and we need to be prepared for FALSE
Breakout and Breakdown "run through" of the theoretical Trend turning Price
point; but that's useful information.

You've undoubtedly noticed that I take "Counter-Trend" trades, wanting to
Sell the highest, and Buy the lowest; and therein lies a danger of some
Price Adversity, so be prepared for it.

[edit] I forgot to mention the concept of RISK; since that's the idea
the MM is "losing money" on Cost of Inventory (temporarily); so
looking at the Risk Level estimates is even more predictive of a
turning trend, I'd suggest.

[edit-attachment] You can see the Big Lot Selling as the overnight
session begins, with the RED meaning Retail Selling, and Blue being
Retail Buying. On that chart the PURPLE line is Net Inventory on a
15 Second moving window of time. A 20 Point lift follows the circled
corresponding times with a Ninja chart above, and custom charting
below, at around 17:06 (Chicago) on the chart. Obviously from this, MM trades
AGAINST Big Lot Retail Traders. But BLACK lines are a "compressed"
representation of Price, where true Price can be seen on the Ninja
chart on top of the screenshot.

hyperscalper

Attached Thumbnails
Click image for larger version

Name:	BigLot-Selling.PNG
Views:	118
Size:	511.2 KB
ID:	320087  
Started this thread Reply With Quote
Thanked by:
  #195 (permalink)
 Connor 
France, Lille
 
Experience: Intermediate
Platform: Proprietary
Trading: Stocks
Posts: 18 since Nov 2021
Thanks Given: 1
Thanks Received: 11


hyperscalper View Post
CRITICISM OF MY PARAMETERS FILE APPROACH,
and the usage of files in general.

So, I've taken a lot of expected criticism
that I'm not doing things "the right way"
when it comes to using NinjaTrader 8
startup Properties.

...cut...

Hey hyperscalper, I think that in a bigger scheme of things, your way makes a lot of sense. It is a very simple and robust way to transfer parameters from an external research pipeline to a running algo.

I'm going to read your threads here and your code to understand the idea behind. I'm trying to combine "order flow" with the info on the dom for a better insight in how the market is guided. I.e. try to gauge the general direction the mm is pulling towards. Perhaps something good can come from this.

Connor

Reply With Quote
  #196 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522


Connor View Post
Hey hyperscalper, I think that in a bigger scheme of things, your way makes a lot of sense. It is a very simple and robust way to transfer parameters from an external research pipeline to a running algo.

I'm going to read your threads here and your code to understand the idea behind. I'm trying to combine "order flow" with the info on the dom for a better insight in how the market is guided. I.e. try to gauge the general direction the mm is pulling towards. Perhaps something good can come from this.

Connor

Thanks for the good words. Oddly enough, and I'll most
likely never get into Live Depth of Market Analysis in
this forum...

I could be the world's "alleged Expert" on Retail Trader
DOM Analysis, so there's that... LOL What we've been
doing in this thread on Traded Volume analysis is "child's play"
when compared to tackling the DOM, just to give a sense
of perspective...

Trying to understand the DOM is more or less "ridiculously difficult"
and I've done that work for many years now.

C# multi-threading, Queues, Dictionaries, Custom samplers,
Price level specific stabilizers, Anti-Spoofing; and
the list goes ON and on....... LOL true; which is why nearly
nobody has ever tussled for very long with a real Un Aggregated
Depth of Market, most likely

I use the Rithmic Depth of Market which extends out way more
than 60 Tier levels on either side, and can exceed more than
1000 updates per second easily....

So if you want to start another thread and start asking how
to handle "The Deadly Beast" which is the DOM, and in my
case it's the Nasdaq futures contract DOM; then be my guest

hyperscalper

Started this thread Reply With Quote
Thanked by:
  #197 (permalink)
 
Plankton's Avatar
 Plankton 
Blacksburg, SC
 
Experience: Beginner
Platform: NinjaTrader
Posts: 20 since Aug 2019
Thanks Given: 51
Thanks Received: 29


OpalDragon View Post
Ok Hyper --
I am not a programmer so I cannot answer your question from a PROGRAMMING Point of View.

But I experimented with trying to find ultra fast orderflow for quick scalps.... and to find the orderlfow changing before a big trade.

A simple way to see orderlow coming into the market is to put EQUIVOLUME BARS on a 1 tick RJAYS - NO GAP RANGE BARS

Yes ---> I did say 1 tick RJays No Gap Range Bars.

You can see exactly ALL THE VOLUME entering the market with 1 tick range bars





In that example, you can see how obvious all the VOLUME BURSTS are in the NQ.

There is Driving Volume and then there is Stopping Volume

Then there is Long and Short volume

So there are 4 combinations [ as far as I can see, in this particular "theory" ]

Long Driving
Short Driving
Long Stopping
Short Stopping


So -- what I was refering to was using a ultra ultra small chart like this -- to give indication of order flow coming in...

Then analyze the bars that have high volume only to see what are the lot sizes, etc in the "higher volume" bars on this 1 tick range chart....?

That was kind of my theory....


~~~~~~~~~~~~~
I haven't finished reading your entire thread -- so I don't know if that helps you guys on this particular 'mission'.

You seem to be going at it in a completely different way -- to show more of a CHANGE IN TIDE sort of speak.

The TIDE is changing in the back ground and we should be getting ready for a trade in the opp. direction.

At least that is what I think you are getting at....

I could be wrong again -- since I have not read the entire thread = but I just wanted to add something in case it helps.


Hi OpalDragon,

Could you show me where I could get the RJay's indicators that you show on your chart. I might be overlooking them but I can't seem to find them for NT8.

Thanks!

Reply With Quote
Thanked by:
  #198 (permalink)
 Connor 
France, Lille
 
Experience: Intermediate
Platform: Proprietary
Trading: Stocks
Posts: 18 since Nov 2021
Thanks Given: 1
Thanks Received: 11


hyperscalper View Post
Thanks for the good words. Oddly enough, and I'll most
likely never get into Live Depth of Market Analysis in
this forum...

I could be the world's "alleged Expert" on Retail Trader
DOM Analysis, so there's that... LOL What we've been
doing in this thread on Traded Volume analysis is "child's play"
when compared to tackling the DOM, just to give a sense
of perspective...

Trying to understand the DOM is more or less "ridiculously difficult"
and I've done that work for many years now.

C# multi-threading, Queues, Dictionaries, Custom samplers,
Price level specific stabilizers, Anti-Spoofing; and
the list goes ON and on....... LOL true; which is why nearly
nobody has ever tussled for very long with a real Un Aggregated
Depth of Market, most likely

I use the Rithmic Depth of Market which extends out way more
than 60 Tier levels on either side, and can exceed more than
1000 updates per second easily....

So if you want to start another thread and start asking how
to handle "The Deadly Beast" which is the DOM, and in my
case it's the Nasdaq futures contract DOM; then be my guest

hyperscalper

Ok, I'm up to date now. I read it all and took notes
I'm not sure I'll contribute much in terms of code, other than the quick mod/hack, as NT is not my platform of choice.
Some of the reasons is precisely the limitations and inadequacy of such platforms in scenarios you describe above.

Many years ago I went "full in" and I'm using only my own platform.
This means mostly C and C++ for trading and backtesting. For quick idea tests, statistics and general research I'll drop into python.
I used R before and Matlab/Octave before R. You get the idea.

So, let's come back on the theme of inventory. Have you considered using a "global" inventory "integrator" over multiple contracts?
For example NQ and MNQ combined? Or do you assume that territory taken by the arbitragers, so one contract is enough?
The scenario is that MM sells X contracts of MNQ and buys Y NQ cashing in the spread with no inventory change (i.e. any unmatched inventory from each contract will be regulated in cash at expiry).
Maybe this is HFT territory and MM has no interest in going into this?

Reply With Quote
Thanked by:
  #199 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522


Connor View Post
Ok, I'm up to date now. I read it all and took notes
I'm not sure I'll contribute much in terms of code, other than the quick mod/hack, as NT is not my platform of choice.
Some of the reasons is precisely the limitations and inadequacy of such platforms in scenarios you describe above.

Many years ago I went "full in" and I'm using only my own platform.
This means mostly C and C++ for trading and backtesting. For quick idea tests, statistics and general research I'll drop into python.
I used R before and Matlab/Octave before R. You get the idea.

So, let's come back on the theme of inventory. Have you considered using a "global" inventory "integrator" over multiple contracts?
For example NQ and MNQ combined? Or do you assume that territory taken by the arbitragers, so one contract is enough?
The scenario is that MM sells X contracts of MNQ and buys Y NQ cashing in the spread with no inventory change (i.e. any unmatched inventory from each contract will be regulated in cash at expiry).
Maybe this is HFT territory and MM has no interest in going into this?

Sorry, you may consider switching to NT8, and turning
your world upside-down... LOL

Yes, I have a "global inventory integrator" over ALL contracts
in a single symbol; although not "merging" across symbols.

Clearly NQ and MNQ trade differently; and one of the two of
them is "the driver contract" but I usually look at the NQ, but
can easily look at either/both.

Arbitragers have nothing to do with much, but it's true that
NQ and MNQ will be constrained to be very close in pricing;
and arbitraging may have some role there...

My "full inventory analysis" does "full matching" of ALL lower priced
Buys with higher priced Sell volumes; thus removing "closed
inventory" profit, from remaining "open inventory"; the latter of
which is used to calculate the "true VWAP", Risk, etc. lol

hyperscalper

Started this thread Reply With Quote
  #200 (permalink)
 OpalDragon 
Des Moines, Iowa
 
Experience: Advanced
Platform: Ninja Trader
Trading: 6E, CL, Anything that moves
Posts: 559 since Jun 2012
Thanks Given: 733
Thanks Received: 232



Plankton View Post
Hi OpalDragon,

Could you show me where I could get the RJay's indicators that you show on your chart. I might be overlooking them but I can't seem to find them for NT8.

Thanks!

RJay is not an indicator it is a bar type.

https://www.innovative-trading-solutions-online.com/new/range-no-gap-bars-chart/

Reply With Quote
Thanked by:




Last Updated on January 26, 2023


© 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