Read the height
The bar height is the difference between 2 locations within ranges. The ±1 dotted lines are reference lines, not upper or lower limits of the value.
Fits the same average price into 2 ranges of average highs and average lows with different lengths, and shows the difference between the locations as bars. The bar height is the difference in location, and the color is the increase or decrease of the value from 1 bar before.
Height is the difference in locationThe Fast-side location is subtracted from the Slow-side location. Values also go outside ±1.
Color compares with the previous barGreen if it increases, red if it decreases. If it is the same, the previous color is kept.
Carried over at width 0If either range has a width of 0, the previous valid value and color are kept.
Compares the default settings and a settings change example on a screen with only this product applied.
Published example: M1. This is an example to explain the display. The example with changed settings is not a set of recommended values. Details can be checked in the actual-size view. Also check the vertical axis and units of the separate window. Except for products with a fixed scale, the scale changes with the settings and the displayed range.
The bar height is the difference between 2 locations within ranges. The ±1 dotted lines are reference lines, not upper or lower limits of the value.
Green means the value increased from the previous bar, and red means it decreased. A positive value can be red and a negative value can be green.
The parentheses in the window name show Fast Period, then Slow Period. The default is (5, 34).
Measures the averaged center price with 2 average ranges and displays Slow-side location − Fast-side location.
For each bar, (close × 5 + open × 2 + high + low) ÷ 9 is calculated. Its simple average over Fast Period bars is used as the common average price M.
One range is built from the simple averages of the highs and lows over Fast Period bars, and the other from their simple averages over Slow Period bars. They are not the highest high and lowest low within the period.
Each location is (M − average low) ÷ (average high − average low). The value obtained by subtracting the Fast-side location from the Slow-side location is used as the bar height.
The common M can go outside the Slow-side average high and average low. The difference in location is not limited to ±1. Even if M is outside, the difference does not necessarily exceed ±1.
With Fast Period = 5 and Slow Period = 34, check the bars in the separate window.
Look at the height relative to 0 and the +1 and −1 dotted lines. The vertical axis changes with the displayed range.
Green and red are the increase or decrease from the previous bar. If the value is the same, the color is carried over, and the first valid bar is green.
Check how the 2 periods, and the Fast-side period that builds the average price, are involved in the calculation.
| Included file | Purpose / location |
|---|---|
| TRI_Channel_Location_Gap.ex5 | The MT5 main file. Place it in MQL5/Indicators. |
The ZIP contains only 1 item, the main file. The manual is opened from the product page on the site. Source code is not included. MT5 only; registration, account authentication and placing a license file are not required. Use it without changing the file name.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.
First check with the default values. Changes and removal are done from the chart's 'Indicators List'.
Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.
There are 2 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpFastPeriodInpSlowPeriodNormally, the first calculated position is reached once the number of bars of the larger of the 2 periods is available. The default is bar 34 from the start. However, if either width is 0, bars are blank until a valid value can first be calculated.
If the width of the average range on the Fast side or the Slow side is 0, the previous valid value and color are kept. The first section, where there is no value to carry over, is blank. This is not a rule that outputs a new 0.
The color of the first valid value is green. After that, if a value equals the previous value, the previous color is kept. The first green does not mean that an increase was observed.
If Fast Period = Slow Period, the difference is 0 wherever the width is positive and the location can be calculated. Fast Period > Slow Period is also possible, but swapping the periods changes M itself, so the result is not simply the value with its sign reversed.
On the forming bar, updates to the high, low and close change the bar height and color. There is no function that outputs marks or notifications.
The window name shows the 2 periods, and values have 3 decimal places. Even a very small difference from rounding in the average calculation can change the color. Do not read the color near 0.000 alone as a large change.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Check the required history and whether either width has become 0. If the periods are the same, the calculated value is 0 and the bar has no height. A blank and a valid 0 are different. Do not distinguish them by 0.000 in the header alone.
±1 is not an upper or lower limit. When the average price M is outside the Slow-side range, a large difference may appear. Also check the scale of the vertical axis.
The color does not represent the sign. It shows whether the value increased or decreased from the previous value. With the same value, the color is kept.
By specification, the previous value is kept when the width of a range is 0. Check the state of the price feed and whether the average range has width, separately.
Outside the allowed range, the indicator refuses to start and writes "Channel Location Gap: Fast Period must be 2 to 500." or "Channel Location Gap: Slow Period must be 2 to 1000." to the Experts log. Set the value back within the range.
If the first display does not appear, check history loading and the input ranges. If an earlier display has stopped updating, first check the price feed and the terminal's connection status.
N = (close × 5 + open × 2 + high + low) ÷ 9, and M = the Fast Period simple average of N. For each of the Fast side and the Slow side, the simple averages of the highs and lows are calculated and the location is obtained. Value = Slow-side location − Fast-side location. Future bars are not used.
In the formula, if M is within the Slow-side range, the difference stays within −1 to +1. If the difference goes beyond this range, M is outside the Slow-side range. However, even if M is outside the range, the difference may stay within −1 to +1. The reverse inference cannot be made.
When the width is positive, the value is calculated from the current 2 averaging periods. In sections where the width is 0, on the other hand, the value and color carry over the previous state. If there is no valid value at the start of the history, or if equal values or a width of 0 continue, distinguish the initial blanks and the carried-over colors.
This product calculates from the chart's price data and draws 2-color bars in a separate window. It has no marks, notifications or order handling.