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,022 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

  #21 (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

NEWBIES GUIDE TO NINJA SCRIPT EDITOR (NT8)

Download the ZIP file, and unzip it. Get it into some editor, so you
can select all and get it on a clipboard. You'll then want to completely
blow away the contents of some NinjaScript Editor contents, as follows...

So, to load this code, just use New and select NinjaScript Editor.

Open the Indicators node; and then right-click or something, and create
a new Indicator. Our name is "TradeFlowTutorial" so use that name;
unless you want another name. [EDIT] but if you do use another name
you may have to change the class name in the code.... so do it if you
have experience only.

Having done that, just choose Generate or whatever... since you are going
to completely replace the Editor contents with our code. Select all of the
contents; and delete them; and then Paste all of our tutorial contents in
there...

Then, it should Compile; and, when it does, the Indicator is immediately available
in the list of Indicators for a Chart...

There are lots of little ways you can screw up; but it should be rather
smooth.

hyperscalper

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Tao te Trade: way of the WLD
21 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #22 (permalink)
 loantelligence 
Syracuse, NY
 
Experience: Intermediate
Platform: Ninja Trader
Broker: Mirus Futures/Zen-Fire
Trading: NQ
Posts: 218 since Jan 2011
Thanks Given: 31
Thanks Received: 189

I believe we can work together....let me show you what i use to trade...daytrading using Cumulative Delta...when the cumulative delta breaks out of the bollinger...theres a signal...its a stronger signal if it also breaks out of the DynamicSRzones on the chart also...you can see for your self here is an example...let me know if you are interested in chaseing it down......

Reply With Quote
  #23 (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



loantelligence View Post
I believe we can work together....let me show you what i use to trade...daytrading using Cumulative Delta...when the cumulative delta breaks out of the bollinger...theres a signal...its a stronger signal if it also breaks out of the DynamicSRzones on the chart also...you can see for your self here is an example...let me know if you are interested in chaseing it down......

I'm glad we share the intuition that Trade Flow Volume based analysis is
significant. In fact, IT MUST BE SIGNIFICANT, since the very nature of trading
is Buying and Selling VOLUME of what I call "Inventory" through Accumulation
and Distribution, at given Entry and Exit pricings. Trading is none other than just that !!

I don't comment on things like Cumulative Delta, where I'm not familiar with the exact
algorithms, but I have previously HIGHLIGHTED the "acceleration" of Accumulation and
Distribution patterns, near significant Tops and Bottoms in local price movements,
which may be considered the "sawtooth" behavior of the market.

Let's be sure that the "Big Lot" concept is preserved, as that's the key proportion
of Trades which is most indicative at Tops and Bottoms. We don't care about the
little "onesy and twosy" retail trades, honestly. Big Lot thresholds perhaps also
need to be "dynamic" as the mix changes through a session as well...

Bollinger Bands are simply a modified "accelerometer", based upon a simpler concept
known as MACD "Moving Average Convergence and Divergence". Depending upon how
the "reference averager" is implemented (whether SMA or some other more complex
weighting of elements in the reference average) results may change slightly.

Bollinger Bands are a fascinating approach; but they do perhaps create a false
sense of confidence or accuracy, based often on assumptions of "normal distributions"
and resultant "standard deviations". These are not likely to be strictly valid; but
that does not diminish the usefulness of the concept itself...

[EDIT] Note that I'm discussing the Bollinger or MACD being run on the Indicator's
output; not on Price, though. So we're evaluating the Indicator's acceleration.

But if I were interested in taking my proposed TradeFlowTutorial code as a basis, and looking
for "signal triggers", then I would be looking exactly at the sort of thing you've just
highlighted, perhaps using a Bollinger, or some other threshold-based Deviation rate
measurement, against a maximum acceleration/deceleration threshold concept, whether
that be FIXED or DYNAMIC in nature...

My choice would be just to look at a simpler MACD (fast versus slow reference averager
approach) since it's so much easier to code; and the nature of the averagers could
be specified. There's still the issue of thresholds for signals; but there are also a
number of ways to approach that, e.g. 2x or 3x points deviation from center reference,
or some such thing; similar to a Bollinger threshold concept itself.

