okadoke

Weekly Sentiment Analysis

okadoke Uppdaterad   
This script plots weekly scores derived from sentiment analysis and computes some stats on the history.
While this can be viewed on any timeframe, the stats are best viewed on the Daily timeframe, weekly and intraday charts produce some discrepancies.

Columns show the weekly score. If the column is blue, the high/low of that candle surpassed the target price.
White bars in the columns show the % change from the open price to the high of that candle.
Horizontal line shows the % above the weekly open that must be reached for a win.

The display after the most recent week shows stats across all weeks.
Skips is the percent of weeks that were skipped because they didn't meet the score threshold
Total Wins is the number of wins divided by the number of non-skipped weeks
Long Wins is the number of long wins divided by the number of non-skipped weeks
Short Wins is the number of short wins divided by the number of non-skipped weeks
Best Move is the number of weeks where the score predicted the biggest move, even if target wasn't hit, divided by the total number of weeks
Double Win is the number of weeks where both the Long and Short targets were hit, divided by the total number of weeks

Settings

The first section of inputs define how much each type of sentiment is weighted.

The second section defines the win criteria. By default the daily ATR(average true range) is used to define a percent above or below the opening price that the price much reach during the week in order to be considered a win.

ATR Lookback: How many days back the ATR is average over.
Long ATR Multiplier: ATR is multiplied by this value and added to the opening price to get the target price for longs.
Short ATR Multiplier ATR is multiplied by this value and subtracted from the opening price to get the target price for shorts.
Use Multipliers as fixed % targets: If true, uses the multipliers as a fixed % above/below the opening price to define the target price.

The third section is everything else...

Score Threshold for Longs: The week is skipped if the score is less than the threshold.
Score Threshold for Shorts: The week is skipped if the score is greater than threshold.
Instrument Type: To accurately track session opens and closes, the value must be set to Stocks if looking at stock tickers, Futures if looking at futures or forex tickers, and Crypto if looking at crypto tickers.
Versionsinformation:
Updated some inputs to accept decimal values.
Versionsinformation:
  • Added last weeks results
  • Fixed an issue with tickers where sentiments history is longer than price history.
Skyddat skript
Detta skript publiceras med stängd källkod och du kan använda det fritt. Du kan ange den som favorit för att använda den i ett diagram. Du kan inte visa eller ändra dess källkod.
Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?