TradeXray TripleMA

TradeXray TripleMA

What it does. It draws three simple moving averages, marks the places where two of them cross, and prints a few measurements of the current geometry on a small panel. Every mark and every number is taken from bars that have already closed.

What it does not do. It does not tell you when to buy or when to sell. It does not claim that these lines, these crosses or these numbers have any statistical edge. We have not measured one, so we do not say that one exists.

What has been checked. The confirmed-bar behaviour is not just a sentence in this description. It is checked by an automated verification harness, and the harness reports zero mismatches. The central check is that placing the as-of axis at a past time T produces exactly the same picture as physically cutting the data at T.

What is here besides three lines

Three moving averages are not hard to draw, and nobody should pretend otherwise. So it is worth saying plainly what else is in this tool, and letting you decide whether any of it is worth having.

It refuses to draw a mark on a bar that has not closed, and it tells you what that refusal cost. Each cross mark carries the number of closed bars it waited before appearing, right in the mark: GC/1, DC/2. The lag is not hidden in a setting, it is printed on the chart. There is no code path that can put a mark inside a forming bar, so a mark that later disappears is not a rare event here, it is a thing that cannot happen.

It lets you put the chart back to an earlier moment and look at what it could have drawn then. A vertical axis drags into the past; the averages stop at it, marks to the right of it are not drawn, and the numbers on the panel become that bar's numbers. Reading the tool is one thing; being able to check that the tool was not cheating is another, and this is the part that lets you do the second.

It measures in ATR rather than in degrees or in dollars. An angle in degrees depends on your window height and your zoom, so two people never read the same number. A distance in dollars means one thing at 1,800 and another at 3,000. Slope and the gaps to the lines are given as multiples of the average range, over a fixed window, so the same chart gives the same number on your terminal and on someone else's.

And it gets out of the way. The marks, the axis and the readings each switch off on their own. Switch off all three and what remains is three moving averages, nothing more.

We have not surveyed what other tools do. This is a description of this one, not a comparison, and we are not in a position to tell you that these things are rare. What we can tell you is what each one does, why it is defined the way it is, and that a machine checks it.

Why this description has no numbers in it

This description contains no win rate, no profit figures and no backtest results. That is not a formality. We have not tested whether these three averages, or the crosses between them, have any predictive value, so there is nothing to report. What is offered here is a set of drawing and measurement rules that are written down in full, and a machine check that the tool follows them.

None of the above is a claim that any of it makes money. It is a claim about what the tool will and will not put on your screen.

The three lines

Three simple moving averages, and the slower one is always the thicker one:

- Long, drawn behind everything else, five pixels wide. Reference only.
- Mid, drawn in the middle, three pixels wide. This is the primary line: the crosses, the slope and the gaps are all read against it.
- Short, drawn in front, one pixel wide.

Thickness carries one meaning and only one: how slow the average is. Nothing else in this indicator uses thickness, so you never have to remember what a width means.

By default the three periods follow the chart timeframe, and the table is fixed:

M1 20 / 100 / 300 M5 20 / 60 / 240 M15 20 / 80 / 320 M30 20 / 40 / 160 H1 20 / 80 / 480 H4 20 / 120 / 600 D1 20 / 100 / 400 W1 20 / 80 / 400

Any other timeframe uses 20 / 80 / 480. Turn the automatic mode off and the three periods come from inputs instead. The method is a simple moving average and the applied price is the close by default; both are inputs, and there is a note further down about what changes if you move away from the simple average.

Crosses are marked on confirmed bars only

This is the part of the tool worth reading carefully.

A moving average tool can decide that a cross has happened on the bar that is still forming. Nothing prevents it: an indicator is recalculated on every tick, and the newest bar is the one that has not closed yet. We have not surveyed how common that is. On a historical chart that decision is only ever evaluated against the bar's final close, so the marks line up neatly. In real time the same code sees the close move while the bar is open, so a mark can appear, then disappear, then come back on the other side. The chart of the past and the chart of the present are not showing the same thing.

This indicator never reads a bar that has not closed. The rule is:

- The side is the sign of the fast average minus the slow average, read on closed bars only.
- The crossing bar is the first closed bar whose side is the opposite of the previous non-zero side.
- The mark appears on the Nth closed bar counted from the crossing bar, where N is an input and the default is one, meaning the crossing bar itself.
- A mark is drawn only if the bar it appears on is at or before the as-of axis. Nothing to the right of the axis is consulted.

The confirmation lag is printed rather than hidden. Each mark reads GC/1 or DC/2, where the number is which closed bar after the cross the mark came out on. The panel carries the newest cross with the time of the crossing bar, the lag, and how many closed bars the mark has been on the chart. The tooltip on each mark gives both timestamps in full: the bar that crossed, and the bar the mark appeared on.

An honest note on how much this is worth. We ran the same series two ways: once the way this product works, on closed bars only, and once through a model of a tool that judges the forming bar. The model used a 5 and 20 period pair, which is faster than any pair this product ships. Across two synthetic series it put up marks on 109 bars during the bar, and on 19 of those the mark had vanished or reversed by the close. All 19 came from one of the two series. In the other the count was zero: that one is a smooth oscillation that keeps the two averages far apart, so the gap between them never gets close enough to zero for a single bar's range to flip it.

Read those numbers as narrowly as we mean them. They come from two synthetic series and from one pair of periods, faster than any pair shipped here, and one of the two series produced nothing at all. That is not a measurement of how often this matters on a real chart, and we have not made one. We do not claim the difference is large.

What we claim is narrower than that, and it does not depend on the market. In this product the path does not exist. There is no code that can put a mark on a bar that has not closed, so the number of marks that later vanish is zero by construction rather than by luck. That is a statement about reproducibility, not about how often a cross is followed by a move.

One more deliberate choice. A golden cross and a dead cross are drawn in the same muted text colour. They are not green and red. Colouring them that way would read as buy and sell, and that is a claim this tool does not make. The two letters carry the distinction.

The as-of axis

A vertical line on the chart is the as-of axis. Drag it to the left and the chart is redrawn as it stood at that time: the averages stop at the axis, marks to the right of it are not drawn, and the readings on the panel become the readings of that bar. Nothing that happened afterwards is used.

Beside the line sits a handle, and the handle reads out the time the axis points at:

MA :: AXIS 08.11 21:45

The word in front is a short tag for the indicator the tab belongs to. If a second indicator on the same chart also draws an as-of tab, the tag is how you tell the two apart at a glance.

Out of the box there are two ways to move the axis. Drag the handle, which is the largest target and the one we would point you at first. Or press NOW on the panel to put the axis back on the newest bar. Two more ways can be switched on: AsOfShowSteps brings back keys that step the axis by fifty or ten bars at a time, and AsOfLineSelectable lets you drag the vertical line itself. Whichever you use, the line, the handle and the panel are kept in step, so nothing is left showing a stale value. The line is drawn three pixels wide by default, because a one pixel vertical line is hard to hit; that width is an input.

The vertical line can be drawn in four ways, and the setting exists because we do not know which one you will prefer on your own chart. THIN is the default: a one pixel line mixed into the chart background, so it is still there but stops competing with the candles. FULL is the line as described above, the way this indicator drew it before the modes were added. BOTH keeps that faint line and adds three short tick marks at the top edge, the middle and the bottom edge of the window. TICKS mixes the line all the way into the background and leaves only the three marks. MetaTrader has no transparency for a vertical line, so faint is made by mixing the line colour into the chart background colour; how far it is mixed is an input. The marks are not faded, so they keep the colour of the axis. There are always exactly three of them, whatever the chart holds: the count is fixed in the code and does not grow with the number of bars. The axis itself is unchanged in every mode, including TICKS, where the line object is still there carrying the time and is simply the colour of the background. Switching modes changes what you see, not how the axis is dragged or what is drawn from it.

The time on the handle and the time on the panel are always the same bar, and it is the bar the readings were taken at. While the axis is live that is the last closed bar, not the bar still forming, even though the line itself is parked on the forming bar. Anything that prints a number names the bar the number came from.

The axis lives in the vertical line object itself, so it survives a timeframe change and a restart of the terminal. If you switch the panel off, the keys go away and the handle remains.