In Summary: Monitoring DIRECTIONAL Trade Flow behavior, and I'd suggest the "Big Lot"
filtering concept is central, and monitoring the RATES of Accumulation and Distribution of
Inventory is a Money Maker indicator for Short to Medium term SCALPING in a Day
Trading setting... HOWEVER, the Dynamism of the Market is a challenge, as parameters
do need to change appropriately as the Market's "energy" or "volatility" changes
throughout a typical session.

A reminder: "Pretty Charts" by themselves, don't necessarily make money; unless they
are based upon a fundamental predictor; as I'm sure you and everyone knows !!

THANKS FOR YOUR THOUGHTFUL COMMENT; I THINK WE'RE ONTO SOMETHING HERE !!

hyperscalper

Started this thread Reply With Quote
  #24 (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

GENERAL APPEARANCE OF "SUPPORT"

iN THE ATTACHED you can see "down spikes" in Net Inventory Trade Flow
for Big Lots (threshold 10 contracts).

This pattern represents "support".

However, today is clearly a Dow/Nasdaq "mini crash" as part of the general
September pullback...

NOTE: I sometimes refer to Inventory as a "situational variable" which may not
precisely pin-point an Entry price; but which says that the Market is Accumulating
( "Long" ) on these down-spikes (Retail Big Lot sales, MM buys).

Since you should be doing what MM is doing; then you are also carefully Buying...

[EDIT] posted a follow on from the first screenshot so that you can see the Price
recovery which is rapid...

hyperscalper

[EDIT] upper trace params are:
# comment line
RETENTION_SECONDS=300
MULTIPLIER=1
BIGLOT_MINIMUM=8
TAPER_SIZE=True

lower trace params are:
# comment line
RETENTION_SECONDS=30
MULTIPLIER=2
BIGLOT_MINIMUM=10
TAPER_SIZE=True

Hope this helps !

Attached Thumbnails
Click image for larger version

Name:	Trade-flow-support.PNG
Views:	238
Size:	155.6 KB
ID:	318056   Click image for larger version

Name:	Trade-flow-support2.PNG
Views:	185
Size:	150.6 KB
ID:	318061   Click image for larger version

Name:	Trade-flow-support3.PNG
Views:	174
Size:	159.0 KB
ID:	318064  
Started this thread Reply With Quote
  #25 (permalink)
 SpeculatorSeth   is a Vendor
 
Posts: 780 since Apr 2016
Thanks Given: 22
Thanks Received: 1,018

I've been looking at some similar metrics, and found them to have incredible power in predicting turns. However, the signals are terrible for trend days, and I haven't found a good way to filter for that yet.

I'd suggest simplifying the code a little. At the moment it's probably too hard for less experienced coders to follow even though what it's doing right now is quite simple.

- SpeculatorSeth
Reply With Quote
  #26 (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


TWDsje View Post
I've been looking at some similar metrics, and found them to have incredible power in predicting turns. However, the signals are terrible for trend days, and I haven't found a good way to filter for that yet.

I'd suggest simplifying the code a little. At the moment it's probably too hard for less experienced coders to follow even though what it's doing right now is quite simple.

Hi. I was waiting for you; since you are "the Indicator Guy" in my book !

Well, in a down day like this, when the Major Inventory Imbalance is above the line,
then since MM trades against; your trades should have a "down bias" to them...

I decided to throw in some little challenges; and do things most Indicators
wouldn't consider. Hope I struck a reasonable balance ...

At least you didn't tell me "it's all wrong" since that would have ruined my day !!!... :

But, of course, no single indicator is likely to tell the whole story !!

[EDIT] I massacred the screenshot, but all of this "above the line" Net Inventory
represents Distribution by MM against Retail Buyers; so it signals the sustained
down move we see... Squint your eyes and use your Imagination?? LOL

[EDIT2] added another follow-on shot; showing how the down move is sustained
until Larger Big Lot Retail players are persuaded to start selling...

hyperscalper

Attached Thumbnails
Click image for larger version

Name:	Trade-Flow-distribution.PNG
Views:	231
Size:	171.8 KB
ID:	318065   Click image for larger version

Name:	Trade-Flow-distribution2.PNG
Views:	172
Size:	154.9 KB
ID:	318066  
Started this thread Reply With Quote
  #27 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,174
Thanks Received: 6,019


