tkarolak

First In, First Out Moving Average

tkarolak 已更新   
This script is a tool designed to calculate a First In, First Out (FIFO) Moving Average (MA) using traded prices and volumes. Additionally, it computes the Point of Control (PoC) from, which identifies the price levels (developing POC) with the maximum volume. The script is built to provide traders with a comprehensive analysis of price movements and volume dynamics, enhancing their understanding of market trends and potential entry/exit points.

Understanding the Mechanics:
The script maintains arrays for prices and volumes, where hypothetical trades are added.
For long trades (identified by red candles/bars), traded prices and volumes are appended to the respective arrays.
Short trades (identified by green candles/bars) trigger the removal of volumes from the arrays following the FIFO principle.
This process ensures the adjustment of partial or complete removal of oldest entries based on traded volume.

Analyzing Profit and Loss (PnL):
The script also tracks a hypothetical Profit and Loss (PnL) to understand whether the outcome is in red (negative) or green (positive) - color of the FIFO MA.

Interpreting the Results:
Once the script is applied to the chart, traders can observe the FIFO Moving Average (MA) and Point of Control (PoC) lines plotted.
By analyzing these lines and the associated colors (indicating positive or negative PnL), traders can make informed decisions regarding market trends, support/resistance levels and potential trading opportunities.
版本注释:
Some adjustments to default input settings.
版本注释:
Code refactor
版本注释:
Getting close/volume data from lower timeframe now.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?