Support and resistance indicator - futures io
futures io futures trading



Support and resistance indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Adamus with 33 posts (32 thanks)
    2. looks_two bgeorge with 9 posts (1 thanks)
    3. looks_3 Cloudy with 6 posts (3 thanks)
    4. looks_4 Abde with 5 posts (2 thanks)
      Best Posters
    1. looks_one trendisyourfriend with 1.7 thanks per post
    2. looks_two Adamus with 1 thanks per post
    3. looks_3 Cloudy with 0.5 thanks per post
    4. looks_4 Abde with 0.4 thanks per post
    1. trending_up 21,982 views
    2. thumb_up 47 thanks given
    3. group 17 followers
    1. forum 63 posts
    2. attach_file 15 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Support and resistance indicator

(login for full post details)
  #1 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

I just uploaded my first attempt at a support and resistance indicator here

Currently it's pretty basic and it's mostly unusable! Yes I know that sounds dumb but I put it up here because I figured some other people might be interested in the same thing and have advice or suggestions.

So far, I'm just showing S/R lines based on swing highs and swing lows, defining a swing as a high or a low surrounded by 2 bars either side that are lower or higher respectively.

This generates a lot of lines, but I put the lines onto a much smaller time frame chart and then it starts to make sense, i.e. I have a long timeframe (e.g. 60mins - invisible) and a trading timeframe (e.g. 3mins) and I apply the indie to the 60min data series but show the lines on the 3min series.

On the list of features is to integrate the higher timeframe dataseries into the indie so as not to require it on the chart.

In the short term, this is meant to help my discretionary trading but cutting out the painstaking process in NT7 of drawing the lines individually onto the chart.

In the long term, I want to use it programmatically in strategies so my strategies can avoid doing dumb things like going long right under resistance.

In future versions, I want to automatically merge S/R lines that are close together, with a parameter that tells the indie what "close together" actually is in terms of ticks.

I also want to add levels for round numbers, e.g. 1.3500 and 1.3550

And I also want to add session highs and lows for the current session since they often don't make it into the higher timescale S/R.

It would also be good to parameterize how many bars either side of the swing high / low are needed to make it a swing high / low. It's currently fixed at 2, but 3 or 4 might be better.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following 11 users say Thank You to Adamus for this post:

Can you help answer these questions
from other members on futures io?
Short Interest Ratio indicator?
ThinkOrSwim
NT8 indicator to simulate a Funding Evaluation where to …
NinjaTrader
SimplerOptions
Trading Reviews and Vendors
What blockvolume is visible? - order processing
NinjaTrader
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
142 thanks
Big Mike in Ecuador
34 thanks
Want your NinjaTrader indicator created, free?
32 thanks
Saturday Morning Market Replay!
20 thanks
Selling Options on Futures?
19 thanks
 
(login for full post details)
  #3 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


List of things to do, in rough order of importance:
  1. automatically merge S/R lines that are close together, with a parameter that tells the indie what "close together" actually is in terms of ticks
  2. add levels for round numbers, e.g. 1.3500 and 1.3550
  3. integrate the higher timeframe dataseries into the indie so as not to require it on the chart, which will mean hard-coding it. Might need to add the daily data as well I just realised today - see chart - bottom support is from December, which doesn't make it onto my 3min or 60min chart
  4. add session highs and lows for the current session since they often don't make it into the higher timescale S/R
  5. add the ability to downgrade S/R lines that come from uninteresting hours, e.g. the Asian session during the EUR/USD forex day, by using 3 bars either side for the definition of swing points (might not be so useful, but interesting to try out)
  6. parameterize how many bars either side of the swing high / low are needed to make it a swing high / low. It's currently fixed at 2, but 3 or 4 might be better
  7. create a dataseries property with all the levels in, which a strategy can call


You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following 7 users say Thank You to Adamus for this post:
 
(login for full post details)
  #4 (permalink)
Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
 
Posts: 532 since Aug 2010
Thanks: 2,141 given, 726 received

Hi @Adamus,

Congrats to your new indicator and thanks for sharing!

I like to use it for the big picture support and resistance levels and apply it to display daily and weekly levels. But right now that´s not applicable at a small timeframe chart like a 5 minute.

I think the most important feature is to integrate the higher timeframe dataseries into the indie.

Also good would be a option to display user configurable zones like in the ConstanZonesV2 indi in post 8 from here:

A continuing improvement would also be to have an option for audio alerts with an user selectable tick offset.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


Abde View Post
Congrats to your new indicator and thanks for sharing!

I like to use it for the big picture support and resistance levels and apply it to display daily and weekly levels. But right now that´s not applicable at a small timeframe chart like a 5 minute.

I think the most important feature is to integrate the higher timeframe dataseries into the indie.

Yes that is pretty close to the top of the list.


Abde View Post
Also good would be a option to display user configurable zones like in the ConstanZonesV2 indi in post 8 from here:

You think so? Isn't it just as easy from the user's perspective to keep the indicators seperate, and to save them together as a template rather than have the code merged into one indie?


Abde View Post
A continuing improvement would also be to have an option for audio alerts with an user selectable tick offset.


This is the same situation - rather than build one colossal indie that does everything, it's better generally to keep them seperate and save them together into a template if you want it to be easy to apply to a new chart.

That way, if some writes a better alert indie, or zone indie, or even s/r indie, you can easily swap it out on your charts rather than wait for the indie developer of the colossal indicator to incorporate the new stuff.

