Inspirational Watermark
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//
// © BarefootJoey
// ██████████████████████████████████████████████████████████████████████
// █▄─▄─▀██▀▄─██▄─▄▄▀█▄─▄▄─█▄─▄▄─█─▄▄─█─▄▄─█─▄─▄─███▄─▄█─▄▄─█▄─▄▄─█▄─█─▄█
// ██─▄─▀██─▀─███─▄─▄██─▄█▀██─▄███─██─█─██─███─███─▄█─██─██─██─▄█▀██▄─▄██
// █▄▄▄▄██▄▄█▄▄█▄▄█▄▄█▄▄▄▄▄█▄▄▄███▄▄▄▄█▄▄▄▄██▄▄▄██▄▄▄███▄▄▄▄█▄▄▄▄▄██▄▄▄██
//
// This is an educational script. 
// When the bar changes you get a new inspirational quote.
// Hover for quotes.
//
//@version=5
indicator("Inspirational Watermark", overlay=true)

// Groups
grwm = "Watermark"
grt = "Table"
grl = "Label"

// Input
wmTypeIn = input.string("Table", "Type", options=["Label", "Table"], group=grwm, tooltip="Tables do not move. Labels are hard to crop out.")
position = input.string(position.top_right, "Location", [position.top_center, position.top_right, position.middle_right, position.bottom_right, position.bottom_center, position.bottom_left, position.middle_left, position.top_left], group=grt)
size = input.string(size.huge, "Size", [size.tiny, size.small, size.normal, size.large, size.huge], group=grwm)
watermark = input.string('🦉', "Text", group=grwm)
transp = input.int(20, "Transparency", minval=0, maxval=100, group=grwm)
col = input.color(color.orange, "Text Color", group=grwm)

// List of quotes to display
// If you know the unknown authors, I would welcome the information
q1 = '"For ideal entries, you are required to be sensitive to the subtle movement along the probability continuum." -Chris Lori'
q2 = '"Success in the market is not just about the market; it\'s about how you react to fear & greed." -Chris Lori'
q3 = '"Do not consider any other traders commentary when you are already in a position with a defined exit path." -Chris Lori'
q4 = '"Be absolutely clear in your plan. When engaged in the intensity of a trading scenario, focus on the task at hand." -Chris Lori'
q5 = '"In investing, what is comfortable is rarely profitable." -Robert Arnott'
q6 = '"Amateurs think about how much money they can make. Professionals think about how much money they could lose." -Jack Schwager'
q7 = '"It\'s not always easy to do what\'s not popular, but that\'s where you make your money." -John Neff'
q8 = '"Are you willing to lose money on a trade? If not, then don\'t take it." -Sami Abusad'
q9 = '"I\'m only rich because I know when I\'m wrong. I basically have survived by recognizing my mistakes." -George Soros'
q10 = '"I have two basic rules about winning in trading as well as in life: \n1) If you don\'t bet, you can\'t win. \n2) If you lose all your chips, you can\'t bet." -Larry Hite'
q11 = '"I just wait until there is money lying in the corner, and all I have to do is go over there and pick it up. I do nothing in the meantime." -Jim Rogers'
q12 = '"The purpose of trading is not being right, the purpose is to make money, and I think that\'s my number-one rule. Don\'t get hung up on your current positions." -Dana Allen'
q13 = '"Learn to take losses. The most important thing in making money is not letting your losses get out of hand." -Marty Schwartz'
q14 = '"Only buy something that you\'d be perfectly happy to hold if the market shut down for 10 years." -Warren Buffett'
q15 = '"There is a time to go long, a time to go short, and a time to go fishing." -Jesse Livermore'
q16 = '"If most traders would learn to sit on their hands 50 percent of the time, they would make a lot more money." -Bill Lipschutz'
q17 = '"You never know what kind of setup market will present to you; your objective should be to find an opportunity where risk-reward ratio is best." -Jaymin Shah'
q18 = '"The market can stay irrational longer than you can stay solvent." -John Maynard Keynes'
q19 = '"Trading doesn\'t just reveal your character, it also builds it if you stay in the game long enough." -Yvan Byeajee'
q20 = '"Bull markets are born on pessimism, grow on skepticism, mature on optimism and die of euphoria." -John Templeton'
q21 = '"One of the funny things about the stock market is that every time one person buys, another sells, and both think they are astute." -William Feather'
q22 = '"Only the game can teach you the game." -Jesse Livermore'
q23 = '"An investor without investment objectives is like a traveler without a destination." -Ralph Seger'
q24 = '"If stock market experts were so expert, they would be buying stocks, not selling advice." -Norman R. Augustine'
q25 = '"The stock market is a device for transferring money from the impatient to the patient." -Warren Buffett'
q26 = '"The intelligent investor is a realist who sells to optimists and buys from pessimists." -Benjamin Graham'
q27 = '"The stock market is filled with individuals who know the price of everything, but the value of nothing." -Philip Arthur Fisher'
q28 = '"We want to perceive ourselves as winners, but successful traders are always focusing on their losses." -Peter Borish'
q29 = '"In the short run a market is a voting machine, but in the long run it is a weighing machine." -Benjamin Graham'
q30 = '"The big money is not in the buying or the selling, but in the waiting." -Charlie Munger'
q31 = '"The question should not be: How much I will profit on this trade? The true question is: Will I be fine if I don\'t profit from this trade?" -Yvan Byeajee'
q32 = '"If you don\'t find a way to make money while you sleep, you will work until you die." -Warren Buffett'
q33 = '"Always start at the end before you begin. Professional investors always have an exit strategy before they invest." -Robert Kiyosaki'
q34 = '"Don\'t focus on making money; focus on protecting what you have." -Paul Tudor Jones'
q35 = '"The secret to being successful from a trading perspective is to have an indefatigable and an undying and unquenchable thirst for information and knowledge." -Paul Tudor Jones'
q36 = '"Don\'t ever average losers. Decrease your trading volume when you are trading poorly; increase your volume when you are trading well." -Paul Tudor Jones'
q37 = '"I am always thinking about losing money as opposed to making money." -Paul Tudor Jones'
q38 = '"Don\'t buy water during a drought; just put out a bucket when it\'s raining." -Unknown'
q39 = '"An investment in knowledge pays the best interest." -Benjamin Franklin'
q40 = '"Be fearful when others are greedy. Be greedy when others are fearful." -Warren Buffett'
q41 = '"It\'s not whether you\'re right or wrong that\'s important, but how much money you make when you\'re right and how much you lose when you\'re wrong." — George Soros'
q42 = '"Given a 10% chance of a 100 times payoff, you should take that bet every time." -Jeff Bezos'
q43 = '"I don\'t look to jump over seven-foot bars; I look around for one-foot bars that I can step over." -Warren Buffett'
q44 = '"Letting your emotions override your plan or systems is the biggest cause of failure." -J Welles Wilder'
q45 = '"Some traders are born with an innate discipline. Most have to learn it the hard way." -J Welles Wilder'
q46 = '"If you cant deal with emotions, get out of trading." -J Welles Wilder'
q47 = '"Buy the rumor, sell the news." -Joseph De La Vega'
q48 = '"When in doubt, zoom out" -Reggie Watts'
q49 = '"The trend is your friend, except at the end where it bends." -Martin Zweig & Unknown'
q50 = '"No price is too low for a bear or too high for a bull." -Unknown'
q51 = '"We don\'t have to be smarter than the rest, we have to be more disciplined than the rest." -Warren Buffett'
q52 = '"The key to making money in stocks is not to get scared out of them." -Peter Lynch'
q53 = '"The four most expensive words in the english language are: This time it\'s different." -Sir John Templeton'
q54 = '"Learn everyday, but especially from the experiences of others. It\'s cheaper!" -John Bogle'
q55 = '"Everyone has the power to follow the stock market. If you made it through fifth grade math, you can do it." -Peter Lynch'
q56 = '"Look at market fluctuations as your friend rather than your enemy. Profit from folly rather than participate in it." -Warren Buffett'
q57 = '"At a certain point, money is meaningless. It ceases to be the goal. The game is what counts." -Aristotle Onassis'
q58 = '"Seek advice on risk from the wealthy who still take risks, not friends who dare nothing more than a football bet." – J. Paul Getty'
q59 = '"Risk comes from not knowing what you’re doing." -Warren Buffett'
//q60 = 

