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

  #161 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,552 since Jun 2009
Thanks Given: 1,049
Thanks Received: 1,678


Chof View Post
Hi HS,

Just a note on the Sunday open - using the > midPrice equation and signing volume
using the below/above midPrice logic and dataPacket.volume.... It doesn't appear to
be any different than using the close[0]>close[1] logic and regular volume so far...

The settings made with the indicators using both methods don't change the outcomes
appreciably either.

Will the participation rates (Volume totals per second or say 10 seconds) show a difference
or will I likely not see that big a change?

Have a good evening,

C

@Chof,

Could you please share your scripts (in full) and how you integrate the ROCVolumeOMDD indicator into all this ... a screenshot would be appreciated too.

lolu

Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
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
22 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #162 (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

Hi HS,

"what I've done" is where I started my question(s)... I am using the original code
and replacing "Volume" with 'tradeLotSize'. So the original code looked like this

R[0] = Close[0] > Close[1] ? Volume[0]* -1: Volume[0] ;
VP = EMA(R, Period)[0];
TV = EMA(Volume, Period)[0];
VZO[0] = 100 * (VP / TV);

and I defined 'tradeLotSize' this way -

if ( tradePrice < midPrice )
tradeLotSize[0] = (double) dataPacket.Volume;
else
tradeLotSize[0] = (double) dataPacket.Volume * -1;

so using 'tradeLotSize' in the place of 'Volume' I used this :

if ( tradePrice < midPrice )
tradeLotSize[0] = (double) dataPacket.Volume;
else
tradeLotSize[0] = (double) dataPacket.Volume * -1;

R[0] = tradePrice < midPrice ? tradeLotSize[0] : tradeLotSize[0] * -1;
TV = EMA(tradeLotSize,Period)[0];
VP = EMA(R,Period)[0];
VZO[0] = 100 * (VP / TV);
(Plotting VZO[0])

And... so far, its exactly the same as using 'Volume'...That could be because I haven't coded in
'retension' as you said you use. That "snapshot" of volume would definitely be different than
regular volume. But, I've got a question - if we used a "snapshot" of regular volume, would it
look the same as the "snapshot" of 'data.Packet.Volume?

C

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



Chof View Post
Hi HS,

"what I've done" is where I started my question(s)... I am using the original code
and replacing "Volume" with 'tradeLotSize'. So the original code looked like this

R[0] = Close[0] > Close[1] ? Volume[0]* -1: Volume[0] ;
VP = EMA(R, Period)[0];
TV = EMA(Volume, Period)[0];
VZO[0] = 100 * (VP / TV);

and I defined 'tradeLotSize' this way -

if ( tradePrice < midPrice )
tradeLotSize[0] = (double) dataPacket.Volume;
else
tradeLotSize[0] = (double) dataPacket.Volume * -1;

so using 'tradeLotSize' in the place of 'Volume' I used this :

if ( tradePrice < midPrice )
tradeLotSize[0] = (double) dataPacket.Volume;
else
tradeLotSize[0] = (double) dataPacket.Volume * -1;

R[0] = tradePrice < midPrice ? tradeLotSize[0] : tradeLotSize[0] * -1;
TV = EMA(tradeLotSize,Period)[0];
VP = EMA(R,Period)[0];
VZO[0] = 100 * (VP / TV);
(Plotting VZO[0])

And... so far, its exactly the same as using 'Volume'...That could be because I haven't coded in
'retension' as you said you use. That "snapshot" of volume would definitely be different than
regular volume. But, I've got a question - if we used a "snapshot" of regular volume, would it
look the same as the "snapshot" of 'data.Packet.Volume?

C

So this is a NinjaTrader 8 Indicator class ?

Are you doing these things in the OnBarUpdate callback ??

You might have to post the full code. Things could get messy,
but I'll try to help.

You'll get dozens or hundreds of callbacks to OnMarketData;
and then when your chart closes a bar; you'll then want to
summarize what happened in that bar. So there may be some
confusion as to "inter bar calculations" and then "bar update"
series data? But I can't be sure without the full code.

hyperscalper

Started this thread Reply With Quote
Thanked by:
  #164 (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

So this is a NinjaTrader 8 Indicator class ?

Are you doing these things in the OnBarUpdate callback ??

You might have to post the full code. Things could get messy,
but I'll try to help.

hyperscalper


Uh, no I'm doing the calc's as posted in the previous thread before 'OnBarUpdate' ..
It's keeping up, working well - just no difference from 'Volume'.

Yeah, no - you've more than helped enough already. I thought I may have missed
something, but it appears using this for ordinary indicators isn't really that much
different.