TWDsje View Post
I've been looking at some similar metrics, and found them to have incredible power in predicting turns. However, the signals are terrible for trend days, and I haven't found a good way to filter for that yet.

I'd suggest simplifying the code a little. At the moment it's probably too hard for less experienced coders to follow even though what it's doing right now is quite simple.

You seem to understand what he is doing. I am not seeing any difference between this indicator and cumulative delta. What difference do you perceive?

Reply With Quote
  #28 (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


trendisyourfriend View Post
You seem to understand what he is doing. I am not seeing any difference between this indicator and cumulative delta. What difference do you perceive?

Does the Cumulative Delta you are using, allow for "Big Lot" filtering ?
I've never used it...

With the TradeFlowTutorial, the parameter BIGLOT_MINIMUM needs to be set to filter,
say, contracts at a minimum lot size, e.g. 10 in NQ for example... Then you should
see a significant difference; and also the RETENTION_SECONDS will affect
how much data the "moving window" operates upon..... Stuff like that?...

hyperscalper

Started this thread Reply With Quote
  #29 (permalink)
 SpeculatorSeth   is a Vendor
 
Posts: 780 since Apr 2016
Thanks Given: 22
Thanks Received: 1,018


trendisyourfriend View Post
You seem to understand what he is doing. I am not seeing any difference between this indicator and cumulative delta. What difference do you perceive?

It's delta with a rolling window. If you look at the deltas of just one bar it's hard to really develop a usable signal from that. So instead of running on 5 minute bars you could run on 5 second bars with a rolling period equivalent to 5 minutes. Then you can run all sorts of statistical analysis on the order flow within that rolling window. In my case I've been testing what happens when the order flow becomes too directional.

There's a lot in there to just read properties from a provided file. Something that I would highly recommend getting rid of in favor of moving to NinjaTrader's built in NinjaScriptProperties and xml serialization. Then the parameters can be iterated through by the Strategy Analyzer. I'm guessing all of that is because it was adapted from something he did in Java?

- SpeculatorSeth
Reply With Quote
  #30 (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



TWDsje View Post
It's delta with a rolling window. If you look at the deltas of just one bar it's hard to really develop a usable signal from that. So instead of running on 5 minute bars you could run on 5 second bars with a rolling period equivalent to 5 minutes. Then you can run all sorts of statistical analysis on the order flow within that rolling window. In my case I've been testing what happens when the order flow becomes too directional.

There's a lot in there to just read properties from a provided file. Something that I would highly recommend getting rid of in favor of moving to NinjaTrader's built in NinjaScriptProperties and xml serialization. Then the parameters can be iterated through by the Strategy Analyzer. I'm guessing all of that is because it was adapted from something he did in Java?


GEEZ, I'm tempted to say RTFM... but I'm too polite

The Indicator GENERATES a unique properties file; and thereafter, you
are able to use a simple EDITOR as the INTERACTIVE USER INTERFACE,
for the running instance of the Indicator.

[EDIT] A screenshot of "the user interface" for a couple of
indicators is attached. Hint: it's a text editor.

So you can change parameter values "on the fly" without having to
restart it.

It has nothing to do with Java... it's the only way I could figure out so
that a User Interface could effectively be given to each instance of
the Indicator, WHILE IT IS RUNNING...

AFAIK, there is no other way to put an Interactive User Interface onto
an Indicator, even though I have done such things using WinForms,
but to do it in a way that was fairly simple; and effective.

I would highly recommend NOT getting rid of the properties file
reader; especially since you'll have to Interactively adjust parameters,
according to ongoing Volume, Volatility, and as a framework for any
other interactive parameters you may wish to code in your version

[EDIT] the only startup property for the indicator is the Property
File Name (which must be unique); there are no other startup
properties, since we're not planning to have to restart it... at
least that's the code I delivered for you to study, and adapt...

[EDIT] Also, in "the manual" earlier in the thread I explained that this
DOES NOT DO HISTORICAL, but REAL TIME only; so the logic would
have to change considerably for backtesting; and I really don't do
that, and honestly don't recommend it... That's just me

I explained that, I think; so......... R.T.F.M. ??? LOL just kidding guyz

hyperscalper

Attached Thumbnails
Click image for larger version

Name:	Trade-flow-user-interface.PNG
Views:	171
Size:	18.9 KB
ID:	318081  
Started this thread Reply With Quote




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