NexusFi: Find Your Edge


Home Menu

 





PriceActionSwing discussion


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Silvester17 with 177 posts (570 thanks)
    2. looks_two dorschden with 99 posts (1,124 thanks)
    3. looks_3 Big Mike with 52 posts (90 thanks)
    4. looks_4 jmont1 with 51 posts (23 thanks)
      Best Posters
    1. looks_one dorschden with 11.4 thanks per post
    2. looks_two Silvester17 with 3.2 thanks per post
    3. looks_3 Big Mike with 1.7 thanks per post
    4. looks_4 sudhirc with 1.7 thanks per post
    1. trending_up 960,431 views
    2. thumb_up 2,947 thanks given
    3. group 613 followers
    1. forum 2,093 posts
    2. attach_file 615 attachments




 
Search this Thread

PriceActionSwing discussion

  #1061 (permalink)
 
aventeren's Avatar
 aventeren 
Bellingham, WA USA
 
Experience: Beginner
Platform: NT
Broker: Mirus (Broker), Continuum (Data), Dorman (Clearing)
Trading: Futures
Posts: 202 since Mar 2013
Thanks Given: 428
Thanks Received: 202

@dorschden--

I'd like to thank you for pulling together an incredible swing indicator. My hat is off to you.

I'd also like to thank everyone else for contributing thus far.

Over the past month or so, I built a swing indicator that is based off of Larry Williams market structure that he presents in his book "Long Term Secrets to Short Term Trading", 2nd edition, 2012. It's pretty similar to what you have done, but with a few minor differences. Williams defines short term ("ST") points in the following manner:


Quoting 
A market has made a ST low when we have a bar that has a higher low on both sides. By the same token, a ST high will be a bar that has lower bars on both sides of it. (p.22)

The Standard Swing Type gets pretty close to these definitions. However there is one small difference that is key. For a ST swing point to be valid, Williams states that in the case of a ST high that the low of the ST high bar must be breached lower before becoming a valid ST high. Similarly on the short side, the high of the ST low bar must be breached higher before becoming a valid ST low. I was able to do this via lists, but I'll be damned if you are not a fine programmer who has a much deeper grasp of the .NET language's capabilities. So perhaps you have some ideas here.

So although the Standard Swing Type using a 1 bar Swing Size gets us close to how Williams define his ST swing points, it's not perfect. Using a 2 bar Swing Size also gets us close, but not quite. But I think in this case, I've decided not to let the good be the enemy of great. If you ever wanted to collaborate further on incorporating Williams ST swings into the code, I'd be glad to help out (just PM me).

However the ST swing points really end up being noise when they are set to 1 bar. But here is why that doesn't matter. Williams goes on to define intermediate term ("IT") and long term ("LT") swing points in the same exact manner that he defines ST swing points.


Quoting 
A ST high with lower ST highs on both sides is an IT high.

By the same token, a ST low with higher ST lows on both sides is an IT low. (p. 25)

And as you guessed it, you can then zoom out even further to get an feeling of where you sit on the long term scale through the following definitions of LT swings.


Quoting 
A IT high with lower IT highs on both sides of it is just naturally a LT high by our definition, thanks to understanding market structure.

An IT low with higher IT term lows on both sides of it is just naturally a LT low by our definition, thanks to understanding market structure. (p. 26)

So here is the true value of Williams' view of market structure: It is ENTIRELY objective. There is no subjective variable that the trader can manipulate with their inborn biases. It is 100% reliant upon what the price action has produced. For this reason, I love it.

I also like his interpretation of market structure because it's transferable between different markets and time frames, and in one chart you can see where you stand on the ST, IT and LT swings. So for instance, you might only take longs off the ST or IT swing points if the last LT swing to print was a LT low. And instead of having a 1 week long term chart open assessing the long term swings (and hoping that you have the right Swing Size in place), a 1 day chart open assign the intermediate term swings (and again, hoping you have the Swing Size right) and a 60 min chart that you use for entries and exits and to assess the short term swings (and again, crossing your fingers that you are using the correct Swing Size), you just have one chart with all three swing points on it so that in a glance you can see where you stand on all swing horizons.