I have noticed that the code using 'Volume' prints a larger value pretty
well all the time and it does plot the change sooner on a direction change.
(These differences are not perceptible in the regular session - but last night
it was obvious). I don't think I can do that much with that.

I may try putting in some 'Retension' later this week, but thanks for your interest.

C

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


Chof View Post
So this is a NinjaTrader 8 Indicator class ?

Are you doing these things in the OnBarUpdate callback ??

You might have to post the full code. Things could get messy,
but I'll try to help.

hyperscalper


Uh, no I'm doing the calc's as posted in the previous thread before 'OnBarUpdate' ..
It's keeping up, working well - just no difference from 'Volume'.

Yeah, no - you've more than helped enough already. I thought I may have missed
something, but it appears using this for ordinary indicators isn't really that much
different.

I have noticed that the code using 'Volume' prints a larger value pretty
well all the time and it does plot the change sooner on a direction change.
(These differences are not perceptible in the regular session - but last night
it was obvious). I don't think I can do that much with that.

I may try putting in some 'Retension' later this week, but thanks for your interest.

C

HI.

I'm just saying that i don't see how the
ARRAY is defined so that tradeLotSize[0] is assigned
a signed volume.

I'm wondering whether you defined that as a
data series at the top of the Indicator code?

If so, then you're repeatedly assigning Volume to that
ARRAY element tradeLotSize[0], so it would be
expected to equal the last reported volume.

Normally, if tradeLotSize is declared as a data series,
then it would be updated only during the OnBarUpdate
event. Typically the [0] element is the next Plot
element that gets updated in OnBarUpdate.

The RETENTION interval is what makes this a
Moving Window of time; and during any BAR,
we will have a highly variable number of Trades
which will be reported, and they are supposed to
be delimited by a fixed (moving) period of time.

You don't need to post all of your code; but it's hard
to help without seeing all of it...

hyperscalper

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

BEHAVIOR DURING A HARD RALLY IN NASDAQ FUTURES

The Screenshot shows how the TradeFlowRisk Indicator is
trying its best to show "tops", and there are some pullbacks;
however, NQ/MNQ Nasdaq Futures is simply determined to
keep pushing higher.

I keep calling this "situational awareness" but it's really
difficult in a Rally situation to judge whether there will be
any pullbacks ! lol that's a daytrader's life ! LOL

This may be at first confusing, but it is 2 instances of the
TradeFlowRisk indicator overlain; with the Net Inventory
reflected to the left (Purple and Blue)

The alternate color scheme is used for one of them.

Params are:

#1
# slower Inventory integration
RISK_THRESHOLD=30
RETENTION_SECONDS=600
MULTIPLIER=3.5
BIGLOT_MINIMUM=4
TAPER_SIZE=True
SUPER_SPIKE_THRESHOLD_RATIO=5

#2
# Faster Blue Net Inv line
# alternate color scheme
RISK_THRESHOLD=70
RETENTION_SECONDS=90
MULTIPLIER=6
BIGLOT_MINIMUM=4
TAPER_SIZE=False
SUPER_SPIKE_THRESHOLD_RATIO=5

AGAIN, it's not that obvious looking at it for the
first time, but I like this kind of setup; and it's fairly
easy to "read" the major short term trend changes.

Of course, Rallies or SellOffs, as we call them, will
always tend to overwhelm a technical indicator...

[EDIT] added a second snapshot when the "irrational rally"
finally stopped; and everybody gets trapped; just another
day in the Nasdaq LOL

[EDIT] I THINK it's fair to call this Indicator a FAILURE, if
you want to find a Bottom for this Nasdaq action !!! LOL
Wild swings of 100 points or so are typical for the Nasdaq
futures; and, as I've said before, in the presence of these
"Dirty Tricks" this little TradeFlowRisk Indicator really
can't help us find bottoms and tops. Now, when things
settle down a bit; the story may be very different !! LOL
Technical indicators are "swamped" by Nasdaq futures
Market makers desire to make a shyte-load of Money here !! lol

[EDIT-LAST] Holey Macaroni, I sure picked a great day
to illustrate how the Indicator can be overwhelmed !!! LOL
Just another day of Nasdaq Dirty Tricks...
From Peak to Trough is 300 POINTS !! whoa, Pardner LOL


hyperscalper

Attached Thumbnails
Click image for larger version

Name:	NQ-trade-flow-hard-rally.PNG
Views:	98
Size:	341.5 KB
ID:	319897   Click image for larger version

Name:	NQ-trade-flow-hard-rally-crash.PNG
Views:	70
Size:	298.0 KB
ID:	319898   Click image for larger version

Name:	NQ-trade-flow-hard-rally-fail-bottom.PNG
Views:	71
Size:	334.1 KB
ID:	319899   Click image for larger version

