Ox_kali

Mason’s Line Indicator

Ox_kali 已更新   
The Macon Strategy is an idea conceived by Didier Darcet, co-founder of Gavekal Intelligence Software. Inspired by the Water Level, an instrument used by masons to check the horizontality or verticality of a wall. This method aims to measure the psychology of financial markets and determine if the market is balanced or tilting towards an unfavorable side, focusing on the behavioral risk of markets rather than economic or political factors.

The strategy examines the satisfaction and frustration of investors based on the distance between the low and high points of the market over a period of one year. Investor satisfaction is influenced by the current price of the index and the path taken to reach that price. The distance to the low point provides satisfaction, while the distance to the high point generates frustration. The balance between the two dictates investors’ desire to hold or sell their positions.

To refine the strategy, it is important to consider the opinion of a group of investors rather than just one individual. The members of a hypothetical investor club invest successively throughout the past year. The overall satisfaction of the market on a given day is a democratic expression of all participants.

If the overall satisfaction is below 50%, investors are frustrated and sell their positions. If it is above, they are satisfied and hold their positions. The position of the group of investors relative to the high and low points represents the position of the air bubble in the water level. Market performance is measured day by day based on participant satisfaction or dissatisfaction.

In conclusion, memory, emotions, and decision-making ability are closely linked, and their interaction influences investment decisions. The Macon Strategy highlights the importance of the behavioral dimension in understanding financial market dynamics. By studying investor behavior through this strategy, it is possible to better anticipate market trends and make more informed investment decisions.


Presentation of the Mason’s Line Indicator:

The main strategy of this indicator is to measure the average satisfaction of investors based on the position of an imaginary air bubble in a tube delimited by the market’s highs and lows over a given period. After calculating the satisfaction level, it is then normalized between 0 and 1, and a moving average can be used to visualize trends.

Key features:

  • Calculation of highs and lows over a user-defined period.
  • Determination of the position of the air bubble in the tube based on the closing price.
  • Calculation of the average satisfaction of investors over a selected period.
  • Normalization of the average satisfaction between 0 and 1.
  • Visualization of normalized or non-normalized average satisfaction levels, as well as their corresponding moving averages.

User parameters:

  • Period for min and max (days): Sets the period over which highs and lows will be calculated (1 to 365 days).
  • Period for average satisfaction (days): Determines the period over which the average satisfaction of investors will be calculated (1 to 365 days).
  • Period for SMA: Sets the period of the simple moving average used to smooth the data (1 to 1000 days).
  • Bubble_value: Adjustment of the air bubble value, ranging from 0 to 1, in increments of 0.025.
  • Normalized average satisfaction: Option to choose whether to display the normalized or non-normalized average satisfaction.



Please note that the Mason’s Line Indicator is not a guarantee of future market performance and should be used in conjunction with proper risk management. Always ensure that you have a thorough understanding of the indicator’s methodology and its limitations before making any investment decisions. Additionally, past performance is not indicative of future results.




版本注释:
This version added a new input variable “smooth_normalized” which allows smoothing the normalized value using a period multiplier. This variable is used to calculate the range of minimum and maximum satisfaction values by multiplying the user-inputted satisfaction period by the value of “smooth_normalized”.
The variable “smooth_normalized” allows for smoothing the normalization of the average satisfaction over a period defined by the user. The value of this variable is used to determine the period over which the satisfaction normalization is smoothed before calculating the minimum and maximum values. The default value is set to 2, which means twice the period. For a chart display of 1 day, the normalization will therefore be carried out over a period of 2 years.

Additionally, the new code also modified the indicator line that plots the normalized value line to change the line style to “style_dashed” and thicken the line with “linewidth=2”.

Update :
  • Added a new input variable “smooth_normalized” which allows smoothing the normalized value using a period multiplier.
  • The “min_satisfaction” and “max_satisfaction” variables have been modified to use the “smooth_normalized” variable to calculate the range of minimum and maximum satisfaction values.
  • Modified the indicator line that plots the normalized value line to change the line style to “style_dashed” and thicken the line with “linewidth=2”.
  • The color of the “bubble value” line has been changed.
版本注释:
Update of the default value of smooth_normalized variable to a value of 2.
版本注释:
Update of the code formatting.

开源脚本

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

免责声明

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

想在图表上使用此脚本?