AtillaYurtseven

Anchored Average Price by Atilla Yurtseven (AAP)

Anchored Average Price indicator is designed to pinpoint a specific date and price in a given financial instrument's price chart. Once anchored to the desired date and price level, the script calculates and displays the average price from that anchor point to the current day.

Features

  1. Customizable Source: Allows users to choose the source data for calculations. By default, it uses hlc3, which is the average of high, low, and close prices.
  2. Start Date Input: The script includes a timestamp-based input that allows the user to specify the anchor date easily.
  3. Customizable Color: Users can change the color of the plotted average line, adding an additional layer of customization to the visual representation.

Code Mechanics

  • Initialization: Declares the variables and arrays required for calculations and display. The array is used to store price data.
  • Condition Check: Only starts storing and calculating data if the chart's time is equal to or greater than the user-defined start date.
  • Data Storing: Once the condition is met, the script pushes the src price data into the array for future averaging.
  • Average Calculation: It calculates the average price of the values stored in the array.
  • Data Clearing: If the condition is not met, the array is cleared, and no average is plotted.
  • Plotting: The average price is plotted on the chart with the user-defined color.

By incorporating these features and mechanics, AAP provides traders and investors with a powerful tool for assessing average prices anchored to a specific date or swing.

Disclaimer:
This TradingView script is intended for educational and informational purposes only and should not be considered as investment or trading advice. Past performance is not indicative of future results. Trading and investing carry a high level of risk, and you should consult with a qualified financial advisor before making any financial decisions. The creator of this script, Atilla Yurtseven, is not responsible for any losses or damages incurred as a result of using this script.


Trade smart, stay safe
Atilla Yurtseven

I know Kung-Fu!
オープンソーススクリプト

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

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

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