ECN Audit Pro ArBrain VE
- 지표
-
Bahtiyar Arniyazov
Over 33 years of engineering, economic, and executive management experience in civil and industrial construction — progressing from field engineer and site supervisor to Head of Production & Technical Department (PTO), Head of Planning & Economic Department in a state construction enterprise, Chief - 버전: 1.0
ECN Audit Pro Ar.Brain VE This indicator for MetaTrader 5 collects the execution conditions of the selected symbol in one panel: current spread, average spread, deviation from that average, stops and freeze levels, execution mode, allowed order types, presence of real volumes in the tick stream and measured slippage of the recent deals of the account. All values are read from symbol properties, account properties and the trade history of the terminal at the moment of display. Spread of every bar is kept in the history and compared with the average over a configurable number of bars. The panel shows the current spread in points and in pips, the average value, the number of bars that actually took part in the average, and the ratio between the current spread and the average. Depending on the ratio the state is coloured green, yellow or red, so a widening spread is visible at once without manual calculation. The spread alert can be set in two ways: by an absolute threshold in points or by the ratio to the average. Popup window, sound file, mobile notification and email are supported. Repeated messages are limited by a configurable pause. The time of the last alert is stored in a file and restored after the terminal restart, so the pause is respected after a restart and after a timeframe change as well. Slippage is measured on closed deals of the account. For every deal the indicator takes its price and execution time, finds the last quote before that moment and calculates the deviation in points. A positive value means the deal was executed worse than the quote. The panel shows the average deviation, the largest deviation and the number of deals in the sample, and assigns a state: normal, elevated or critical. The measurement relies on the tick history of the terminal. If there are no ticks for the required interval, the deal is skipped instead of being counted as zero. EVIDENCE BASE The panel contains a separate evidence base block built from four criteria. Every criterion is a fact read from the terminal API and not an opinion of the author: each line shows a ДА or НЕТ mark, meaning yes or no, the colour of the state and a numeric confirmation. Criterion C1, market execution. Source: the execution mode property of the symbol. The criterion is met if the mode is MARKET or EXCHANGE. If the mode is INSTANT or REQUEST the criterion is not met, and the line adds an explanation: the deal price is set by the broker, not by the market. This is not a guess about the intentions of the broker, it is a direct quotation of the symbol specification that the broker published itself. Criterion C2, real volumes. Source: the tick stream over the observation window, 300 seconds by default, through the CopyTicksRange function. The criterion is met if at least one tick has a real volume greater than zero. The panel shows how many of the checked ticks carry a real volume. Absence of real volumes means the tick stream carries no exchange volume information, so market depth cannot be judged from it. Criterion C3, floating spread. Source: the floating spread property of the symbol. The criterion is met if the value is true, that is the spread is formed by the price stream and is not set as a constant value. Criterion C4, slippage within normal range. Source: the trade history of the account and the tick history of the terminal. The criterion is counted only when the sample contains closed deals: the average deviation is compared with the normal slippage threshold, 2 points by default. If there are no deals within the selected history depth, the criterion is marked as having no data and is not included in the total. Three criteria are always counted, the fourth is added only when deals are available. The panel prints a line with the number of criteria met. The verdict rule is mechanical: the same combination of criteria always produces the same line. If there are no ticks in the observation window, the panel prints the line НЕТ ДАННЫХ: ОЦЕНКА НЕВОЗМОЖНА, meaning no data and assessment not possible. If criterion C1 is not met, the panel prints the line ПРИЗНАКИ КУХОННОЙ СХЕМЫ: ДА, meaning that signs of a kitchen scheme are present, together with the number of criteria met. If all counted criteria are met, the line ИСПОЛНЕНИЕ ПРОЗРАЧНО: ДА is printed, meaning that execution is transparent. In all other cases the line ЧАСТИЧНО ПРОЗРАЧНО is printed, meaning partially transparent, with the number of criteria met and the list of the failed ones. The verdict is displayed in three places of the panel: in the header, which stays readable even when the panel is collapsed, in a dedicated verdict line and in the bottom block next to the evidence base. Every verdict change is also written to the terminal journal as a single line with the result of each criterion, so the sequence of changes is kept independently of the panel. The CSV report gains an evidence base block: for every criterion the result, the value that was read, the source and the checking method, plus a summary line with the number of criteria met. The panel and the file are built from the same values, so they cannot disagree. The report is saved to the Files folder of the terminal by the panel button or by the E key. It contains terminal, server, account, account mode, currency and leverage data, the symbol specification, the current spread state, the slippage summary, the evidence base and a table of deals with deal price, reference quote and deviation. The file uses CSV with a semicolon delimiter and opens in spreadsheet applications and in Notepad. For expert advisors the indicator publishes thirteen buffers readable through iCustom: bar spread, average spread, ratio, spread state code, stops level, freeze level, execution mode code, trade mode code, average slippage, worst slippage, number of deals, slippage state code and an active alert flag. Empty parts contain the standard empty value, so a robot can tell missing data from zero. Stops level and trade modes have no history and are published on the current bar only. Calculation is incremental: on a new bar only the last bars are recalculated, while a full recalculation happens at initialisation and when the history depth changes. Panel refresh is driven by a timer, so the load does not grow with the number of ticks. During tester optimisation the panel and the alerts are disabled to keep the calculation fast. The panel is drawn with the CCanvas class, is opaque, uses a cold dark background with an emerald accent, recalculates its width and height automatically for the selected font and scales with the monitor resolution. The default font size is never below 10 points and can be changed in the inputs, with the A minus and A plus buttons or with the plus and minus keys. The display language is chosen with the InpPanelLang input in the Language section. The default is Auto, which takes the language from the terminal settings: if the terminal language is Russian the panel, the verdict lines, the alerts and the hints are printed in Russian, in all other cases in English. The English and Russian modes force the language regardless of the terminal settings and of the operating system language. This lets a trader of any nationality read the panel in a language he understands, without separate translation files and without reinstalling the product. The resolved language and its source are written to the journal once during initialisation, so it is always visible why the panel speaks that language. Switching the language affects neither the calculations, nor the evidence base criteria, nor the verdict, only the text changes. The product name in the panel header is not translated. The spread thresholds adapt to the market automatically. The factor is the ratio of the current volatility to the reference volatility: the average true range over a short period is divided by the average true range over a long period and the result is limited to a configurable range. The second input is the efficiency ratio of the movement: when the market is quiet and there is no directional movement, the factor never rises above one, so in a calm market the thresholds are not relaxed and a widening spread cannot be masked. The state thresholds, the alert threshold and the panel line show the already effective values, while a separate auto-tune line shows the current average true range, the reference one, the efficiency ratio and the resulting factor. Auto-tune is switched off by a single input, and then the fixed thresholds apply. The history is not rewritten: the state of every bar is calculated with its own factor. Service objects use their own prefix, cannot be selected by the mouse and are hidden from the object list; on removal only these objects are deleted. All inputs are grouped and have English names and tooltips; invalid values are rejected during initialisation with a message in the journal. The indicator does not trade, does not modify the account and does not send data to third party servers. A self test script is included; it reads every buffer and compares the values with the symbol properties. Accuracy and reliability. The displayed values fall into three categories: measured, which covers spread, levels, volumes and deal price, computed, which covers average spread, ratio and slippage, and interpreted, which covers only the final verdict. The first two categories are a direct result of terminal API functions, the third is a mechanical consequence of the evidence base lines. The formulas are open: a point equals the difference between ask and bid divided by the point size, slippage equals the difference between the deal price and the quote at the moment of the deal divided by the point size. The verdict is not an opinion of the author, not a trading recommendation and not a legal conclusion; where it differs from the broker documents, the broker documents prevail. Slippage includes the normal price movement during execution, so it is treated as a measured estimate of execution quality, not as proof of a particular intent. Trading decisions are made by the user.