// Logic 
r = math.round(math.random(1, 59))
quoteout = 
  r == 1 ? q1 : r == 2 ? q2 : r == 3 ? q3 : r == 4 ? q4 : r == 5 ? q5 : r == 6 ? q6 : r == 7 ? q7 : r == 8 ? q8 : r == 9 ? q9 :
  r == 10 ? q10 : r == 11 ? q11 : r == 12 ? q12 : r == 13 ? q13 : r == 14 ? q14 : r == 15 ? q15 : r == 16 ? q16 : r == 17 ? q17 : r == 18 ? q18 : r == 19 ? q19 :
  r == 20 ? q20 : r == 21 ? q21 : r == 22 ? q22 : r == 23 ? q23 : r == 24 ? q24 : r == 25 ? q25 : r == 26 ? q26 : r == 27 ? q27 : r == 28 ? q28 : r == 29 ? q29 :
  r == 30 ? q30 : r == 31 ? q31 : r == 32 ? q32 : r == 33 ? q33 : r == 34 ? q34 : r == 35 ? q35 : r == 36 ? q36 : r == 37 ? q37 : r == 38 ? q38 : r == 39 ? q39 :
  r == 40 ? q40 : r == 41 ? q41 : r == 42 ? q42 : r == 43 ? q43 : r == 44 ? q44 : r == 45 ? q45 : r == 46 ? q46 : r == 47 ? q47 : r == 48 ? q48 : r == 49 ? q49 :
  r == 50 ? q50 : r == 51 ? q51 : r == 52 ? q52 : r == 53 ? q53 : r == 54 ? q54 : r == 55 ? q55 : r == 56 ? q56 : r == 57 ? q57 : r == 58 ? q58 : r == 59 ? q59 : 
  //r == 60 ? q60 : 
  na

// Table Out
var table quote = table.new(position, 1, 1)
if barstate.isconfirmed and wmTypeIn=="Table"
    table.cell(quote, 0, 0, watermark, text_size = size, text_color = color.new(col, transp), tooltip=str.tostring(quoteout))
    
// Label Out
watermarklocation = input.string(yloc.abovebar, options=[yloc.belowbar, yloc.abovebar], title='Location', group=grl)
labelhoffset = input.int(0, "Horizontal Offset", maxval=1)
wmPrice = ta.valuewhen(bar_index, close, 0)
var label quote2 = na
if barstate.isconfirmed and wmTypeIn=="Label"
    quote2 := label.new(bar_index + labelhoffset, y=wmPrice, yloc=watermarklocation, size=size, text=watermark, style=label.style_none, textcolor=color.new(col,transp), tooltip=quoteout)
    label.delete(quote2[1])
    
// EoS made w/ ❤ by @BarefootJoey ✌💗📈