There is nothing to recompute when you move it. A simple moving average uses only the closes of its own bar and the bars before it, so the value at an older bar is the same whether it was computed from the full history or from history cut at the axis. Reproducing what was on the screen at that moment therefore means one thing only: not drawing the bars after it. The harness checks this by physically truncating the arrays and recomputing, and comparing against the axis result at every bar of the test series.

The handle is a small opaque tab, laid out in screen pixels rather than on the price grid, so it keeps its size and shape at every zoom level. It is filled with the same colour as the panel, the readout is drawn on that fill, and a two pixel strip down its left edge carries the colour of the axis line.

Press the left mouse button anywhere on the tab and drag. The axis follows at once. You do not select the tab first and you do not double click it: the indicator does its own hit testing against the rectangle it drew, so the area that responds is the tab you can see plus a three pixel margin. The tab is not a selectable chart object, so MetaTrader puts no selection marks on it, and it has no drag points, so it cannot be stretched or tilted by catching it near an edge.

While you hold the tab, horizontal chart scrolling is suspended, so the chart does not slide out from under the cursor as you drag. Your existing setting is read before it is changed and written back when you let go, and also on the next click, on the next object drag, and when the indicator is removed. If the tab would come to rest on top of the panel it steps below the panel, and only then.

Tabs are placed in lanes. A lane is a row of screen height, and the lane number is an input. Two indicators that both draw an as-of tab are put in different lanes, so the tabs sit one above the other instead of covering each other.

The tab can also be dragged up and down. Where you drop it is where it stays: the lane offset and the panel dodge are both skipped from then on, because both of those are guesses made before you had looked at the chart. The tab cannot be dropped off the edge, so it can always be picked up again. Moving it changes nothing except where the tab is drawn, and the height is not kept when the timeframe changes or the indicator is reloaded.

By default the vertical line cannot be picked with the mouse. Clicking it does nothing, so the line cannot be caught by accident while you are drawing on the chart. The tab and the panel are how the axis is moved. Setting AsOfLineSelectable to true restores the ordinary way of moving a chart object: select the line, then drag it. MetaTrader draws small selection marks on a selected object, and AsOfKeepSelected keeps the line selected so that first click is not needed. That input only has an effect while the line can be selected at all. Marks never appear on the tab.

Readings in ATR units

The panel prints four numbers, all read at the axis bar, so they change when you move the axis:

- ATR: the average true range over a fixed number of closed bars, as a plain arithmetic average. This is the unit the other three are expressed in.
- SLP: the slope of the Mid average over the last N closed bars, in ATR per bar.
- C-M: the close minus the Mid average at the axis bar, in ATR.
- S-M: the Short average minus the Mid average at the axis bar, in ATR.

Three choices behind those definitions are worth stating, because they are the reason the numbers are comparable at all.

Not degrees. An angle in degrees depends on the height and the zoom of the chart window. Two people looking at the same market get different numbers, and neither can reproduce the other's. Bars of ATR per bar has no such dependence.

Divided by ATR. The same distance in dollars means different things when gold trades at 1,800 and at 3,000, and on a quiet day and on a busy one. Dividing by the range of a bar makes the readings comparable across periods and across timeframes.

A plain average, not Wilder's smoothing. This is not because Wilder's method looks ahead; it does not. It is because an exponentially smoothed range is built up from the start of whatever history the terminal happens to hold, so its value depends on how deep that history is. A fixed window gives the same number on a terminal holding two hundred bars and on one holding twenty thousand. Since the whole point of these readings is that they can be reproduced, that mattered more than tradition.

Both the ATR window and the slope window are inputs. Their defaults were not optimised and are not presented as good values: the ATR window is the conventional one, and the slope window is the Short period that this indicator already uses on every timeframe. No threshold is given anywhere in this tool or in this description. There is no statement that a slope above some value means anything. We have not measured that, and the readings are measurements, not signals.

The panel

A small flat panel sits in one corner of the chart. It is built from plain rectangles and labels rather than from platform buttons, so it has no bevels and no 3D styling. The cells carry tooltips that say what they are.

It has seven rows by default:

- The name, and a marker reading AUTO or MANUAL for where the periods came from.
- A sample of each of the three lines, drawn at its real thickness, with the name of the line.
- The three periods, with REF stamped on the Long line and PRIMARY on the Mid line.
- ATR and SLP.
- C-M and S-M.
- The time of the axis bar, the key back to live, and a marker reading LIVE or PAST.
- The newest cross: kind, pair, the time of the crossing bar, its confirmation lag, and how many closed bars ago the mark appeared.

The keys that step the axis by fifty and ten bars are off by default. With them off the row that held them is not built at all, NOW moves into the axis row, and the panel is one row shorter. Switching AsOfShowSteps on brings the four keys back on a row of their own and the panel returns to eight rows.

The panel measures its own text before it lays itself out, and widens if a value does not fit, so nothing overlaps at any display scaling. It can sit in any of the four corners, and it keeps the margin you set from whichever corner you choose. The corner, the margins and its two fonts are inputs. It can be switched off entirely, in which case no panel object is created at all.

The three additions described above can each be switched off on their own. Switch off all three and the chart shows three moving averages and nothing else.

Inputs

There are 37 inputs. In the properties dialog the moving averages and the panel come first, then three named groups. Every default listed here is the shipping default.

Moving averages:
- AutoPeriod: take the three periods from the table for the chart timeframe. Off means use the three period inputs instead.
- MA_Short, MA_Mid, MA_Long: the periods used when AutoPeriod is off. 20, 80 and 480.
- MA_Method: the averaging method. Simple by default. See the note in Limitations before changing it.
- MA_Price: the applied price. Close by default.

Panel:
- PanelShow: show the panel. Off means no panel object is created at all.
- PanelCorner: which corner it sits in. Top right by default.
- PanelX, PanelY: panel margins from that corner, in pixels.
- PanelSafeBottom: space always kept free at the bottom edge, for the time scale.
- PanelFontStamp, PanelFontNum: the label font and the number font of the panel.
- KeyAffordance: tell the parts of the panel you can press apart from the parts you only read. RAISED is the default: only the keys keep a face and a border, and the top of a key is lifted one step lighter, so a reading such as AUTO, MANUAL, LIVE or PAST is plain text. MARK marks the keys with the border alone. OFF is the older panel, where a key and a reading looked the same.

Crosses:
- CrossShow: mark crosses. Off means no cross object is created at all.
- CrossPair: which pair to read. Short against Mid, Mid against Long, or both.
- CrossConfirmBars: how many closed bars the new side must hold before the mark appears. One means the crossing bar itself.
- CrossScanBars: how many bars back from the axis are scanned for crosses.
- CrossMaxMarks: the largest number of marks kept on the chart. The oldest are dropped first.

As-of axis:
- AsOfShow: show the axis line, its handle and the axis keys on the panel. Off means always live.
- AsOfLineColor, AsOfLineWidth: colour and width of the axis line. A wider line is easier to grab.
- AsOfLineFront: draw the axis line in front of the candles rather than behind them.
- AsOfLineMode: how the axis line is drawn. THIN is the default: one thin line mixed into the chart background. FULL is the line as it was drawn before the modes were added. BOTH is that faint line plus three tick marks. TICKS is the marks only. The axis works the same way in all four.
- AsOfLineFadePct: how far THIN and BOTH mix the line into the chart background, from 0 to 100. 65 by default. Values outside that range are brought back inside it and the log says so.
- AsOfTickPx: the length of one tick mark in pixels, used by BOTH and TICKS. 18 by default, and brought inside 2 to 400. There are always three marks per line, whatever this is set to.
- AsOfLineSelectable: allow the vertical line itself to be picked and dragged. Off by default, so the line cannot be caught by accident. The tab and the panel still move the axis.
- AsOfKeepSelected: keep the vertical line selected. Off by default, and it only has an effect while AsOfLineSelectable is on, because marks are only drawn on selectable objects. It has no effect on the handle, which is not a selectable object and always moves on a single drag.
- AsOfHandleLane: which lane the tab is placed in, counting from the top. 1 by default, so that the tab does not land on top of the one our trend line indicator draws. Give a second indicator that draws its own as-of tab a different lane and the tabs stop covering each other. Zero is right when this is the only one on the chart. Dragging the tab up or down overrides both the lane and the panel dodge until the chart is reloaded.
- AsOfShowSteps: show the minus fifty, minus ten, plus ten and plus fifty keys on the panel. Off by default, which removes one row from the panel and moves NOW next to the LIVE marker.
- AsOfShowHandle, AsOfHandleFont, AsOfHandleYPct: show the drag handle, its text size, and how high up the chart it sits. The font size also sets the smallest width the tab may have, so it is the setting to raise if you want a larger area to grab.
- AsOfMaxHistory: how many bars are kept for the axis, the marks and the readings. Zero means every bar on the chart. See the note on performance in Limitations.

