Pivot Point Indicator

foreigner

Est. 12480 Hours and Counting
After searching for a Pivot Point Indicator for what seems like an eternity, none of the twenty or more indicators that Ive found does what a pivot indicator should (in my opinion).

Looking for a pivot point indicator with the following features;

Daily/Weekly/Monthly Capability

Show Lines for Current Week/Month Only

Ability to Exclude Pivots

Pivot Start Stop Times

Change Line Style/Colours


Could an Fx Gears member finally put this one to bed once and or all?!

Much Appreciated.
F
 
I'm sure I could pull something together from my pile of goodies foreigner. Give me a couple of days though because I'm pretty busy with family activities at present. I'll put together what I think you want and we can see if it fits the bill.

Relax and enjoy your weekend, help is on the way. ;)
 
foreigner said:
Looking for a pivot point indicator with the following features;

Daily/Weekly/Monthly Capability
Yes
Show Lines for Current Week/Month Only
Yes, and current day only for Daily
Ability to Exclude Pivots
Yes, you can independently switch on or off the following sets of pivots:
  • Daily
  • Daily Mid
  • Weekly
  • Weekly Mid
  • Monthly
  • Monthly Mid
Pivot Start Stop Times
Yes, all pivots start and stop at specific times. They don't run right across the chart from edge to edge. (I trust that's what you meant.)
Change Line Style/Colours
Yes, all sets of pivots listed above can be independently styled by the user. You can also switch off the labels.

The method used is the one for standard floor pivots. That is, the pivot is calculated as the (high plus low plus close) divided by 3.

I have placed the labels near enough to be useful but off to the right of price action so they don't get in the way of reading what's important. You can adjust this. Note that this requires the Chart Shift option to be selected in your Chart Settings. If it isn't set the indicator will attempt to set it automatically. Most people use Chart Shift anyway, I think. I also included the price with each label. You can set the label font and font size.

The source code is not for release so if you think the indicator is useful I am happy to compile a version with your chosen default settings. At present everything is "On" and that makes for a very busy looking chart. Just let me know.

I have set the Daily lines and labels to gracefully vanish when the chart period is greater than H1. If you want them to be visible on H4 charts let me know.

This is the best I can do in the time available foreigner. Careful how you handle it, the ink is still wet. :)) I hope it meets your needs.
 

Attachments

  • AusDoc-PivotPointsDWM-v1.ex4
    56.5 KB · Views: 463
Many Thanks AusDoc thats pretty much exactly what Im looking for!

Couple of questions;

is it possible to turn lines on and off using hotkeys or through scripts?

is it possible to select different time frames for specific pivots or do I need to run multiple instances?

Finally, I cant seem to turn off the monthly mid pivot?

I do appreciate your time.

F
 
foreigner said:
Many Thanks AusDoc thats pretty much exactly what Im looking for!

You're welcome.

is it possible to turn lines on and off using hotkeys or through scripts?
Maybe, but I don't know anything about that. MQL and MT4 are not my favourite development environments so I haven't explored anything quite that exotic.

is it possible to select different time frames for specific pivots or do I need to run multiple instances?
I don't really understand the question; isn't that exactly what this tool provides? For example, you might only want to use mid pivots at the monthly time frame and standard pivots at weekly and none at daily. These are all simple settings. That would be different time frames for specific pivots. Maybe you could explain what you mean with an example.

I can't seem to turn off the monthly mid pivot.
There is a switch to turn on/off the monthly mid pivot and one for the monthly mid pivot labels too. Both work. Try again and look carefully -- there are so many lines it it could easily be confusing. Note that all of the labels for monthly related lines begin with M_.

In the light of a new day I have just noticed a bug. I know what the problem is but don't have time to do anything about it. Each new day the lines may slope. The fix for now is just a simple refresh, either by switching time frame on the chart or opening and closing the indicator. Takes just a second or two but is a pain. I'll have to look into it when I can. Maybe this will be number 21 on your reject pile. ;)
 
AusDoc if I can turn off the mid levels and select on which time frame the levels appear that would be ideal.

In other words if it worked properly I would actually use it! ;)
 
foreigner said:
AusDoc if I can turn off the mid levels and select on which time frame the levels appear that would be ideal.

You already can. As I explained above, there are settings to control the mid levels and they do work. Maybe they're hard to find because there are so many user settings. See images below.

3UxKI3c.jpg

dJ87dAT.jpg


You can make whatever settings you like and then apply them to just the time frames you chose using the in-built MT4 controls.

j6Bgt00.jpg


It is far simpler to add another instance of the indicator with different time frame settings, if needed, than to add a lot more code and even more user settings.

So it does everything you asked for already and is actually quite usable. As for the bug I mentioned, I will get around to looking at that when I can but I see no urgency.
 