Could be done though, no doubt about that.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #6 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Today on the EUR/USD the indicator just ran out of data on the settings I'm using.

I had the daily dataseries set to 100 days of history and the 60min set to 30 days.



The market moved into territory not seen for a month and the S/R just disappeared - at least from the 60min chart.

The S/R from the daily chart was too far off - the next support is down at 1.3000.

Had to set the 60min dataseries to load up 60 days and then all was fine - the performance wasn't noticeably slower despite about 200 lines being plotted.

This will be something to check before every session - that I've got enough data to show S/R up to 200 points in either direction.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #7 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Been max'ed out with work on my trading plan and psychology programme, so I haven't had a chance to do much on this.

All I can say is, it's probably gonna get worse before it gets better.

At the moment there is way too much stuff on the screen to be able to see what's going on. I obviously programmed this indi to see those levels, but I also want to be able to see past them. Hmm. Never was good at visual design.



Apart from that road-block, I programmed the indi to generate a List of S/R levels rather than an array which means the number of S/R levels it can plot is restricted only by NinjaTrader and how well it can utilise the Win7 and the hardware.

So far so good in terms of performance. There are 350 levels of S/R plotted here and it doesn't need noticeably more time to load the chart.

What I want to do next is load up S/R levels generated on different time-frames. After a working career in software development, there's no way I can hard-code them because this isn't just RAD, this is a serious indicator that I want to re-use without reprogramming.

I figured there might be a way to do this by decoupling the S/R determination from the chart plot, putting them in seperate indicators. I can create an indicator that does nothing except identify swing points and sticks them in a dataseries. Then I create the second indicator which will plot the S/R levels from the chosen time-frames.

I think I'd have to hard-code the time-series into the second indicator - say, the weekly, daily, 4 hourly, 2 hourly, hourly, 1/2 hourly and 15mins time-frames - and hard-code the first indicator onto each.

Then I'd have true/false parameters to let the user decide which ones to plot. I'd just use the daily and the hourly myself at this point.

Sounds like a lot of overhead but I figure I can disable most of the processing, making the 1st indicator return direct out of the onBarUpdate if it's not enabled. That would be 7 time-series and they'd be more than 50% disabled. My guess is that's not much overhead.

There wouldn't be anything for this 1st indicator to plot - it's just discovering swing points, not plotting them - so hopefully I can work out how to prevent NT7 from doing any plot overhead for it. Maybe it doesn't even need to be an indicator, it can just be a function.

The main point is that the enabled indicators have a data-series accessible to the 2nd indicator so the 2nd indicator can grab all the swing levels generated.