Readings:
- MeasureShow: show the ATR, slope and gap readings on the panel.
- MeasureAtrPeriod: bars in the average true range that is used as the unit.
- MeasureSlopeBars: bars the slope of the Mid average is measured over.

The manual period settings are the only inputs that can stop this indicator from starting: if MetaTrader will not accept a period, start-up stops and a message is written to the log. Every other out-of-range value is clamped to a safe range instead, and that applies to nine inputs: AsOfLineWidth, AsOfHandleFont, AsOfLineFadePct, AsOfTickPx, CrossConfirmBars, CrossScanBars, CrossMaxMarks, MeasureAtrPeriod and MeasureSlopeBars. Only the two axis-line settings say so in the log; the other seven are clamped silently. The panel margins and the position of the handle are not examined on the way in, because the drawing code keeps the panel and the handle on the chart whatever they are set to.

What you install

One compiled indicator file. There is nothing else to copy, no include files to place by hand, no library to install, no DLL call, and no external connection of any kind. Drop it on a chart and it runs.

Built to the same rule as our other indicator

Our trend line indicator is built to the same rule as this one. What each tool commits to the chart is decided from bars that have already closed, and is not rewritten afterwards: here it is a cross mark, there it is a trend line. Both carry the same as-of axis, so either chart can be dragged back to show what it could have drawn at that moment, and both are checked by the same kind of automated harness for the same kind of property.

They also look alike, on purpose. The same three muted colours. The same rule that the slower line is the thicker one, so a thin line is never hidden by a thick one. The same flat panel. Loading both leaves one chart in one style rather than two.

What the two share is a rule, not a result. Neither tool claims a statistical edge, and running one alongside the other does not produce one.

Limitations

- Work done while a plate is dragged. While you hold a plate, the indicator redraws on every mouse move. It redraws the plate only, not the panel, because nothing on the panel changes until the axis crosses onto another bar. When it does cross, the readings and the cross marks are recomputed, so dragging quickly across many bars is the most expensive thing this indicator does. Nothing heavy runs while you are not holding a plate: moving the mouse over the chart costs a single hit test.
- The first draw grows with the length of the chart, and it has not been timed on a real terminal. On that first pass the averages are read for every bar the chart holds. AsOfMaxHistory and CrossScanBars do not change the first pass; they cap the axis history and the cross scan.
- Work done after the first draw. Every later pass reads only the bars it needs - AsOfMaxHistory bars, 5000 by default - rather than the whole chart. And a tick that does not open a new bar rebuilds nothing at all: no readings, no marks, no panel, no plate. Those two things are what versions 1.22 and 1.23 changed; earlier versions read the whole chart and rebuilt everything on every tick. Setting AsOfMaxHistory to zero asks for the whole chart to be kept, and then the whole chart is read again on every pass. None of this has been timed on a real terminal either; it is a count of the work asked for, not a measurement of how long it takes.