Here is a version with added time frame control. You can now set the periods for display as follows:

  • Set the: DailyThisTimeframeAndBelow
  • Set the: DailyMidThisTimeframeAndBelow
  • Set the: WeeklyThisTimeframeAndAbove
  • Set the: WeeklyMidThisTimeframeAndAbove
  • Set the: MonthlyThisTimeframeAndAbove
  • Set the: MonthlyMidThisTimeframeAndAbove

Note the differences between Below and Above in these settings. That should hopefully provide sufficient granularity to switch on or off the various pivots for suitable time periods.

You need to enter your chosen time frames like this:

43200 for MN1
10080 for W1
1440 for D1
240 for H4
60 for H1
30 for M30
15 for M15
5 for M5
1 for M1

That's 6 more settings. I hope you can find them. :D

Version 2
 

Attachments

  • AusDoc-PivotPointsDWM-v2.ex4
    58 KB · Views: 238
Thanks AusDoc all working fine except pivots themselves are in the wrong place... ??? que another one bites the dust?
 
foreigner said:
que another one bites the dust?

LOL.... maybe... it's your reject pile ;)

foreigner said:
Thanks AusDoc all working fine except pivots themselves are in the wrong place... ???

All working fine... except! ... that's a big exception. :eek:

In the wrong place hey? That's interesting. There is no wrong place for pivots actually, but that's a whole tutorial. Anyway, how about you explain where you think the right place is and show the difference so I'll have an idea of what you think the problem is. Then I may be able to put the pivots where you would like them to be or perhaps explain why they are perfectly fine where they are.

There are various ways of calculating or simply reading historical data such as a prior period's open or close etcetera, even ignoring the thorny issue of which timezone to use as a reference point. If the differences you are talking about are just a pip or two (or thereabouts) then I would have an idea of the issue. Assuming identical data sources, that would be a read versus calculated prior period I expect. In that case, neither one is really more correct or incorrect, they are just slightly different. If you think that makes a scrap of difference to trading then you need to work on how to use tools for trading (no offense foreigner, most people don't really use tools very well, certainly not automated horizontal line tools).

Of course you should know that there are a few different ways of calculating floor trader pivots, which is what these are (most people just call then Pivots, knowing little about their origins, uses or varied calculation methods).

These are standard floor trader pivots. The levels are calculated as follows:

First we access the daily data that MT4 is reading, as supplied by the broker.
ArrayCopyRates(D_rates_d1,Symbol(),1440);
From this array we can extract the prior day's high, low, open and close and bind them to variables we can use in the following formulae to calculate the levels.

// Central Pivot Level
D_P = (D_yesterday_high + D_yesterday_low + D_yesterday_close) / 3;
// Main Support & Resistance Levels
D_R3 = (2*D_P) + (D_yesterday_high - (2*D_yesterday_low));
D_R2 = D_P + (D_yesterday_high - D_yesterday_low);
D_R1 = (2*D_P) - D_yesterday_low;
D_S1 = (2*D_P) - D_yesterday_high;
D_S2 = D_P - (D_yesterday_high - D_yesterday_low);
D_S3 = (2*D_P) - ((2*D_yesterday_high) - D_yesterday_low);
// Mid Support & Resistance Levels
D_MR3 = (D_R2 + D_R3) / 2;
D_MR2 = (D_R1 + D_R2) / 2;
D_MR1 = (D_P + D_R1) / 2;
D_MS1 = (D_P + D_S1) / 2;
D_MS2 = (D_S1 + D_S2) / 2;
D_MS3 = (D_S2 + D_S3) / 2;

This is repeated for weekly and monthly periods. All very straight forward. All correct formulae. All correctly coded. ...but, of course, somehow in the wrong place. ;)

An alternative central pivot calculation method adds the prior open and then divides by 4. Naturally this changes every pivot level. Another variation uses Fibonacci numbers. Different strokes for different folks. It doesn't really matter much though, because as I said, most people don't really know how to use them.

Anyway, please let me know what the wrong place means and I'll see what I can do for you.
 
lol nicely put!

The reason I say "in the wrong place" is because I also have a pivot indicator used by the much acclaimed ICT and the lines are at totally different levels to the arguably superior AusDoc v2 indi. ;)

For example the monthly mid pivot level is at 1.6773 on the AusDoc indi and 1.6800 on the ICT monthly pivot indi.

Ive been using the ICT indi for my trading plan so it would be useful if your arguably superior pivot indi was calculated in the same way..

Not to worry if its too much hassle, I have Queen on standby..

Heres the ICT monthly indi incase you wanted to have a gander;
 

Attachments

  • ICT Monthly Pivots.ex4
    5.5 KB · Views: 177
Ah, thanks for that. What you call a monthly mid pivot is actually the monthly pivot. Some would argue that it's more correctly called the monthly central pivot but to my feeble mind adding central is bordering on tautology. Mid pivots are something else, they exist between pivots and S&R levels.

Anyway, it's the numbers that count here. Your two pivots at 1.6773 and 1.6800 are far enough apart to be coming from different data as opposed to different calculation methods. I know you have the same data of course, what I mean is that the indicator is possibly reading different data into the monthly (in this case) period. Perhaps ICT's version determines start and end of periods in a non-standard way or - gasp! - it may even contain an error.