Thinking ahead, the 2nd indicator will then have a big unsorted list of S/R levels. It'd be better to have it sorted, so each new S/R level generated can be checked against what's there already, and if it's close to an existing one, instead of plotting 2 lines, I'd plot a shaded zone (which is what I'm doing already but just instead of lines).

I'll try it out. Probably sounds over the top, maybe it is - I guess I'll find out.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
Michigan, Jackson
 
Experience: Intermediate
Platform: NT and TS
Broker: NT Continuum
Trading: ES, CL
 
Posts: 857 since Jul 2009
Thanks: 389 given, 551 received


Adamus View Post
What I want to do next is load up S/R levels generated on different time-frames. After a working career in software development, there's no way I can hard-code them because this isn't just RAD, this is a serious indicator that I want to re-use without reprogramming.

Adamus,

Sounds brilliant. Any workable code found in the Price Action Swing Pro indicator? It provides naked and historical Swing Lines. It also provides statistical analysis that could be arranged to show you higher time frames, too.

Ken "COTtrader"

Reply With Quote
The following user says Thank You to COTtrader for this post:
 
(login for full post details)
  #9 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Yes that's certainly something I should study, there may be some stuff I can take on board - although I have an immediate mental block at the thought of moving away from simple horizontal lines. Will have to sleep on it.

Just had some more thoughts on this.

I can get rid of any support lines that are above the market, and any resistance lines that are below the market.

Some people hold that S/R lines get broken and cease to exist once the market has gone through them. In my humble experience I find that S/R lines don't die so easily. They take a lot of criss-crossing to nullify the emotional impact they had when they were created.

However they do flip-flop: support will become resistance and resistance will become support. That is going to be interesting to code, but it should reduce the number of lines on the screen.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #10 (permalink)
Michigan, Jackson
 
Experience: Intermediate
Platform: NT and TS
Broker: NT Continuum
Trading: ES, CL
 
Posts: 857 since Jul 2009
Thanks: 389 given, 551 received


More simply something like the Swing Indicator using Ray Lines. It removes violated (naked) S/R lines.

IMHO, S/R lines of the last N-days HVNs and LVNs.

Ken "COTtrader"

Reply With Quote
 
(login for full post details)
  #11 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Ken,

do you use this Swing Indicator? Just looking at it, I wonder whether it shows some sort indicator of chop or the extent of choppiness, like how many times the swing count is broken?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #12 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Totally re-wrote the indicator along the lines I outlined. Turned out to be best to do it a bit differently.

It's all in one indicator, there was no point in making seperate indicators for different components that would generate the price levels. Now I've got a new Plot() overriding the original. Took a bit of head-scratching and there were a few NinjaTrader built-in problems. A lot of it is unsupported which means NinjaTrader reserve the right to change NinjaScript in ways that will foobar the indie, but that's the only way it can be done.

Having some major problems debugging the session times for the session highs/lows S/R lines I want to include. Print() is not the quickest way to debug. Otherwise I thought I'd have another version to post here. Will have to wait til tomorrow.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #13 (permalink)
Michigan, Jackson
 
Experience: Intermediate
Platform: NT and TS
Broker: NT Continuum
Trading: ES, CL
 
Posts: 857 since Jul 2009
Thanks: 389 given, 551 received


Adamus View Post
Ken,

do you use this Swing Indicator? Just looking at it, I wonder whether it shows some sort indicator of chop or the extent of choppiness, like how many times the swing count is broken?

Adamus,

Apology for the late reply. I use the Price Action Swing Pro (PAS). I am only using the Volume information from it.

Actually, I will need to have it recoded to align with the subpanel indicator. It doesn't recognize the double tops/bottoms my indicator points out. A dbl top or dbl bottom cannot be taken unless price has moved at least within a 4 tick span.

I've also discovered a divergence trade setup using the same subpanel indie. I call it "Kbar"

I believe these two setups can be accomplished from within the PAS or swing indicator.

I included a couple of picks to show the accuracy of this Algo on the ES. It would be a nice algo to run were it properly set up.

Ken "COTtrader"

Attached Thumbnails
Click image for larger version

Name:	Kbars.png
Views:	288
Size:	47.6 KB
ID:	104720   Click image for larger version

Name:	DoubleBtmTps.png
Views:	278
Size:	55.7 KB
ID:	104721  
Reply With Quote
The following user says Thank You to COTtrader for this post:
 
(login for full post details)
  #14 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Thanks @COTtrader, thanks for the input. That's something I'll have to look at later. At this point I'm haven't got as far as something as relatively complex as double bottoms. The swing points I coded the indie to recognise are all single.

I'm putting up version 3.

All the code is in the one indicator. It's getting big, unavoidable though. I've now made it load up user-defined amounts of different time-frame bars to scan for swing points. There's 15 mins, 30mins, 60mins, 120mins, 240mins, daily and weekly to choose from.

Plus I've added the ability to define the high and low for two user-defined "sub-sessions", putting in the start and finish times.

Plus it marks round numbers.

The worst part is the fiddley stuff, and there's much more of the fiddley stuff to be done.

The first thing that is noticeable is that the labels just overlap when space is tight and it becomes illegible.

Later one I'll re-write the list of functionality still required.


You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #15 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Hi @Abde,

it turns out my original thoughts on keeping indicators seperate was nice but just not possible.

It should be really easy to add user-defined S/R zones, using parameters for price range, date/time range and desired color. I assume it's only 1 you want - what do you use it for?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #16 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

List of things to do, in rough order of importance:
  1. research whether there is any way to have the labels show only on mouse-over of a small part of the line
  2. parameterize how many bars either side of the swing high / low are needed to make it a swing high / low. It's currently fixed at 2, but 3 or 4, or 3 before, 2 after might be better (this might be an effective way to cut down the number of lines)
  3. automatically merge S/R lines that are close together, with a parameter that tells the indie what "close together" actually is in terms of ticks
  4. add a rule to kill off S/R lines when they invalidate themselves - I'll have to go over the charts to work out what best represents a killer event
  5. add the ability to downgrade S/R lines that come from uninteresting hours, e.g. the Asian session during the EUR/USD forex day, by using 3 bars either side for the definition of swing points (might not be so useful, but interesting to try out)
  6. hide S lines below the market on the chart and hide R above it
  7. instead of just a line for a level, create a zone based on how the swing point was formed, e.g. just the tails of the candles, or the hi and low of the small candle in a morning star candlestick pattern etc.
  8. create a dataseries property with all the levels in, which a strategy can call


Taking care of the labels is the worst on the list because I have no idea how to do it, but there's got to be a way. Doubt I'll get any help from NinjaTrader Support on it. I'm hoping they'll have an example they can give me rather than just a straight "sorry that is unsupported".

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #17 (permalink)
Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
 
Posts: 532 since Aug 2010
Thanks: 2,141 given, 726 received


Adamus View Post
Hi @Abde,

it turns out my original thoughts on keeping indicators seperate was nice but just not possible.

It should be really easy to add user-defined S/R zones, using parameters for price range, date/time range and desired color. I assume it's only 1 you want - what do you use it for?

Hi @Adamus,

no I didn´t mean only 1 but rather generally for all lines, though after rethinking that, it´s not reasonable. It would only make sense to apply it for the weekly S/R levels and perhaps for the daily. Then the opacity of the desired color and the tick offset from the mean should be user definable.

The thought behind the zones is to create buy and sell areas because the price often exceed the S/R levels only to come back and go the other way (false breakouts).
It is posiible to add also monthly S/R levels?

Reply With Quote
 
(login for full post details)
  #18 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


Abde View Post
Hi @Adamus,

no I didn´t mean only 1 but rather generally for all lines, though after rethinking that, it´s not reasonable. It would only make sense to apply it for the weekly S/R levels and perhaps for the daily. Then the opacity of the desired color and the tick offset from the mean should be user definable.

The thought behind the zones is to create buy and sell areas because the price often exceed the S/R levels only to come back and go the other way (false breakouts).
It is posiible to add also monthly S/R levels?

Adding monthly S/R levels shouldn't take more than 15 mins to add. I should be able to do that at some point soon even though the labels and the merging the close-together zones is a pretty big priority right now - I find I'm only using it for session highs and lows at the moment because of too many lines from the 60min time-frame alone.

I didn't understand the rest of what you said - apart from the bit about break-outs. What's the tick offset from the mean in terms of S/R levels?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #19 (permalink)
Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
 
Posts: 532 since Aug 2010
Thanks: 2,141 given, 726 received


Adamus View Post
Adding monthly S/R levels shouldn't take more than 15 mins to add. I should be able to do that at some point soon even though the labels and the merging the close-together zones is a pretty big priority right now - I find I'm only using it for session highs and lows at the moment because of too many lines from the 60min time-frame alone.

I didn't understand the rest of what you said - apart from the bit about break-outs. What's the tick offset from the mean in terms of S/R levels?

@Adamus,

I am sorry that I explained it a bit complicated. Assuming that the S/R level is 100 and 5 tick offset is choosed, the zone display would be from 95 to 105. Five tick above and five tick below the S/R number. I hope it´s understandable now.

Reply With Quote
The following user says Thank You to Abde for this post:
 
(login for full post details)
  #20 (permalink)
SP/Brazil
 
Experience: Advanced
Platform: Ninja Trader
Trading: Futures
 
Posts: 5 since Jan 2013
Thanks: 0 given, 3 received

Hi @Adamus,

It is possible to only plot the lines of support and resistance for a range chart without looking to a 15 minute candle chart? when i tried it plotted a lot of lines and my ninja didnt respond for 5 minutes. I just want it to plot the last 3 days Sup/Res lines.

Thanks!

fcg237

Reply With Quote
 
(login for full post details)
  #21 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


fcg237 View Post
Hi @Adamus,

It is possible to only plot the lines of support and resistance for a range chart without looking to a 15 minute candle chart? when i tried it plotted a lot of lines and my ninja didnt respond for 5 minutes. I just want it to plot the last 3 days Sup/Res lines.

Thanks!

fcg237

OK but what's a range chart? Do you want to give me an example?

Did you enable all of the different time-frames? Or did you just use the defaults?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #22 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received

I just noticed your new indicator Adamus, Congrats and thanks! I look forward to have fun trying it out and will let you know if I have comments about it.

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Cloudy for this post:
 
(login for full post details)
  #23 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Thanks Cloudy, just remember it's in beta testing though. There are some serious usability issues that need to be sorted out, as per the list above.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #24 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Just uploaded a bug-fix version.

I had several situations where I was running into 'index out-of-bounds' situations, or race conditions where it just sat there and hogged as much CPU as it could get.

This indicator is proving to be a lot more complicated than I thought. Several factors increase how difficult it is to get it right:

- multiple time-series (this one now has 10, all hard-coded in, but 95% disabled unless used)

- the current time-zone shift with Daylight Saving now in the US but not in Europe for 2 weeks

- the new update of Ninjatrader (7.0.0.12) which technically should be effortless but always causes something to go wrong

- Interactive Brokers as a data provider to NT7 with the tendency for unnecessary data requests resulting in IB "pacing violations"

- the built-in indexing of bar references being descending past -> present in the OnBarUpdate event, but ascending in the override Plot function

- in fact, anything to do with the Plot function

Finally, I am at the point where I can advance onto the next bit of functionality needed, which is the merging of the S/R lines when they are close together.

Depending on how long that takes, I'll either post it as v4 as soon as complete or I'll carry on and code some functionality to make the labelling of the lines better.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following 3 users say Thank You to Adamus for this post:
 
(login for full post details)
  #25 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,790 since Jun 2009
Thanks: 32,314 given, 97,612 received

Notifications sent.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:
 
(login for full post details)
  #26 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Thanks @Big Mike - that's not automatic when I do the upload then?

New list of things to do, in rough order of importance:
  1. automatically merge S/R lines that are close together, with a parameter that tells the indie what "close together" actually is in terms of ticks
  2. show labels only on mouse-over of a small part of the line
  3. add a rule to kill off or reverse S/R lines when broken - go over charts & work out what best represents a killer event
  4. add a parameter for how much above & below an S/R line to include in the rectangle
  5. parameterize how many bars either side of the swing high / low are needed to make it a swing high / low. It's currently fixed at 2, but 3 or 4, or 3 before, 2 after might be better (this might be an effective way to cut down the number of lines)
  6. instead of just a line for a level, create a zone based on how the swing point was formed, e.g. just the tails of the candles, or the hi and low of the small candle in a morning star candlestick pattern etc.
  7. create a dataseries property with all the levels in, which a strategy can call

If anybody wants to give me some thoughts about what exactly defines when an S/R level is clearly broken, that'd be appreciated.

What I thought would be easiest to code - the lines at round numbers - is turning out to be the most complicated, because it can be either S or R. Took me a while to work out the simplest solution.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #27 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,790 since Jun 2009
Thanks: 32,314 given, 97,612 received


Adamus View Post
Thanks @Big Mike - that's not automatic when I do the upload then?

No, I have to do it manually - and I do it once I see a post indicating it was updated. Just help me by editing the description of the download and including a small date/changelog at the bottom so when people get the notification, they can check to see if they need to update or not.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #28 (permalink)
Melbourne
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Forex
 
Posts: 104 since Apr 2012
Thanks: 78 given, 46 received


Quoting 

If anybody wants to give me some thoughts about what exactly defines when an S/R level is clearly broken, that'd be appreciated.

How about something like if the price has traded beyond an S/R line by more than x ticks for n amount of bars, consider it broken. For example, if the price has pierced a resistance line by more than 5 ticks for 3 consecutive bars, consider the resistance broken. Just an idea I'm throwing out there, it may be flawed. One good thing about this approach is that it would allow a quick spike past an S/R line without invalidating it. So if market momentum happens to carry the price briefly through an otherwise 'valid' S/R line, the indicator won't just discard it.

Reply With Quote
The following user says Thank You to HitTheCity for this post:
 
(login for full post details)
  #29 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,657 given, 5,120 received


Quoting 
If anybody wants to give me some thoughts about what exactly defines when an S/R level is clearly broken, that'd be appreciated.

What about fading the level on paper. If you lose then just consider it broken.

Seriously, as a rule of thumb if price breaks a level and retest it and make a higher high then it is considered broken.


Reply With Quote
The following 2 users say Thank You to trendisyourfriend for this post:
 
(login for full post details)
  #30 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received

I've been using the indicator, thanks. I just set the day, weekly , and 1st and 2nd sub sessions to 'true'. Everything else to 'false'. Very nice levels.

example:

Attached Thumbnails
Click image for larger version

Name:	support_level_tagged.JPG
Views:	319
Size:	86.4 KB
ID:	107061  
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Cloudy for this post:
 
(login for full post details)
  #31 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


trendisyourfriend View Post
What about fading the level on paper. If you lose then just consider it broken.

Seriously, as a rule of thumb if price breaks a level and retest it and make a higher high then it is considered broken.


OK TIYF, but what constitutes a break? Do you mean a bar with a low above the R is a break, and the retest is a lower low than the low just mentioned? Or a touch or break again of R?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #32 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Need a time-zone parameter to define which time-zone the sub-session are defined for. Daylight Savings Time change-overs at different dates can really throw the sub-sessions out of whack.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #33 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received

Adamus, unfortunately I've noticed the new version seems to stop showing some lines when on a tick, range, or other exotic type charts. They show up on the minute charts.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #34 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


Cloudy View Post
Adamus, unfortunately I've noticed the new version seems to stop showing some lines when on a tick, range, or other exotic type charts. They show up on the minute charts.

Rats. I'll have to do some work then. Did you drop back to the previous version or have you lost it?

I just realized I also messed up the version number - wasted time looking at the wrong version.

Can you be any more specific about which lines disappear? Could it be that the lines just get too thin and so they don't show, or do you think they just don't get plotted? When you next see that a line is missing, could you expand the Y-axis right up to see if it appears? I mean, so you can see tick resolution.

Thanks.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #35 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received

I just remembered I had the first version saved somewhere now that you mentioned it. Ok, I've renamed the new version "PermaCodeSR003b" then I re-imported the old one (it's still named ..SR003 in NT) and the lines are back. (i turned off the 15 and 60 minute ones) and the rest of the settings on default when loaded. I've attached screenshots and the original. The round number lines still plot in the new version but not the others it seems. I also tried stretching the y-axis, but just the round number lines show up. Thanks Adamus.