Name:	NQ-trade-flow-hard-pump-and-dump.PNG
Views:	69
Size:	348.4 KB
ID:	319902  
Started this thread Reply With Quote
Thanked by:
  #167 (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

Normally, if tradeLotSize is declared as a data series,
then it would be updated only during the OnBarUpdate
event. Typically the [0] element is the next Plot
element that gets updated in OnBarUpdate.


Ohhh, so can you show me what the code would look like to declare
'tradeLotSize' as a "private Series <double>" if its not declared at the top
of the code? (I went through your code and you don't do that anywhere).
I would take it then this would be done where 'tradeLotSize' is defined too.

(This is important as, I need 'tradeLotSize' to be a series double for the
EMA.)

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


Chof View Post
Normally, if tradeLotSize is declared as a data series,
then it would be updated only during the OnBarUpdate
event. Typically the [0] element is the next Plot
element that gets updated in OnBarUpdate.


Ohhh, so can you show me what the code would look like to declare
'tradeLotSize' as a "private Series <double>" if its not declared at the top
of the code? (I went through your code and you don't do that anywhere).
I would take it then this would be done where 'tradeLotSize' is defined too.

(This is important as, I need 'tradeLotSize' to be a series double for the
EMA.)

Hi.

You don't see my code doing that, since my calculations are
done in an Integrator class which I define; and I don't rely on
any NinjaTrader 8 "series" to hold my calculations.

The only NT8 series I use are related just to Plots.

Perhaps because you are using another NT8 Indicator, the EMA,
you need to feed that Indicator a series data structure. Well,
since I never do that, and handle the calculations myself; I can't
say (like I said before) how an EMA indicator is used INSIDE of
another indicator. Just never do that, so someone else will have
to answer for that approach.

Because of the Highly Variable number of data elements which
would be inside the "retention interval"; and the fact that a data
series might not be able to handle that concept ?? Because of
that, I wrote my own calculations; and all I do is to "snapshot"
their results when OnBarUpdate happens.

These 'inter bar" calculations may be difficult to handle using the
method you're proposing, into the EMA; but a real "Indicator Guy"
can help you with that, probably. I'm not saying it can't be done,
but I just don't do things that way; so I don't know... ??

hyperscalper

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


You don't see my code doing that, since my calculations are
done in an Integrator class which I define; and I don't rely on
any NinjaTrader 8 "series" to hold my calculations.

The only NT8 series I use are related just to Plots.

Perhaps because you are using another NT8 Indicator, the EMA,
you need to feed that Indicator a series data structure. Well,
since I never do that, and handle the calculations myself; I can't
say (like I said before) how an EMA indicator is used INSIDE of
another indicator. Just never do that, so someone else will have
to answer for that approach.


I'm glad I was right - hate wasting someones time if there's an example in
their code.. and, you're exactly right - that's what I'm doing..
using an indicator code inside another indicator. Its a poor excuse
but I find if I can't (average in this case) or choose not to I can't
control the oscillations of the final product and it becomes "noise".

I have someone I can ask - but thanks for getting me to this point.

Cheers,

C

Reply With Quote
  #170 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,168 since Jan 2013
Thanks Given: 57,424
Thanks Received: 26,276



Chof View Post
Ohhh, so can you show me what the code would look like to declare
'tradeLotSize' as a "private Series <double>" if its not declared at the top
of the code? (I went through your code and you don't do that anywhere).
I would take it then this would be done where 'tradeLotSize' is defined too.
...

Hi @Chof, I'm reading along, and it's good to see that you're getting into this code.

I just wanted to point out a better way to quote someone else's post -- I noticed that you are doing a copy/paste, which doesn't make it clear that it's a quote and not your own text, nor who you are quoting.

A simple way is to just hit the "Quote" button right below their post, on the right. It opens up a fresh editing window for you to type your new post, and it also puts the quoted post in a separate block that identifies who you're quoting, as you can see from your text I quoted above. Also, if someone clicks on the little triangle arrow after the quoted name, it will take them to the original post. If you don't want to have the entire post inserted into your own post, you can just edit parts out with the delete key, so you only have the relevant parts quoted, as I did with your post above.

When you quote someone this way, they also get an email message that they have been quoted, with a link to your post (if they have not turned this off in their user control panel.) They also get an email notification if you use the "@" sign in front of their forum username when you mention them (also if they have not turned this off.)

You can also use the "Wrap QUOTE tags around the selected text" icon up at the top of the edit window (It looks like a cartoon balloon of someone talking) to insert this effect:


Quoting 
This is some quoted stuff.

You would use this if you were quoting from s text source, for instance, and not from another futures.io post.

Just some simple tips. Hope they make your posting a little easier.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
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