On the other hand, they are also close enough for the difference to be related to calculation method. Maybe whoever wrote ICT's version just likes rounding :)) Jokes aside, at the end of the day I can only say that mine uses standard techniques of programming and calculation methods and has no errors in deriving or accurately displaying the levels. The other version is just different. Neither can claim superiority. You can determine superiority based on what works for you. ;)

As an exercise to show how little this matters I placed ICT's version (which I already had) on my chart and the monthly pivot is at 1.6798. (I assume we are both talking about GBPUSD.) This is reassuringly close to your 1.6800 but not the same. The indicator I built for you comes in at 1.6774 and a quick look under the hood revealed that this is rounded from 1.67737 so there may be little more than a whisker between our data sets. A classic case of "the same but different" at every turn.

I then changed the calculation method from standard to alternate (adds the open value to the pivot calculation and divides by 4) and dropped it onto the same chart to get a comparison. The differences are significant. A lot of traders use the alternate version in preference to the standard, for various reasons. Take a look at the differences.

UsQXSYv.jpg


Note that in the alternate version the weekly mid support level 1 is 1.6800 so those guys are happy, right? :))

Ultimately it matters little or not at all. You can use any method or approach and achieve the same outcome. It comes down to how you use whatever you choose.
 
Theres another advantage to using your version, at least it doesnt make the chart look like a London Underground map..

tubemap-2012-12.png
 
I guess it helps that you can just eliminate lines with a mouse click or two. Can't quite do that with the Underground.

I spent a couple of weeks in London in April last year and used that map. London grew on me over the stay but was a shock to the system at first, having arrived following two weeks in Paris. I really loved Paris, it's an amazing city. Despite what I had heard I found the city to be very clean and the people warm and friendly. By contrast London was filthy and the people were mostly cool and aloof. I did end up bonding with London - who can't love the West End theatres and the depth of culture in galleries and museums galore. But in the UK I much preferred Oxford and Edinburgh when it came to cities and English village pubs are great.

I certainly know why England has adopted "Keep calm and carry on" as the national motto. People there are so incredibly uptight - they can do with constant invocations to keep calm. As for carrying on, well, most of us don't need much encouragement to do that ;D
 
foreigner said:
Theres another advantage to using your version, at least it doesnt make the chart look like a London Underground map..

tubemap-2012-12.png

I hail from two places...

UEtze3W.jpg


skytrain_map.png


Sadly with both of these simplistic ones I still arrive late for work and for trades :p
 
The Pivots levels match what I currently use, FXI Pivots. Good!

A feature of FXI Pivots is the ability to add multiple Day Pivots. refer attached

Would you consider adding that feature?
 

Attachments

  • FXI Pivots.png
    FXI Pivots.png
    71.1 KB · Views: 368
@Tansen

Love that second map, had a good chuckle. Thanks :))

@rod178

Wow, that chart is a shocker. :eek: It looks at first like a plate of spaghetti but on closer inspection is more like alphabet soup. When putting foreigner's version together I had in mind developing something even better. I'll go ahead with that now as I'm sure it will be an improvement on what you're currently using. It will have the option of displaying multiple days, among other things, so hopefully it will prove useful.

Have a great weekend folks!
 
AusDoc said:
@rod178

Wow, that chart is a shocker. :eek: It looks at first like a plate of spaghetti but on closer inspection is more like alphabet soup. When putting foreigner's version together I had in mind developing something even better. I'll go ahead with that now as I'm sure it will be an improvement on what you're currently using. It will have the option of displaying multiple days, among other things, so hopefully it will prove useful.

Have a great weekend folks!

It's H1 over several days. Actually the chart would look no different using your indicator, if used on a single day.
 
rod178 said:
Actually the chart would look no different using your indicator, if used on a single day.

Oh sure, in so far as it's just a bunch of horizontal lines. You'd have to be careful to keep those vertical components off screen though, and then there's label placement. Hmmm... no, I think it would still look a bit different. But I get your point. :)
 
Pivot Point Indicator - New Tool

@rod178

This tool provides what you asked for. Hopefully it will prove useful.

@all

This is a completely new tool, rewritten from the ground up. It is stage 1 of a project I'm working on so it will be developed further when I get back to it. At this stage it is perfectly useful already though.

I recommend that users choose the lines they actually want or need, style those in a way that is meaningful and memorable and then dispense with the labels completely. Labels can be handy at first but become little more than clutter. However, if using the labels, note that they can be offset by period (D/W/M) if you their overlapping bothers you.

The pivots are standard floor trader pivots based on your broker's server's "day". Do take a look at the prior period's highs and lows. Remember, these are proven support and resistance levels of some significance when compared to pivots, which are little more than novelties really.

Here it is:
 

Attachments

  • AusDoc-PivotsPlus-v1.ex4
    83.6 KB · Views: 252
Back
Top