Attached Thumbnails
Click image for larger version

Name:	6e_perma4_1.JPG
Views:	228
Size:	163.9 KB
ID:	109965   Click image for larger version

Name:	6e_perma4_2.JPG
Views:	262
Size:	223.9 KB
ID:	109966  
Attached Files
Register to download File Type: zip PermaCodeSR001.zip (7.8 KB, 63 views)
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Cloudy for this post:
 
(login for full post details)
  #36 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Just trying out the stuff with tick charts now.

Have to swap over to IQFeed for tick charts, because IB only gives me minute historical data. I'll post more when I work out the issue.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #37 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

@Cloudy - a schoolboy error. I fixed it and uploaded the new export - it's now PermaCodeSR003r2 so that it doesn't overwrite the previous version - just in case the fix brings another bug out of the woodwork

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #38 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received

Thanks Adamus! Very appreciate of your fine work and generous sharing.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #39 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,657 given, 5,120 received

Hi Adamus,

Have you considered this idea of using multiple Donchain channels to identify significant zones on the chart:


Reply With Quote
The following user says Thank You to trendisyourfriend for this post:
 
(login for full post details)
  #40 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received


trendisyourfriend View Post
Hi Adamus,

Have you considered this idea of using multiple Donchain channels to identify significant zones on the chart:

No to be honest I hadn't but I'm always open to suggestions. Did you paint the zones on the chart based on the lines or is it part of the indicator?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #41 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,657 given, 5,120 received

Adamus,

I draw the zones or lines manually but it is done quickly using a top down approach. I may start on the 120 min. time frame like in the example and use the Fibonacci tool to display one line (50%) which i extend to the right side. I duplicate this Fibonacci line wherever i see a significant level created by the many donchain channels. I can display these Fib. lines on all my charts for a particular symbol if i select Attach to 'All Charts'.


Reply With Quote
The following 2 users say Thank You to trendisyourfriend for this post:
 
(login for full post details)
  #42 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received



This indicator has become a monkey on my back. Anyway, trying to complete it by coding it to remove or kill off S/R lines when broken. The problem is that it is so easy to see what should happen by eye, but defining it and coding it is really difficult.

The only way to do this in my non-design-oriented approach is to take example after example and assume that at some point I will have covered enough different situations to make it work in general.

Here's the first situation. I'm looking at the lines of resistance in this chart and I haven't got it quite right yet.

At this point I am not merging the lines yet - I figured this is the more important part to get right.

For a resistance line to be invalidated, the market must go through it, but not go straight through it. If the market shoots off away from this level towards the next on a bar going either closing at least x points away or putting in a low above the line, it flip-flops the resistance into a support level that will be tested by a retrace.