- No entry or exit signals, no arrows, no alerts, no trading. It draws three averages, marks crosses and prints measurements.
- No claim of statistical edge. Whether any of this has predictive value has not been tested by us.
- Marks appear late, by design. The earliest a cross can be marked is the bar that closed the cross, and raising the confirmation setting makes it later still. This lateness is the price of not marking a bar that is still moving, and it cannot be removed without reading an unfinished bar.
- The confirmation setting is not a tuned value. A larger number waits for the new side to hold longer. Which number is better is not something we have measured, and we do not suggest one.
- The readings have no thresholds. They tell you the size of something. They do not tell you what to do about it.
- Changing the method away from the simple average costs you one property. Exponential and smoothed averages are built up from the start of the available history, so their values depend on how many bars your terminal holds and differ between brokers and between terminal settings. They still never read an unclosed bar, and the as-of axis still shows the past correctly, but two people will no longer read the same number off the same chart. The simple average is the default for this reason.
- The period table was chosen for XAUUSD. The indicator runs on any symbol, but the periods were not adjusted for other markets, and there is no start-up warning about it.
- When the axis is dragged, the picture is rebuilt during the drag. On some setups the redraw may only settle on the following tick, in which case the effect is a brief lag rather than a wrong picture.
- Keeping the axis usable costs memory and work on every tick. The default keeps five thousand bars. If that is heavy on your machine, lower it; the range you can drag the axis back over shrinks by the same amount.
- The panel uses Bahnschrift and Consolas by default. MetaTrader substitutes a different font silently when one is not installed and gives no way to ask which font it actually used, so on a machine without those fonts the panel will still work but will not look as intended. Both fonts are inputs.
- The panel needs room. On a very narrow or very short chart window it is clipped rather than hidden, because a hidden panel cannot be clicked.
- The axis line and its handle are chart objects owned by the indicator. Deleting them by hand does not disable the feature; they are recreated. Use the input to switch the axis off instead.
- The vertical line is an ordinary chart object, but by default it cannot be picked at all. Turning AsOfLineSelectable on restores the ordinary way of moving it: select, then drag. Whether selecting takes one click or two is a terminal setting, not something an indicator can read or change. AsOfKeepSelected then keeps it selected, which saves that click and puts the marks on screen. Either way the marks never appear on the handle.
- Dragging the handle depends on the terminal delivering mouse move events to the indicator. The indicator asks the chart for them at start-up and stops asking when it is removed. If another indicator on the same chart turns that chart setting off, the handle stops responding, and the panel keys remain as a way to move the axis (the line as well, once AsOfLineSelectable is on).
- Suspending chart scrolling while the handle is held is a chart-wide setting, so loading two indicators that both do it means whichever one restores last decides the value that is left.
- The handle is drawn as a filled screen-space panel, in the same way the indicator's own panel is drawn. How much of a candle the handle covers when it happens to sit over price is not something we have measured on a live chart, and we make no claim about it.
- The four ways of drawing the axis line are offered because we do not know which one will suit your chart, and we have not decided one for you. Faint is made by mixing the line colour into the chart background colour, so how faint a given setting looks depends on your background: on a light background the same number gives a different result than on a dark one. Try them and keep the one you can live with.
- The verification harness reimplements the drawing and measurement logic outside the terminal, and is a port of that logic rather than a separately designed implementation. It checks the logic, not the compiled file, and it runs on synthetic series rather than on recorded market data.
- Loading both of our indicators on one chart puts the accent colour in two places at once, one on each panel. Each panel follows the one-accent rule on its own; the rule does not survive stacking.

Please read the check claim narrowly, because we state it narrowly. What makes it worth running is the kind of thing it tests: these are mathematical properties of the output, such as producing the same result from data cut at time T as from full data replayed to T, that logic which reads ahead cannot satisfy. A port of a rule that peeked at an unfinished bar would fail these checks, not pass them by family resemblance.

Who this is probably not for

- Anyone looking for entry signals, arrows, alerts or an automated system.
- Anyone who wants the cross marked the instant the lines touch. That requires reading a bar that is still moving, which is the one thing this tool will not do.
- Anyone who needs evidence that moving average crosses have an edge before buying. We do not have that evidence and we will not invent it.

Support

Please use the product comments section or the mql5.com message system. Questions about what a specific input does, or about a chart where the output looks wrong, are welcome. Please include the symbol, the timeframe, and your input settings.
Altri dall’autore
TradeXray TrendAutoLines What it does. It draws trend lines from one fixed geometric rule, and it never moves a line after that line has been drawn. What it does not do. It does not tell you when to buy or when to sell, and it does not claim that these lines have any statistical edge. We have not measured one, so we do not say that one exists. What has been checked. The no-repaint behaviour is not just a sentence in this description. It is checked by an automated verification harness, and the
Filtro:
Nessuna recensione
Rispondi alla recensione