I'd love to collaborate with you on incorporating Williams ST, IT and LT market structure as one of the Swing Type options. I love how it objectively determines trend without allowing any room for us to mess with settings, while showing ST, IT and LT market structure on one chart.

Additionally, based on my study of Williams market structure, I also saw the value in collecting swing statistics to provide some statistical context for whether I should or should not take a given swing trade and how many bars and ticks have been observed by this particular type of swing in the past. I came across @djkiwi post here ( ), which is just freaking incredible. If you haven't read this post, read it. He gets it.

It looks like DJ exported the various swing information to the Output Window (via Print commands) and then copied into Excel, at which point he did his analysis. In my indicator, I had been looking at the same concepts (prints, Output Window, copy, paste into Excel, analyze), while also looking at MAE per swing to get a bit of context on risk. But then I saw on your latest edition this Statistics option and the resulting tabs that pop up on the bottom of the screen, and I immediately concluded that I could just create a new tab showing DJ's stats and some other ones that I have been looking at lately--and then everyone could see what DJ and I have been seeing. These stats really provide excellent context, and they have helped me in the development of a tradable edge.

So I'd like to build this new tab, and I'll PM you the code when I'm done for your review. And then perhaps you could incorporate the new stats tab into a new version for everyone. If there are any specific statistical observations that anyone wants, please let me know and I'll scratch my head and see if I can't get them in there.