That situation isn't happening in this chart - here a new resistance level in the form of a higher swing high is created, which becomes clear on the close of the 09:00 bar. The market hasn't moved to a totally new level, it's just redefined resistance at this level.

So in this chart, there are 3 lines of resistance and the lines at 1.3065 and 1.3071 should be killed off, leaving only the 1.3078 line. These two lines are basically forgotten by the market and by my way of thinking don't have any impact any more.

I'm going to make a rule here to let me kill off insignificant levels: if a resistance level is penetrated before the market has created a subsequent support level, then the resistance level is invalidated.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #43 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

I finished two rules for cancelling S/R lines and one for flipping them, and cured several mean NinjaScript-based shenanigans, then started work on the labels which need to convey a lot of info and were just too long.

I am currently putting the labels into tooltips which pop-up on mouse hover events for buttons. I need controls for tooltips, e.g. buttons, which I figured would be the easiest to code.

But I hit a problem. It looks like placing a button on the chart causes NT7 to fire Plot() and of course my Plot() creates the buttons, so that creates Windows carnage with an infinite loop.

I'm now trying to create the buttons only once for each S/R level and then to move them around, but I haven't got the code right yet.

If that fails, I'll have to use the onMouseMove() event for the whole chart and check in that for the mouse hovering over any of the buttons. Might be better not to use real button controls anyway and just DrawRectangle instead - although the advantage of button controls is I can code the button click to remove the S/R level from the chart - a nice-to-have.

If there are any hardcore C# developers reading this, then I'd love to hear their opinions about whether this is going to consume vast numbers of CPU cycles.



I'll post a screenshot with the diddy little buttons on the chart if I get them to appear again.

Haha! Fun. Ninja doesn't include buttons in its screenshots. Here's one from ALT+printscreen:


You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #44 (permalink)
Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
 
Posts: 532 since Aug 2010
Thanks: 2,141 given, 726 received


Adamus View Post


This indicator has become a monkey on my back. Anyway, trying to complete it by coding it to remove or kill off S/R lines when broken. The problem is that it is so easy to see what should happen by eye, but defining it and coding it is really difficult.

The only way to do this in my non-design-oriented approach is to take example after example and assume that at some point I will have covered enough different situations to make it work in general.

Here's the first situation. I'm looking at the lines of resistance in this chart and I haven't got it quite right yet.

At this point I am not merging the lines yet - I figured this is the more important part to get right.

For a resistance line to be invalidated, the market must go through it, but not go straight through it. If the market shoots off away from this level towards the next on a bar going either closing at least x points away or putting in a low above the line, it flip-flops the resistance into a support level that will be tested by a retrace.

That situation isn't happening in this chart - here a new resistance level in the form of a higher swing high is created, which becomes clear on the close of the 09:00 bar. The market hasn't moved to a totally new level, it's just redefined resistance at this level.

So in this chart, there are 3 lines of resistance and the lines at 1.3065 and 1.3071 should be killed off, leaving only the 1.3078 line. These two lines are basically forgotten by the market and by my way of thinking don't have any impact any more.

I'm going to make a rule here to let me kill off insignificant levels: if a resistance level is penetrated before the market has created a subsequent support level, then the resistance level is invalidated.

Hi @Adamus,

Is this new version already available or still in work?

Thanks.
Abde

Reply With Quote
 
(login for full post details)
  #45 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Hi Abde

I think you only scanned the last post, right? It's not uploaded because I can't get the buttons to show!

I need help from someone with higher powers - it's a Windows thing now. In a nutshell, I am creating the buttons off the screen (with minus-value co-ordinates) and then trying to get them to appear by changing the co-ordinates to the correct value in Plot() - but I've no idea if this will work and I can't even change the co-ordinate values yet.

The way I've coded it, I am placing the label button (10px by 10px) at the start of the S/R line. Catching the correct timestamp for the point of creation in OnBarUpdate() and making a correct test for it in the Plot() are both quite complex operations, since it's MTF and each S/R level to be plotted is kept on a per-bar basis.

In fact I find it insanely time-consuming since there are so many edge-effects where something stops working.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #46 (permalink)
Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
 
Posts: 532 since Aug 2010
Thanks: 2,141 given, 726 received


Adamus View Post
Hi Abde

I think you only scanned the last post, right? It's not uploaded because I can't get the buttons to show!

I need help from someone with higher powers - it's a Windows thing now. In a nutshell, I am creating the buttons off the screen (with minus-value co-ordinates) and then trying to get them to appear by changing the co-ordinates to the correct value in Plot() - but I've no idea if this will work and I can't even change the co-ordinate values yet.

The way I've coded it, I am placing the label button (10px by 10px) at the start of the S/R line. Catching the correct timestamp for the point of creation in OnBarUpdate() and making a correct test for it in the Plot() are both quite complex operations, since it's MTF and each S/R level to be plotted is kept on a per-bar basis.

