LeviathanCapital

Tweet/X Post Timestamp - By Leviathan

LeviathanCapital Atualizado   
This script allows you to generate visual timestamps of X/Twitter posts directly on your chart, highlighting the precise moment an X post/tweet was made. All you have to do is copy and paste the post URL.

◽️ Use Cases:
- News Trading: Traders can use this indicator to visually align market price actions with news or announcements made on X (formerly Twitter), aiding in the analysis of news impact on market volatility.
- Behavioral Analysis: Traders studying the influence of social media on price can use the timestamps to track correlations between specific posts and market reactions.
- Proof of Predictions: Traders can use this indicator to timestamp their market forecasts shared on X (formerly Twitter), providing a visual record of their predictions relative to actual market movements. This feature allows for transparent verification of the timing and accuracy of their analyses

◽️ Process of Timestamp Calculation
The calculation of the timestamp from a tweet ID involves the following steps:
Extracting the Post ID:
The script first parses the input URL provided by the user to extract the unique ID of the tweet or X post. This ID is embedded in the URL and is crucial for determining the exact posting time.
Calculating the Timestamp:
The post ID undergoes a mathematical transformation known as a right shift by 22 bits. This operation aligns the ID's timestamp to a base reference time used by the platform.
Adding Base Offset:
The result from the right shift is then added to a base offset timestamp (1288834974657 ms, the epoch used by Twitter/X). This converts the processed ID into a UNIX timestamp reflecting the exact moment the post was made.
Date-Time Conversion:
The UNIX timestamp is further broken down into conventional date and time components (year, month, day, hour, minute, second) using calculations that account for leap years and varying days per month.
Label Placement:
Based on user settings, labels displaying the timestamp, username, and other optional information such as price changes or pivot points are dynamically placed on the chart at the bar corresponding to the timestamp.
Notas de Lançamento:
Minor error fixed
Notas de Lançamento:
Minor errors fixed

Register to support free indicators:
BYBIT: partner.bybit.com/b/Leviathan
WOO X: referral.woo.org/7MY2
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?