SDX-TzPivots uses a non-standard formula to get the S&R pivots and has some other coding that produces erroneous results. I have worked on it. The following you will also see in the indicator coding when viewed with the MetaEditor:

SDX-TzPivots_v2:

This is a "cut and dice" upgrade....had to rip the guts out, clean house, and put

back just the essentials....making sure ALL that was put back ACTUALLY WORKED!

Some improvements were incorporated, too. Shimodax made the start of a neat Indicator

to draw not only basic pivots, but also SweetSpots (for which another indicator,

SDX-SweetSpots, is available), more fibo lines of a different type of calculation,

and Camarilla lines. But some of the "technical operations in the background" are

not functioning. For example, the BarForLabels function does not work. Some of the

formulations produce incorrect results. For example, the ShowHighLowOpen showed

Yesterdays High for the user's selected session, but showed Yesterdays Low for the

MT4 server timezone session! In addition, non-standard formulas are used to calculate

the basic pivot Support and Resistance lines.

Going far enough to uncover these problems, I decided to strip it down to just the

basic pivots, code in the standard formulas for the pivots, put all the support

operations in order, and add some enhancements. Here are the indicator

window inputs and some comments........

HoursMT4TimeZoneFromGMT:

Enter the number of hours difference between the MT4 server time zone, and GMT.

For example, FXDD uses a server that is two hours before GMT, hence enter "2".

If the server is in NY, 5 hours after GMT, you would enter "-5". Use the default

value "0" for normal, non-time shifted pivot calculations.

HoursSelectedTimeZonefromGMT:

Enter the number of hours difference between your selected time zone to start

the day (as regards the indicator's calculations), and GMT. For example, if

you wish to have the day start at NY time, then enter "-5". If you wish to

have the day start at Zurich time, then enter "1". Use the default value of

"0" for normal, non-time shifted pivot calculations.

Resistance/Central/Support Pivots:

Enter the colors of your choice. This is an enhancement.

LineStyle_01234:

Your number entry selects the line style for the lines. 0=solid, 1=dash,

2=dashdot, and 3=dashdotdot.

SolidLineThickness:

Your number entry selects the width of solid lines. 0 and 1 = single width.

2, 3, 4 graduate the thickness. Enhanced coding assures that no matter what

number this is set at, non-solid line styles selected will still display.

NewPeriodSeparatorsColor:

Enter the color of your choice. This is an enhancement.

ShowNewPeriodSeparators:

The choice of "true" will place a pair of vertical lines on the chart showing the

start and stop of the new 24 hour period you have selected for pivot calculations.

Choosing "false" turns the pair off. This is an enhancement.

SeparatorLineStyle_01234

Enhanced coding allows you to select any line style for this pair of lines.

LineLabelColor:

Enter the color of your choice. This is an enhancement.

LineLabelFontSize:

Change the font size of the labels. This is an enhancement.

LineLabelsIncludePrice:

Lines are always labeled R#, PV, or S#, but selecting "true" will add the

price. Even if the price is not displayed, it always appears in the right margin

of the chart.....another enhancement.

MoveLabels_LR_IncrDecr:

Increasing the number moves the line labels to the left on the chart.

Decreasing the number moves the line labels to the right on the chart.

This feature is inoperative in the first indicator.

ShowComment:

If "true" then key prior day and current day data appears in upper left of chart.

The original indicator does not extend lines completely across the screen, and for some

of them this is a good feature. But the basic pivot lines are more useful if they are

extended across the entire screen, which is the way they are coded now, in this

version, SDX-TzPivots_v2.

Edit: Attached is a screenshot

SDX-TzPivots_v2:

This is a "cut and dice" upgrade....had to rip the guts out, clean house, and put

back just the essentials....making sure ALL that was put back ACTUALLY WORKED!

Some improvements were incorporated, too. Shimodax made the start of a neat Indicator

to draw not only basic pivots, but also SweetSpots (for which another indicator,

SDX-SweetSpots, is available), more fibo lines of a different type of calculation,

and Camarilla lines. But some of the "technical operations in the background" are

not functioning. For example, the BarForLabels function does not work. Some of the

formulations produce incorrect results. For example, the ShowHighLowOpen showed

Yesterdays High for the user's selected session, but showed Yesterdays Low for the

MT4 server timezone session! In addition, non-standard formulas are used to calculate

the basic pivot Support and Resistance lines.

Going far enough to uncover these problems, I decided to strip it down to just the

basic pivots, code in the standard formulas for the pivots, put all the support

operations in order, and add some enhancements. Here are the indicator

window inputs and some comments........

HoursMT4TimeZoneFromGMT:

Enter the number of hours difference between the MT4 server time zone, and GMT.

For example, FXDD uses a server that is two hours before GMT, hence enter "2".

If the server is in NY, 5 hours after GMT, you would enter "-5". Use the default

value "0" for normal, non-time shifted pivot calculations.

HoursSelectedTimeZonefromGMT:

Enter the number of hours difference between your selected time zone to start

the day (as regards the indicator's calculations), and GMT. For example, if

you wish to have the day start at NY time, then enter "-5". If you wish to

have the day start at Zurich time, then enter "1". Use the default value of

"0" for normal, non-time shifted pivot calculations.

Resistance/Central/Support Pivots:

Enter the colors of your choice. This is an enhancement.

LineStyle_01234:

Your number entry selects the line style for the lines. 0=solid, 1=dash,

2=dashdot, and 3=dashdotdot.

SolidLineThickness:

Your number entry selects the width of solid lines. 0 and 1 = single width.

2, 3, 4 graduate the thickness. Enhanced coding assures that no matter what

number this is set at, non-solid line styles selected will still display.

NewPeriodSeparatorsColor:

Enter the color of your choice. This is an enhancement.

ShowNewPeriodSeparators:

The choice of "true" will place a pair of vertical lines on the chart showing the

start and stop of the new 24 hour period you have selected for pivot calculations.

Choosing "false" turns the pair off. This is an enhancement.

SeparatorLineStyle_01234

Enhanced coding allows you to select any line style for this pair of lines.

LineLabelColor:

Enter the color of your choice. This is an enhancement.

LineLabelFontSize:

Change the font size of the labels. This is an enhancement.

LineLabelsIncludePrice:

Lines are always labeled R#, PV, or S#, but selecting "true" will add the

price. Even if the price is not displayed, it always appears in the right margin

of the chart.....another enhancement.

MoveLabels_LR_IncrDecr:

Increasing the number moves the line labels to the left on the chart.

Decreasing the number moves the line labels to the right on the chart.

This feature is inoperative in the first indicator.

ShowComment:

If "true" then key prior day and current day data appears in upper left of chart.

The original indicator does not extend lines completely across the screen, and for some

of them this is a good feature. But the basic pivot lines are more useful if they are

extended across the entire screen, which is the way they are coded now, in this

version, SDX-TzPivots_v2.

Edit: Attached is a screenshot

Attached File

SDX-TzPivots_v2.mq4 20 KB | 172 downloads