In fact I find it insanely time-consuming since there are so many edge-effects where something stops working.

Hi @Adamus,

I meant the S/R indicator which is applied in the embeded plot of my prior post #44.

I know MTF coding is complicated but maybe you can ask for help in the MTF coding thread here: I wish you good luck.

Reply With Quote
The following user says Thank You to Abde for this post:
 
(login for full post details)
  #47 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

Hello Adamus

I read with great interest your thread. May I ask what happened? Have you given up?

I too am trying to program Price Action, using Amibroker though. I try to include the YTC ideas in my programs.

Actually right now I am trying to code Support/Resistance and I am looking for an objective way to invalidate S/R lines when they are broken. Your thoughts and questions are exactly what spins in my mind as I am trying to code this project.

Reply With Quote
 
(login for full post details)
  #48 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Hi,
it's been a while since I posted, but I am still very interested in the idea and I'm still developing the indicator with an aim to linking it in to a NT7 strategy so I can do some testing on it.

I invalidate my S/R lines when they are broken by a push which then creates a new S/R level near-by.

Also by a clean break where the market didn't halt at all as a big trend cut through the S/R - i.e. no more than two bars touching the line.

I have to look at my code again! There might be more rules.

What are you using?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #49 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

Hello

I am using Amibroker.


Adamus View Post
I invalidate my S/R lines when they are broken by a push which then creates a new S/R level near-by.

I agree with this. Anyway, there is no point having too many lines that are close together. So I try consolidate lines (areas) that are closer than 10 pips on a 5min trading timeframe.


Adamus View Post
Also by a clean break where the market didn't halt at all as a big trend cut through the S/R - i.e. no more than two bars touching the line.

I dissagree with this one. What is your criteria for reversing a support into a resistence line? See Lance's example, vol2 page 62, fig 3.5 where at point A support is broken with a single candle and it turns into a resistance. It is also interesting to watch this video. The guy says that a strong S/R is always penetrated by strong candles: How to Draw Support and Resistance Properly - YouTube .

Here are some of my design notes on the subject:
// Start from Higher timeframe.
// record the reaction after the swings. more points to bigger reactions.
// Also, a second visit to a S/R should attract prices (vacuum effect), gets more points.
// Keep the 2 outer lines.
// Combine the lines that are close together (and give them more points)
// Prefer to keep lines that are further appart from the rest.
// prefer the lower SLs and the upper SHs.
// HighTimeFrame should not have lines closer than 20 pips.
// Keep 3 or 4 lines, by eliminating the lines with less points.
// Round number price levels (e.g. 1.2850, 1.2900 AND 1.3000 for EUR/USD) also tend to act as support AND resistance.
// The more zeroes a price level ends in, the stronger it can support OR resist the prices.

I asked Lance but the invalidation but he has not replied yet on this question.

Reply With Quote
 
(login for full post details)
  #50 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

Argh, you totally got me there. That is exactly what I say would invalidate my levels, but in this case I would not invalidate it, i.e. you've pointed out some more work I have to do. What I mean here is that actually that bar that breaks out thro the level is still a part of the setup, and the bars that I feel invalidate a level, well, they come back to the level after being elsewhere and go right through it. They don't set up a setup, they don't respect the level at all, they just come quickly from some other price and go straight thro. Does that make sense?

Re your comments. Interesting. Thinking of using a points system myself. A bit like that Trading Academy supply / demand system. I always got an answer from Lance, I think he's fantastic. I'll have to check my emails, since I asked him once about that too.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #51 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received


Adamus View Post
What I mean here is that actually that bar that breaks out thro the level is still a part of the setup, and the bars that I feel invalidate a level, well, they come back to the level after being elsewhere and go right through it. They don't set up a setup, they don't respect the level at all, they just come quickly from some other price and go straight thro. Does that make sense?

No, I am lost.

Have you seen the video I mentioned?

Reply With Quote
 
(login for full post details)
  #52 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

OK, well without actually digging out the chart, what I mean is that in your example, the market was in the setup, hovering around the S/R level, and then it broke and trended away. For me, that doesn't invalidate the S/R level.

To invalidate it, the market just ignores it. It doesn't come to the S/R level and pussy foot around creating a lot of consolidation at the level, just above or even touching or pushing slightly through, it just trends straight through.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #53 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

ok, I agree with your description.

Have you managed to code it? Have you defined a set of logical rules for this?

Reply With Quote
 
(login for full post details)
  #54 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

That is what I am working on now. It's difficult and it's made worse by only having short periods to spend on it so I can't really get deep into it for very long. One of the problems is having to work 9 to 5 at the moment and try to make sure I find time to commit time to all the stuff I want to do. That would be one of the reasons I didn't watch that video you linked to - it's 75 mins long with no executive summary

One of the first things that I'm tackling at the moment in terms of S/R and market behaviour in the setups zones that I can see (but not yet define) is trying to define an existing trend. I'm experimenting with HH/HLs and LL/LHs, and just being above an MA or below an MA, and also range definition.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #55 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

I think it will be enough enough if you go somewhere at the beginning of the video (say 10min) and watch just 5 min of it. You will the the main idea that valid S/R are penetrated only by BIG CANDLES, which means great force needed to overcome it.

I'd say don't mix too many problems at once. ASSUME you have a trend or range (through a parameter) and work on the other (S/R) problem.

