OPEN-SOURCE SCRIPT

Spoofing Detector with VPOC [CHE]

"We're keeping an eye on the market makers, zooming in for a closer look."

Spoofing and Volume Point of Control (VPOC) are terms used in the context of market manipulation and market analysis in financial markets.

A spoofing detector is a tool developed to detect the spoofing of orders. Spoofing refers to a practice where a market participant places large orders to deceive other market participants and influence the price of a stock. These large orders, however, are not executed but cancelled shortly after, creating a false demand for a specific stock and influencing the price. A spoofing detector can use algorithms to detect and report these practices to maintain the integrity of the market.

The Volume Point of Control (VPOC) is a concept in technical analysis aimed at identifying the key price level at which a stock was bought and sold. VPOC is calculated by analyzing the volume data of a stock and determining the price level at which the largest volume was traded for a specific period. This price level can serve as an indicator of the current market trend and market interest in a specific stock.

There is a substantive connection between a spoofing detector and VPOC because both tools can be used to gain a better understanding of the stock markets and detect potential forms of market manipulation. For example, VPOC can be used as an indicator of potential market manipulation when an abnormal distribution of trading volume is observed at a specific price level. A spoofing detector can then be used to detect and report these activities.

Pine Script Indicator Analysis:

This is a Pine Script code for a spoofing detector and volume point of control (VPOC) indicator. The purpose of the indicator is to detect and highlight potential spoofing activities in the market, as well as to plot the volume point of control on the chart.

Inputs:

Median Lookback: This input defines the length of the median calculation, with a default value of 25.
Range To Edges Threshold: This input sets a threshold value for the range to edges calculation, with a default value of 200.
Multiplier 1: This input sets a multiplier value to be used in the average true range calculation, with a default value of 0.8.
Multipler 2: This input sets a multiplier value to be used in the average true range calculation, with a default value of 2.0.
Multipler 3: This input sets a multiplier value to be used in the average true range calculation, with a default value of 3.0.
Variables:

y, x, ds, os: These are arrays and a variable used for the first part of the spoofing detection process.
y1, x1, ds1, os1: These are arrays and a variable used for the second part of the spoofing detection process.
y2, x2, ds2, os2: These are arrays and a variable used for the third part of the spoofing detection process.
Calculation:

The code starts by defining some variables, such as the bar index (n), the close price (src), and the average true range (atr) with different multipliers.
Next, the median of the close price is calculated over the lookback period specified by the "Median Lookback" input.
Then, the difference between the current median and the previous median is calculated, and the value is compared with the average true range with different multipliers to determine the state of the market (up, down, or unchanged).
The code then checks if the state has changed from the previous bar, and if so, the code performs a spoofing detection calculation.
The spoofing detection calculation involves determining the range between the first and last bar in the median calculation, and dividing it by the sum of the absolute differences calculated earlier. If the result is below the "Range To Edges Threshold" input, the code plots a line and a label on the chart indicating a potential spoofing activity.
The process is repeated for each of the three parts of the spoofing detection process.
VPOC:

The VPOC code is used to calculate the Volume Point of Control (VPOC) on a chart. The VPOC is the price level with the highest volume over a specified lookback period. The script contains several functions and inputs that allow the user to customize the calculation.

Inputs:

i_source: This input allows the user to specify the source for the VPOC price calculation. The options are the close price of the bar.
i_vpocThreshold: This input allows the user to set the threshold percentage for the VPOC highlight.
Functions:

timeStep_translate(): This function returns a string representing the time step of the lower time frame based on the current time frame of the chart.
ltfStats(): This function returns an array of the source and volume of the lower time frame.
ltfSrc, ltfVolume: This line requests the lower time frame data using the request.security_lower_tf function, with the lower time frame step calculated by the timeStep_translate() function.
maxVolume and indexOfMaxVolume: These variables store the maximum volume value and its corresponding index in the ltfVolume array.
maxVol: This variable stores the source value corresponding to the maximum volume.
vpocThresholdMet: This variable is a boolean that is true when the volume at the maximum volume price level is greater than or equal to the threshold percentage of the total volume.
vpocColor: This variable stores the color for the VPOC plot.
vh: This variable stores the highest volume in the lookback period.
plotshape(): This function plots the VPOC on the chart. The shape will be plotted only if the volume is greater than the specified threshold percentage of the highest volume in the lookback period. The shape will be labeled with the text "VC".
Overall, this script calculates the VPOC for a chart by aggregating volume data from a lower time frame and plotting a shape at the price level with the highest volume. The user can specify the source for the VPOC calculation and the threshold percentage for the VPOC highlight.

Important: VPOC shows everything in real time as a leading indicator, the triple spoofing detector is trailing

Best regards

Chervolino
CyclesforecastingspoofingTrend Analysisvpoc

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項