To complete the stats tab, I needed to confirm what variables in the Base indicator you've used to collect the various swing relation counts. I've taken a stab at what I thought the variables where, but I couldn't get them to add up to your upCount and downCount variables--so I know that I'm missing something. Therefore, could you please help me understand your count variable naming convention? I'm assuming that "hhCountLL" means the number of swings that have gone from a HH to a LL. Is this correct? Or does ""hhCountLL" mean the number of swings that have gone from a LL to a HH? Once I understand this piece, I should be able to get the counts to square away and look like DJ's Excel work (here https://nexusfi.com/attachments/62806d1329345829).

Also, from my cursory review of your ticks by swing type, it doesn't appear that you have broken the ticks and bar durations down by swing type yet. Is that correct? If that is right, I'm assuming that I'll need to create some new variables to hold these values, which I will create per your naming conventions. Please let me know if I have missed anything. Perhaps these values are already being stored, in which case all I need to do is collect them and format them in the new tab.

Again, this is an excellent piece of work. Thank you and everyone else (@Silvester17 has made some excellent contributions to this thread) for all of the work you have done thus far. I am hopeful that I can help by assisting with the incorporation of the Williams Market Structure concepts, as well as with expanding the stats information.

All best,

Aventeren

Reply With Quote
The following 3 users say Thank You to aventeren for this post:

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
43 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #1062 (permalink)
 flexit 
Brielle,New Jersey USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: 6E,YM,GC
Posts: 26 since Aug 2010
Thanks Given: 6
Thanks Received: 13

Hi Guys,

I'm trying to plot Swing High and Low Values on my chart to resemble FT71's Harmonic Rotations using my Ninja Charts. I currently have the Price Action Swing Indicator Pro on my chart,but it appears that it is not capturing all swing High and Low points.I'm not sure if it is a setting parameter that I have wrong or this may not be the best choice for Harmonic Rotations.

Thanks in advance,
Flexit

Reply With Quote
  #1063 (permalink)
 
aventeren's Avatar
 aventeren 
Bellingham, WA USA
 
Experience: Beginner
Platform: NT
Broker: Mirus (Broker), Continuum (Data), Dorman (Clearing)
Trading: Futures
Posts: 202 since Mar 2013
Thanks Given: 428
Thanks Received: 202


Howdy--

So I spent a bit of time augmenting the PAS code to add a third tab (indexed to position 4) and populating my first stab at the columns and rows.




I have numbered the rows to aid in indexing, however the numbering will eventually go away.

I'm assuming that hhCount is equal to the count of all HH, that hlCount is equal to the count of all HL, hhCountHL is equal to the count of all HH to HL swings, lhCountLL is equal to the count of all LH to LL swings, etc. Can someone please confirm theses assumptions are correct?

Again, I'm shooting for the tab to look like @djkiki's work:



I have numbered my percentiles, counts and bars to the 0.05, however I might truncate this down to 0.10 if the 0.05 resolution is too fine (i.e., not enough variation).

I have found that it does not appear that there are counters from swing points to the DT and DB, so it looks like I'll have to create these counters.

Does anyone know off the top of their head which variables I would access to populate the mean function. I'll basically need to sum all of the ticks and divide by the count. So for instance, sum all of the HH to HL ticks and then divide by the count of the HH to LL swings. Does anyone know which variables I would access to do this?

I've snooped around, and it looks like I'll need to drop all of the swing tick movements into a sorted array so that I can find the midpoint (i.e., median). So I'll just copy what others have done in the C# world on that.

For the Standard Deviations, I plan on doing a SD(1) and SD(2), so that we can get some sense on the variability of the data. I fully expect SD(2) to be larger than the mean, in which case I might drop it. However I'll give it a shot. I'll see how this goes. I'm hoping that the help I can get on the mean process will inform the SDs.

And same on the Percentiles, Counts and Bars...hopefully the mean process will inform me there.

Okay, thanks.

Aventeren

Reply With Quote
The following 3 users say Thank You to aventeren for this post:
  #1064 (permalink)
 flexit 
Brielle,New Jersey USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: 6E,YM,GC
Posts: 26 since Aug 2010
Thanks Given: 6
Thanks Received: 13

Hello.

I previously posted a question above reguarding FT 71's Harmonic rotation swings,but am having greater problems setting up my PAS on my 8 Range NQ chart. I am able to get some Swing High/Low Labels,but that seems to be it.I can't seem to get any Double Top/Bottom,HH,HL,LH,LL,Labels...I tried changing the parameters but no success.I'm also trying to incorporate the Divergence study using GOM CD,not sure what I'm doing wrong.I have been going over all the posts in this thread trying to figure out these issues but with no avail.I would greatly appreciate any help.

Thanks in advance,
Flexit

Reply With Quote
  #1065 (permalink)
 
learning0101's Avatar
 learning0101 
Houston, Texas
 
Experience: Intermediate
Platform: NinjaTrader,TOS,Etrade,St
Broker: NT:( tos,etrade,CS
Trading: stocks,options,futures,forex
Frequency: Never
Duration: Never
Posts: 287 since Aug 2011
Thanks Given: 3,613
Thanks Received: 222


flexit View Post
Hello.

I previously posted a question above reguarding FT 71's Harmonic rotation swings,but am having greater problems setting up my PAS on my 8 Range NQ chart. I am able to get some Swing High/Low Labels,but that seems to be it.I can't seem to get any Double Top/Bottom,HH,HL,LH,LL,Labels...I tried changing the parameters but no success.I'm also trying to incorporate the Divergence study using GOM CD,not sure what I'm doing wrong.I have been going over all the posts in this thread trying to figure out these issues but with no avail.I would greatly appreciate any help.

Thanks in advance,
Flexit

Hi @flexit sorry I have no clues but do realize that along with your request/dilemma some images of what you speak of help those that are willing to help much more.
(there are some amazing people here that can figure out just about anything) Thanks @Big Mike
e.g. images of your chart, indicator settings panel etc.
along with some annotations for each. Along with, even if previously posted, an explanation(including images) what it is you wish to accomplish

Reply With Quote
The following 2 users say Thank You to learning0101 for this post:
  #1066 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


flexit View Post
Hello.

I previously posted a question above reguarding FT 71's Harmonic rotation swings,but am having greater problems setting up my PAS on my 8 Range NQ chart. I am able to get some Swing High/Low Labels,but that seems to be it.I can't seem to get any Double Top/Bottom,HH,HL,LH,LL,Labels...I tried changing the parameters but no success.I'm also trying to incorporate the Divergence study using GOM CD,not sure what I'm doing wrong.I have been going over all the posts in this thread trying to figure out these issues but with no avail.I would greatly appreciate any help.

Thanks in advance,
Flexit

the pas indicators all are working great with range charts, including the gom cd divrgence:



@learning0101 made an excellent point about showing your chart, settings etc. so for now I can only guess. one guess would be you're using a dark blackground and the text color is black.

Reply With Quote
The following 6 users say Thank You to Silvester17 for this post:
  #1067 (permalink)
 flexit 
Brielle,New Jersey USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: 6E,YM,GC
Posts: 26 since Aug 2010
Thanks Given: 6
Thanks Received: 13

Hi learning0101 and Silvester17

Thanks for your quick response.I am attaching a few screenshots of my NQ 8 Range chart and the Parameters that I currently have set,I'm obviously doing something wrong with the parameters because my chart doesn't resemble yours.I am also trying to get my GOM CD to work with the PAS to show divergences.Thanks Again for all your help,I truly appreciate your time.

Flexit

Attached Thumbnails
Click image for larger version

Name:	8 Range NQ.PNG
Views:	267
Size:	72.0 KB
ID:	151768   Click image for larger version

Name:	PAS Parmeters.PNG
Views:	213
Size:	78.2 KB
ID:	151769   Click image for larger version

Name:	PAS Parameters 2.PNG
Views:	173
Size:	81.7 KB
ID:	151770   Click image for larger version

Name:	PAS Parameters 3.PNG
Views:	163
Size:	82.4 KB
ID:	151771  
Reply With Quote
  #1068 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


flexit View Post
Hi learning0101 and Silvester17

Thanks for your quick response.I am attaching a few screenshots of my NQ 8 Range chart and the Parameters that I currently have set,I'm obviously doing something wrong with the parameters because my chart doesn't resemble yours.I am also trying to get my GOM CD to work with the PAS to show divergences.Thanks Again for all your help,I truly appreciate your time.

Flexit

ok, that helped a lot

first you don't have the "gom cd" features enabled in your pas pro indicator. I attached a version where gom cd is enabled. copy that version in your indicator folder and click "copy and replace" when a window pops up.

also it looks like you don't have any data recorded. your gom cd indicator shows a straight line. if you don't have any data recorded, the pas pro is not able to show any cd divergences.

I also attached a chart template with the settings I used in my previous post. you can use that to get started and then change it the way you like it.

good luck!!

Attached Files
Elite Membership required to download: PriceActionSwingPro.cs
Elite Membership required to download: flexit.xml
Reply With Quote
The following 7 users say Thank You to Silvester17 for this post:
  #1069 (permalink)
 Camdo 
Boston, MA / USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES
Posts: 251 since Apr 2013
Thanks Given: 2,698
Thanks Received: 392


aventeren View Post
Howdy--

I'm assuming that hhCount is equal to the count of all HH, that hlCount is equal to the count of all HL, hhCountHL is equal to the count of all HH to HL swings, lhCountLL is equal to the count of all LH to LL swings, etc. Can someone please confirm theses assumptions are correct?

Aventeren


@aventeren Check out comments starting with post #757 thru 762 starting on page 76 of this thread. There are some initialization and round off issues with feature counting.

Reply With Quote
The following user says Thank You to Camdo for this post:
  #1070 (permalink)
 flexit 
Brielle,New Jersey USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: 6E,YM,GC
Posts: 26 since Aug 2010
Thanks Given: 6
Thanks Received: 13


Hey Silvester17,

Just saw your post...Awesome !!! Thanks so much for the Chart templates and parameters,I'll be working on it later today...Thanks again...Have a Great weekend !!!

Flexit

Reply With Quote
The following user says Thank You to flexit for this post:





Last Updated on January 7, 2024


© 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