Reply With Quote
 
(login for full post details)
  #56 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

I think the prevailing higher time-frame trend or range is the primary factor to consider. It's true that the market sometimes breaks the other way, but I prefer to start but filtering the 'other way' out first because that's the way I look at the setups.

Lance stresses the higher time-frame trend heavily - it's not just a whim.

It's all going to be difficult and challenging to automate at the end of the day. Starting off with the higher time-frame trend I think is easier. Anyway I've got a lot of data to test it on.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #57 (permalink)
desert CA
 
Experience: Intermediate
Platform: NT7, SC, ToS
Broker: AMP, DT, TDA
Trading: CL,NQ,YM
 
Posts: 2,134 since Jul 2011
Thanks: 2,387 given, 1,723 received


Adamus View Post
That is what I am working on now. It's difficult and it's made worse by only having short periods to spend on it so I can't really get deep into it for very long. One of the problems is having to work 9 to 5 at the moment and try to make sure I find time to commit time to all the stuff I want to do. That would be one of the reasons I didn't watch that video you linked to - it's 75 mins long with no executive summary

One of the first things that I'm tackling at the moment in terms of S/R and market behaviour in the setups zones that I can see (but not yet define) is trying to define an existing trend. I'm experimenting with HH/HLs and LL/LHs, and just being above an MA or below an MA, and also range definition.

Hi Adamus, welcome back! nice to hear about more on the S/R indicator. some thoughts about it. I've seen some s/r indicators where there are lines of thoughts about when the S/R line would be invalidated (no longer drawn) like you mentioned. Some think if it interacts with it the first time, that's enough to invalidate , but of course others want more interaction. But most seem to agree a straight break through with no slowing down would definitely invalidate.

As for a "trend detector" there's that old "ADX" indicator where supposedly the DX and DY value is crossed over and the average is above a certain level (30?) then it's supposed to be in a new trend although it would seem to still be a lagging indicator. (aren't they all?)

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #58 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

While I'd like to see a set of logical/mathematical rules as to what invalidates a S/R level, I want to ask if this methodology also accounts for Support turning into Resistance after it is penentrated.

See these examples: Support And Resistance Reversals

Reply With Quote
 
(login for full post details)
  #59 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

The way I think about it mostly without any code to back it up or backtests etc, is that every possible S/R line out there is valid, and even reversed after getting broken.

There are so many different potential S/R lines you can look at. Swing points, pivot points, previous day's H or L, trend lines, Fib retracements, volume / market profile levels etc. They are all self-fulfilling prophecies - or not!

My aim is to take the easiest ones (previous swing points) and wait until the market sets up at the level. Then, depending on other price action as yet unprogrammed for my planned NT7 strategy, I'll take the trade at the level based on a trigger also as yet unprogrammed. Could be just a straight break-out from the setup zone, as opposed to a break-out of the level.

I'm looking for Lance Beggs's break-out or break-out failure price action. In code. Eventually - but first the higher time-frame trend.

@Cloudy - if I was going to use a pre-rolled indicator, I'd probably start by looking at ADX, but not on its own. But I have to define ranges better too, I can't just rely on there not being a trend, at this point in my thinking.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to Adamus for this post:
 
(login for full post details)
  #60 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

Lance replied to me and gave me this link, which is a related post he had written:
S/R Levels ? When Do They Become Invalid?

Reply With Quote
The following user says Thank You to bgeorge for this post:
 
(login for full post details)
  #61 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

It's impossible to code for subjectivity, but he does give some clues about the factors involved, mostly time - if it's been long enough since the break, it can be discarded. That's easy enough to turn into a rule - invalidate an S/R level n bars after it breaks. At any point before n bars, consider it a reversed level.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #62 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

Yes, time is a good point I was missing.

In his article S/R Levels ? When Do They Become Invalid? he states:

“If I was trading this, I’d leave 1.5510 as potential resistance, but remove 1.5495 as no longer valid.

Why?
Because price showed a stall at the 1.5510 level before crashing lower. People bought here. Some will have lost money; others will still be holding on in desperate hope of a breakeven exit. The level is recent and is a source of emotional pain. It stays on my chart.
1.4595 provided almost no support as price slid straight through. There was likely to have been little buying here, and therefore a lot less emotional pain. This one’s gone!”

Just before 1.5510 broke, we had several bars that respected the support. THIS is what makes the brake not to invalidate the support. Just before the 1.5495 broke, there are no bars “supported” or “rested” on the line. This is the reason to invalidate it.

If something sounds too subjective, unless it comes from supernatural, to me it means we do not have a clear understanding of the rules. Acting from “experience” means that the mind is following subconcious rules, rules that we are not aware and therefore cannot describe clearly.

Reply With Quote
 
(login for full post details)
  #63 (permalink)
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 471 given, 786 received

You are dead right. You just started a good description of the price action that makes the setup to get involved in, and the setup or better said the S/R to ignore. This PA needs to be fleshed out a lot more.

You are right also about subjectivity.

Sorry, mid-week I have no time to myself.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #64 (permalink)
Thessaloniki
 
 
Posts: 29 since Jun 2010
Thanks: 4 given, 8 received

I have made a related question here:

I made a separate post, since it is not strictly to Ninja programming. Rather I am looking to use indicators to evaluate the strength of an S/R line.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Support and resistance indicator


Last Updated on May 3, 2015


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts