RPG Bible Verses

Aden_Suraud · study · 268 行 · 点赞 7 · TradingView 原页

本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。

Pine Script

//@version=6
// RPG Bible Verses - a Bible verse and a one-line trading reflection, pinned to the chart.
// Verses: KJV and WEB (both public domain). Generated by build.py from entries_src.json - edit there, not here.
indicator("RPG Bible Verses", overlay = true)
 
// ---------- Inputs ----------
const string G_ROT = "Rotation"
rotation = input.string("Daily", "Change verse", options = ["Daily", "Every session", "Hourly"], group = G_ROT, display = display.none)
themeSel = input.string("All themes", "Theme", options = ["All themes", "Greed & Patience", "Fear & Faith", "Provision & Family", "Discipline & Pride"], group = G_ROT, display = display.none)
shuffleN = input.int(0, "Shuffle (click up for a random verse, 0 = off)", minval = 0, group = G_ROT, display = display.none)
alertOn  = input.bool(true, "Send alert when the verse changes", group = G_ROT, tooltip = "Create an alert on this indicator with the condition 'Any alert() function call'.", display = display.none)
 
const string G_LAY = "Layout"
posSel    = input.string("Bottom left", "Position", options = ["Top left", "Top center", "Top right", "Middle left", "Middle center", "Middle right", "Bottom left", "Bottom center", "Bottom right"], group = G_LAY, display = display.none)
sizeSel   = input.string("Normal", "Text size", options = ["Tiny", "Small", "Normal", "Large"], group = G_LAY, display = display.none)
alignSel  = input.string("Center", "Alignment", options = ["Center", "Left", "Right"], group = G_LAY, display = display.none)
wrapW     = input.int(46, "Card width (characters per line)", minval = 20, maxval = 120, group = G_LAY, display = display.none)
showEmoji = input.bool(true, "Show theme emoji", group = G_LAY, display = display.none)
showTheme = input.bool(true, "Show theme name", group = G_LAY, display = display.none)
showQuote = input.bool(true, "Put the verse in quotation marks", group = G_LAY, display = display.none)
 
const string G_STY = "Text style"
styRef   = input.string("Bold", "Reference", options = ["Normal", "Bold", "Italic", "Bold + Italic"], group = G_STY, display = display.none)
styVerse = input.string("Bold + Italic", "Verse", options = ["Normal", "Bold", "Italic", "Bold + Italic"], group = G_STY, display = display.none)
styRefl  = input.string("Normal", "Reflection", options = ["Normal", "Bold", "Italic", "Bold + Italic"], group = G_STY, display = display.none)
 
const string G_COL = "Colors"
cBg     = input.color(#F5EFE0, "Background", group = G_COL, display = display.none)
cFrame  = input.color(#000000, "Border", group = G_COL, display = display.none)
frameW  = input.int(1, "Border width", minval = 0, maxval = 5, group = G_COL, display = display.none)
cRef    = input.color(#000000, "Reference", group = G_COL, display = display.none)
cVerse  = input.color(#000000, "Verse", group = G_COL, display = display.none)
cRefl   = input.color(#000000, "Reflection", group = G_COL, display = display.none)
 
const string G_HL = "Highlight"
hlRef   = input.bool(false, "Reference", inline = "hr", group = G_HL, display = display.none)
cHlRef  = input.color(#FFE58A, "", inline = "hr", group = G_HL, display = display.none)
hlVerse = input.bool(false, "Verse", inline = "hv", group = G_HL, display = display.none)
cHlVer  = input.color(#FFE58A, "", inline = "hv", group = G_HL, display = display.none)
hlRefl  = input.bool(false, "Reflection", inline = "hf", group = G_HL, display = display.none)
cHlRefl = input.color(#FFE58A, "", inline = "hf", group = G_HL, display = display.none)
 
// ---------- Data ----------
// Each entry: "theme|reference|verse|reflection"
var array<string> E = array.new<string>()
 
load0() =>
    E.push("0|Proverbs 28:20 (WEB)|A faithful man is rich with blessings; but one who is eager to be rich will not go unpunished.|Faithful beats fast. Show up today the same way you did yesterday, and let it add up.")
    E.push("1|Joshua 1:9 (KJV)|Have not I commanded thee? Be strong and of a good courage; be not afraid, neither be thou dismayed: for the LORD thy God is with thee whithersoever thou goest.|Whatever today brings, you're not walking into it alone. Be strong and go.")
    E.push("2|1 Timothy 5:8 (KJV)|But if any provide not for his own, and specially for those of his own house, he hath denied the faith, and is worse than an infidel.|Everything you're building is for the people at home. Keep them first today.")
    E.push("3|Proverbs 16:18 (WEB)|Pride goes before destruction, and a haughty spirit before a fall.|The moment you feel untouchable is the moment to be most careful.")
    E.push("0|Proverbs 13:11 (WEB)|Wealth gained dishonestly dwindles away, but he who gathers by hand makes it grow.|Little by little is still forward. Don't look down on the small steps you take today.")
    E.push("1|2 Timothy 1:7 (WEB)|For God didn't give us a spirit of fear, but of power, love, and self-control.|Fear is a feeling, not a fact. You were given a sound mind; use it today.")
    E.push("2|Proverbs 13:22 (KJV)|A good man leaveth an inheritance to his children's children: and the wealth of the sinner is laid up for the just.|Think past today. You're building something your grandchildren could inherit.")
    E.push("3|Proverbs 25:28 (WEB)|Like a city that is broken down and without walls is a man whose spirit is without restraint.|Without self-control you're a city with no walls. Build your walls today.")
    E.push("0|Proverbs 21:5 (WEB)|The plans of the diligent surely lead to profit; and everyone who is hasty surely rushes to poverty.|Take five minutes to plan your day before it plans you. Diligence is quiet, and it wins.")
    E.push("1|Isaiah 41:10 (KJV)|Fear thou not; for I am with thee: be not dismayed; for I am thy God: I will strengthen thee; yea, I will help thee; yea, I will uphold thee with the right hand of my righteousness.|You're being held today, even if it doesn't feel like it. Breathe.")
    E.push("2|Proverbs 24:27 (WEB)|Prepare your work outside, and get your fields ready. Afterwards, build your house.|Get the foundation right before you build bigger. It's worth the wait.")
    E.push("3|Hebrews 12:11 (WEB)|All chastening seems for the present to be not joyous but grievous; yet afterward it yields the peaceful fruit of righteousness to those who have been exercised thereby.|Discipline won't feel good today. It will pay you back later.")
    E.push("0|Ecclesiastes 5:10 (WEB)|He who loves silver shall not be satisfied with silver; nor he who loves abundance, with increase: this also is vanity.|If you can't say what enough looks like, you'll never feel it. Decide it today.")
    E.push("1|Psalm 56:3 (KJV)|What time I am afraid, I will trust in thee.|It's okay to be afraid. When you are, turn toward trust instead of panic.")
    E.push("2|Proverbs 27:23 (WEB)|Know well the state of your flocks, and pay attention to your herds.|Know where you stand today: your money, your time, your family. Pay attention.")
    E.push("3|1 Corinthians 9:27 (WEB)|But I beat my body and bring it into submission, lest by any means, after I have preached to others, I myself should be rejected.|Master yourself first. Everything else gets easier after that.")
    E.push("0|1 Timothy 6:10 (KJV)|For the love of money is the root of all evil: which while some coveted after, they have erred from the faith, and pierced themselves through with many sorrows.|Money is meant to serve your life, not run it. Keep it in its place today.")
    E.push("1|Matthew 6:34 (WEB)|Therefore don't be anxious for tomorrow, for tomorrow will be anxious for itself. Each day's own evil is sufficient.|Just today. You don't have to carry tomorrow yet.")
    E.push("2|Proverbs 21:20 (WEB)|There is precious treasure and oil in the dwelling of the wise; but a foolish man swallows it up.|Keep something back today. Wisdom saves; foolishness spends it all.")
    E.push("3|Proverbs 12:1 (WEB)|Whoever loves correction loves knowledge, but he who hates reproof is stupid.|Correction is a gift. Look honestly at your mistakes today.")
    E.push("0|Hebrews 13:5 (KJV)|Let your conversation be without covetousness; and be content with such things as ye have: for he hath said, I will never leave thee, nor forsake thee.|You already have more than you're counting. Start today from gratitude, not lack.")
    E.push("1|Philippians 4:6 (WEB)|In nothing be anxious, but in everything, by prayer and petition with thanksgiving, let your requests be made known to God.|Whatever is weighing on you, say it in prayer, then set it down.")
    E.push("2|Luke 14:28 (WEB)|For which of you, desiring to build a tower, doesn't first sit down and count the cost, to see if he has enough to complete it?|Before you commit to anything today, sit down and count the cost.")
    E.push("3|Proverbs 16:32 (WEB)|One who is slow to anger is better than the mighty; one who rules his spirit, than he who takes a city.|Ruling your own emotions today is a bigger win than anything else you'll do.")
    E.push("0|Proverbs 23:4 (KJV)|Labour not to be rich: cease from thine own wisdom.|You don't have to prove anything today. Resting is not falling behind.")
    E.push("1|Proverbs 3:5 (KJV)|Trust in the LORD with all thine heart; and lean not unto thine own understanding.|You don't have to understand everything today. Trust the One who does.")
    E.push("2|Philippians 4:19 (KJV)|But my God shall supply all your need according to his riches in glory by Christ Jesus.|Your needs are seen. You don't have to carry provision on your shoulders alone.")
    E.push("3|James 4:6 (WEB)|But he gives more grace. Therefore it says, 'God resists the proud, but gives grace to the humble.'|Pride gets resisted; humility gets grace. Stay humble today.")
    E.push("0|Proverbs 23:5 (WEB)|Why do you set your eyes on that which is not? For it certainly sprouts wings like an eagle and flies in the sky.|What you have can fly away; who you are can't. Put your energy into the second today.")
    E.push("1|Psalm 46:10 (KJV)|Be still, and know that I am God: I will be exalted among the heathen, I will be exalted in the earth.|Before you do anything else today, be still for one minute.")
    E.push("2|Matthew 6:33 (WEB)|But seek first God's Kingdom, and his righteousness; and all these things will be given to you as well.|Put first things first today and watch the rest fall into place.")
    E.push("3|Proverbs 11:2 (KJV)|When pride cometh, then cometh shame: but with the lowly is wisdom.|When things are going great, that's exactly when to stay humble.")
    E.push("0|Luke 12:15 (KJV)|And he said unto them, Take heed, and beware of covetousness: for a man's life consisteth not in the abundance of the things which he possesseth.|Your life is more than a number on a screen. Don't let today's numbers tell you who you are.")
    E.push("1|John 14:27 (WEB)|Peace I leave with you. My peace I give to you; not as the world gives, give I to you. Don't let your heart be troubled, neither let it be fearful.|The peace you need isn't in how today turns out. Don't let your heart be troubled.")
    E.push("2|Psalm 37:25 (KJV)|I have been young, and now am old; yet have I not seen the righteous forsaken, nor his seed begging bread.|Faithfulness has a long track record. Stay faithful today.")
    E.push("3|Romans 12:21 (KJV)|Be not overcome of evil, but overcome evil with good.|Don't answer something bad with something worse. Answer it with good.")
    E.push("0|Proverbs 15:27 (WEB)|He who is greedy for gain troubles his own house, but he who hates bribes will live.|Greed never stays where it starts; it follows you home. Guard your house today.")
    E.push("1|Psalm 34:4 (KJV)|I sought the LORD, and he heard me, and delivered me from all my fears.|Bring your fears into the light today. They shrink once they're named.")
    E.push("2|Proverbs 6:6 (WEB)|Go to the ant, you sluggard. Consider her ways, and be wise.|Small, steady work every day. That's how the ant does it, and it works.")
    E.push("3|Proverbs 24:29 (KJV)|Say not, I will do so to him as he hath done to me: I will render to the man according to his work.|You don't have to get even today. Let it go.")
    0
 
load1() =>
    E.push("0|Psalm 37:7 (KJV)|Rest in the LORD, and wait patiently for him: fret not thyself because of him who prospereth in his way, because of the man who bringeth wicked devices to pass.|Someone else's win is not your loss. Run your own race today and be at peace.")
    E.push("1|Deuteronomy 31:6 (KJV)|Be strong and of a good courage, fear not, nor be afraid of them: for the LORD thy God, he it is that doth go with thee; he will not fail thee, nor forsake thee.|A hard stretch doesn't mean you've been forgotten. You haven't been.")
    E.push("2|Proverbs 30:25 (KJV)|The ants are a people not strong, yet they prepare their meat in the summer.|Prepare in the good seasons for the slow ones. Today is a chance to store up.")
    E.push("3|Galatians 6:7 (WEB)|Don't be deceived. God is not mocked, for whatever a man sows, that he will also reap.|What you plant today, you'll pick up later. Plant well.")
    E.push("0|Lamentations 3:26 (KJV)|It is good that a man should both hope and quietly wait for the salvation of the LORD.|Waiting quietly isn't doing nothing. It's trusting. Let that be enough today.")
    E.push("1|Psalm 118:6 (KJV)|The LORD is on my side; I will not fear: what can man do unto me?|Nothing that happens today can change your worth. Walk in that.")
    E.push("2|Colossians 3:23 (WEB)|And whatever you do, work heartily, as for the Lord, and not for men.|Do today's work with your whole heart, even if nobody sees it.")
    E.push("3|Proverbs 27:2 (WEB)|Let another man praise you, and not your own mouth; a stranger, and not your own lips.|Let your work speak for you today. You don't need to announce it.")
    E.push("0|Isaiah 40:31 (KJV)|But they that wait upon the LORD shall renew their strength; they shall mount up with wings as eagles; they shall run, and not be weary; and they shall walk, and not faint.|If you're tired, you're allowed to wait. Your strength comes back while you do.")
    E.push("1|Matthew 6:27 (KJV)|Which of you by taking thought can add one cubit unto his stature?|Worry won't add a minute to your day. Let it go and do the next right thing.")
    E.push("2|Proverbs 22:7 (WEB)|The rich rule over the poor. The borrower is servant to the lender.|Debt makes you a servant. Every step out of it is a step toward freedom.")
    E.push("3|Proverbs 26:11 (KJV)|As a dog returneth to his vomit, so a fool returneth to his folly.|If you keep repeating the same mistake, change the habit that leads to it.")
    E.push("0|James 1:4 (KJV)|But let patience have her perfect work, that ye may be perfect and entire, wanting nothing.|Let patience finish its work in you today. It's building something you can't see yet.")
    E.push("1|1 Peter 5:7 (KJV)|Casting all your care upon him; for he careth for you.|You are cared for. Hand over the worry and keep your hands free for today.")
    E.push("2|Proverbs 14:23 (KJV)|In all labour there is profit: but the talk of the lips tendeth only to penury.|Do the work today. Talking about it never paid anyone.")
    E.push("3|Proverbs 15:22 (WEB)|Where there is no counsel, plans fail; but in a multitude of counselors they are established.|Ask for advice today. Nobody wins alone.")
    E.push("0|Ecclesiastes 7:8 (WEB)|Better is the end of a thing than its beginning. The patient in spirit is better than the proud in spirit.|Don't judge the day by how it starts. Stay steady all the way to the end.")
    E.push("1|Proverbs 29:25 (KJV)|The fear of man bringeth a snare: but whoso putteth his trust in the LORD shall be safe.|Stop living for other people's approval today. It's a trap, and you're free of it.")
    E.push("2|Proverbs 24:3 (WEB)|Through wisdom a house is built; by understanding it is established.|Build your house on wisdom today, not on luck.")
    E.push("3|Proverbs 13:4 (KJV)|The soul of the sluggard desireth, and hath nothing: but the soul of the diligent shall be made fat.|Wanting it isn't the same as working for it. Do the work today.")
    E.push("0|Proverbs 19:2 (WEB)|It isn't good to have zeal without knowledge; nor being hasty with one's feet and missing the way.|Slow down today. Most of what goes wrong starts with hurrying.")
    E.push("1|Isaiah 26:3 (WEB)|You will keep whoever's mind is steadfast in perfect peace, because he trusts in you.|Keep your mind fixed on what's true, and the noise around you loses its grip.")
    E.push("2|Psalm 127:1 (KJV)|Except the LORD build the house, they labour in vain that build it: except the LORD keep the city, the watchman waketh but in vain.|Make sure what you're building today stands on the right foundation.")
    E.push("3|Proverbs 4:25 (WEB)|Let your eyes look straight ahead. Fix your gaze directly before you.|Keep your eyes on your own path today. Let the distractions go by.")
    E.push("0|Proverbs 14:29 (WEB)|He who is slow to anger has great understanding, but he who has a quick temper displays folly.|When something sets you off today, pause before you answer. Your calm is your strength.")
    E.push("1|Psalm 23:4 (KJV)|Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.|If today feels like a valley, keep walking. You're passing through, not staying.")
    E.push("2|Proverbs 10:4 (WEB)|He becomes poor who works with a lazy hand, but the hand of the diligent brings wealth.|A lazy hand drifts; a diligent hand builds. Be diligent today.")
    E.push("3|Proverbs 4:23 (KJV)|Keep thy heart with all diligence; for out of it are the issues of life.|Guard your heart today. Everything you do flows out of it.")
    E.push("0|Galatians 6:9 (WEB)|Let us not be weary in doing good, for we will reap in due season, if we don't give up.|The boring days count too. Keep doing the right things; your harvest is coming.")
    E.push("1|Romans 8:28 (WEB)|We know that all things work together for good for those who love God, to those who are called according to his purpose.|Even the hard parts of today can be worked into something good.")
    E.push("2|Ecclesiastes 11:2 (WEB)|Give a portion to seven, yes, even to eight; for you don't know what evil will be on the earth.|Don't put everything you have on one thing. Spread it out and stay wise.")
    E.push("3|Matthew 26:41 (KJV)|Watch and pray, that ye enter not into temptation: the spirit indeed is willing, but the flesh is weak.|Your spirit is willing but your flesh is weak. Put guardrails in place today.")
    E.push("0|Ecclesiastes 3:1 (WEB)|For everything there is a season, and a time for every purpose under heaven.|Not every day is for pushing. Some days are for sitting still, and that's okay.")
    E.push("1|Hebrews 11:1 (WEB)|Now faith is assurance of things hoped for, proof of things not seen.|You can't see how it all works out yet. That's exactly what faith is for.")
    E.push("2|Proverbs 22:29 (WEB)|Do you see a man skilled in his work? He will serve kings. He won't serve obscure men.|Get really good at what you do. Doors open for people who are.")
    E.push("3|Proverbs 21:23 (WEB)|Whoever guards his mouth and his tongue keeps his soul from troubles.|Say less today. You'll save yourself a lot of trouble.")
    E.push("0|Habakkuk 2:3 (KJV)|For the vision is yet for an appointed time, but at the end it shall speak, and not lie: though it tarry, wait for it; because it will surely come, it will not tarry.|What you're waiting for isn't late. Keep your eyes open and your hands steady.")
    E.push("1|Mark 4:40 (WEB)|He said to them, 'Why are you so afraid? How is it that you have no faith?'|When panic rises today, remember what you believe.")
    E.push("2|2 Thessalonians 3:10 (WEB)|For even when we were with you, we commanded you this: 'If anyone will not work, don't let him eat.'|There's dignity in honest work. Do yours well today.")
    E.push("3|Romans 12:3 (KJV)|For I say, through the grace given unto me, to every man that is among you, not to think of himself more highly than he ought to think; but to think soberly, according as God hath dealt to every man the measure of faith.|You don't need to be the biggest person in the room. Think honestly about yourself.")
    0
 
load2() =>
    E.push("0|Psalm 27:14 (KJV)|Wait on the LORD: be of good courage, and he shall strengthen thine heart: wait, I say, on the LORD.|Waiting takes more courage than rushing. Be brave enough to wait today.")
    E.push("1|Psalm 112:7 (KJV)|He shall not be afraid of evil tidings: his heart is fixed, trusting in the LORD.|Bad news may come today. A settled heart doesn't have to be shaken by it.")
    E.push("2|Psalm 128:2 (WEB)|For you will eat the labor of your hands. You will be happy, and it will be well with you.|Enjoy the fruit of your honest work today. You earned it.")
    E.push("3|Philippians 2:3 (WEB)|Doing nothing through rivalry or through conceit, but in humility, each counting others better than himself.|You have nothing to prove today. Put someone else first.")
    E.push("0|Proverbs 20:21 (WEB)|An inheritance quickly gained at the beginning, won't be blessed in the end.|Fast doesn't mean blessed. Build something today you'll be glad you built in ten years.")
    E.push("1|Proverbs 24:16 (KJV)|For a just man falleth seven times, and riseth up again: but the wicked shall fall into mischief.|Falling isn't failing. Getting back up is the whole point.")
    E.push("2|Proverbs 31:27 (WEB)|She looks well to the ways of her household, and doesn't eat the bread of idleness.|Look after your household today with the same care you give your work.")
    E.push("3|Proverbs 14:12 (WEB)|There is a way which seems right to a man, but in the end it leads to death.|Feeling right isn't the same as being right. Check before you act today.")
    E.push("0|Proverbs 27:20 (KJV)|Hell and destruction are never full; so the eyes of man are never satisfied.|Your eyes will always want one more thing. Decide today where you stop.")
    E.push("1|2 Corinthians 5:7 (WEB)|For we walk by faith, not by sight.|Don't live today by every flicker you see. Walk by what you know is true.")
    E.push("2|Deuteronomy 8:18 (KJV)|But thou shalt remember the LORD thy God: for it is he that giveth thee power to get wealth, that he may establish his covenant which he sware unto thy fathers, as it is this day.|Your ability to earn is a gift. Be grateful for it and use it well today.")
    E.push("3|Proverbs 3:7 (KJV)|Be not wise in thine own eyes: fear the LORD, and depart from evil.|Don't be wise in your own eyes today. Stay teachable.")
    E.push("0|Luke 16:10 (WEB)|He who is faithful in a very little is faithful also in much. He who is dishonest in a very little is also dishonest in much.|How you handle the small things today is how you'll handle the big ones. Do them well.")
    E.push("1|Psalm 55:22 (KJV)|Cast thy burden upon the LORD, and he shall sustain thee: he shall never suffer the righteous to be moved.|Give the heavy thing to God. You'll move lighter today.")
    E.push("2|Matthew 25:21 (WEB)|His lord said to him, 'Well done, good and faithful servant. You have been faithful over a few things, I will set you over many things. Enter into the joy of your lord.'|Be faithful with what's in your hands today, and more will follow.")
    E.push("3|Proverbs 10:17 (KJV)|He is in the way of life that keepeth instruction: but he that refuseth reproof erreth.|Take correction seriously. It's how you find your way back.")
    E.push("0|Proverbs 30:8 (KJV)|Remove far from me vanity and lies: give me neither poverty nor riches; feed me with food convenient for me.|Ask for enough, not for everything. There's real freedom in enough.")
    E.push("1|Lamentations 3:23 (KJV)|They are new every morning: great is thy faithfulness.|Today is new. Yesterday is closed; you don't have to carry it in.")
    E.push("2|Ephesians 6:4 (KJV)|And, ye fathers, provoke not your children to wrath: but bring them up in the nurture and admonition of the Lord.|Whatever kind of day you have, don't bring the frustration home to your kids.")
    E.push("3|Proverbs 19:20 (KJV)|Hear counsel, and receive instruction, that thou mayest be wise in thy latter end.|Listen to good advice now. You'll be glad you did later.")
    E.push("0|Philippians 4:11 (WEB)|Not that I speak because of lack, for I have learned in whatever state I am, to be content in it.|Contentment is learned, not found. Practice it today, whatever the day brings.")
    E.push("1|Psalm 30:5 (KJV)|For his anger endureth but a moment; in his favour is life: weeping may endure for a night, but joy cometh in the morning.|However last night went, morning came. Joy is on its way.")
    E.push("2|Psalm 127:3 (KJV)|Lo, children are an heritage of the LORD: and the fruit of the womb is his reward.|Your children are your real wealth. Give them your best today.")
    E.push("3|1 Corinthians 10:12 (KJV)|Wherefore let him that thinketh he standeth take heed lest he fall.|Right after a big win is when you're most likely to slip. Stay humble today.")
    E.push("0|Mark 8:36 (WEB)|For what does it profit a man, to gain the whole world, and forfeit his life?|Nothing you could gain today is worth losing yourself over.")
    E.push("1|Micah 7:8 (KJV)|Rejoice not against me, O mine enemy: when I fall, I shall arise; when I sit in darkness, the LORD shall be a light unto me.|You may fall today. You will also rise.")
    E.push("2|Proverbs 15:16 (KJV)|Better is little with the fear of the LORD than great treasure and trouble therewith.|A simple, peaceful life beats a rich, chaotic one. Choose peace today.")
    E.push("3|Proverbs 17:27 (WEB)|He who spares his words has knowledge. He who is even tempered is a man of understanding.|A calm spirit and fewer words will carry you a long way today.")
    E.push("0|Proverbs 16:8 (KJV)|Better is a little with righteousness than great revenues without right.|A little done right beats a lot done wrong. Keep your hands clean today.")
    E.push("1|James 1:3 (WEB)|Knowing that the testing of your faith produces endurance.|Whatever is testing you today is also building you.")
    E.push("2|Proverbs 12:11 (WEB)|He who tills his land shall have plenty of bread, but he who chases fantasies is void of understanding.|Work your own field today. Stop chasing other people's shortcuts.")
    E.push("3|Proverbs 1:7 (KJV)|The fear of the LORD is the beginning of knowledge: but fools despise wisdom and instruction.|Humility is where all real learning starts.")
    E.push("0|Romans 8:25 (KJV)|But if we hope for that we see not, then do we with patience wait for it.|You can't see the result yet. Keep going anyway; that's what hope looks like.")
    E.push("1|Psalm 27:1 (KJV)|The LORD is my light and my salvation; whom shall I fear? the LORD is the strength of my life; of whom shall I be afraid?|Remember what you're standing on. Fear gets smaller when you do.")
    E.push("2|Proverbs 3:9 (KJV)|Honour the LORD with thy substance, and with the firstfruits of all thine increase.|Give from the first of what you have, not the leftovers.")
    E.push("3|James 1:19 (KJV)|Wherefore, my beloved brethren, let every man be swift to hear, slow to speak, slow to wrath.|Listen more today. Speak less. Be slow to anger.")
    E.push("0|Proverbs 10:22 (KJV)|The blessing of the LORD, it maketh rich, and he addeth no sorrow with it.|Real blessing doesn't cost you your peace. If it does, it isn't worth having.")
    E.push("1|Exodus 14:14 (KJV)|The LORD shall fight for you, and ye shall hold your peace.|Not every battle today is yours to fight. Be still and let God handle it.")
    E.push("2|1 Thessalonians 4:11 (KJV)|And that ye study to be quiet, and to do your own business, and to work with your own hands, as we commanded you.|Live quietly today, mind your own work, and do it with your own hands.")
    E.push("3|Proverbs 25:16 (WEB)|Have you found honey? Eat as much as is sufficient for you, lest you eat too much, and vomit it.|Even good things in excess make you sick. Know when to stop.")
    0
 
const string TZ = "America/New_York"
var THEMES = array.from("Greed & Patience", "Fear & Faith", "Provision & Family", "Discipline & Pride")
var EMOJI  = array.from("⏳", "🙏", "🏠", "🎯")
 
var array<int> POOL = array.new<int>()
if barstate.isfirst
    load0()
    load1()
    load2()
    for i = 0 to E.size() - 1
        t = int(str.tonumber(str.split(E.get(i), "|").get(0)))
        if themeSel == "All themes" or THEMES.get(t) == themeSel
            POOL.push(i)
 
// ---------- Rotation ----------
f_dayKey(int t) =>
    int(math.floor(timestamp(TZ, year(t, TZ), month(t, TZ), dayofmonth(t, TZ), 0, 0) / 86400000.0))
 
f_key(int t, int td) =>
    switch rotation
        "Every session" => int(math.floor(td / 86400000.0))
        "Hourly"        => f_dayKey(t) * 24 + hour(t, TZ)
        => f_dayKey(t)
 
f_entry(int key) =>
    str.split(E.get(POOL.get(key % POOL.size())), "|")
 
// ---------- Text helpers ----------
f_wrap(string s, int w) =>
    string out  = ""
    string line = ""
    for wd in str.split(s, " ")
        if str.length(line) > 0 and str.length(line) + 1 + str.length(wd) > w
            out  := out + line + "\n"
            line := wd
        else
            line := str.length(line) == 0 ? wd : line + " " + wd
    out + line
 
f_header(array<string> p) =>
    t = int(str.tonumber(p.get(0)))
    (showEmoji ? EMOJI.get(t) + "  " : "") + p.get(1) + (showTheme ? "   |   " + THEMES.get(t) : "")
 
// ---------- Card ----------
pos = switch posSel
    "Top left"      => position.top_left
    "Top center"    => position.top_center
    "Middle left"   => position.middle_left
    "Middle center" => position.middle_center
    "Middle right"  => position.middle_right
    "Bottom left"   => position.bottom_left
    "Bottom center" => position.bottom_center
    "Bottom right"  => position.bottom_right
    => position.top_right
 
txtSize = switch sizeSel
    "Tiny"  => size.tiny
    "Small" => size.small
    "Large" => size.large
    => size.normal
 
// Plain strings (not text.align_* constants) so the choice can come from a setting.
halign = alignSel == "Left" ? "left" : alignSel == "Right" ? "right" : "center"
 
var table card = table.new(pos, 1, 3, bgcolor = cBg, frame_color = cFrame, frame_width = frameW, border_width = 0)
 
// Pine only accepts a fixed text style on a cell, so each style choice gets its own call.
f_cell(int row, string txt, color col, color bg, string sty) =>
    if sty == "Bold"
        card.cell(0, row, txt, text_color = col, text_size = txtSize, text_halign = halign, bgcolor = bg, text_formatting = text.format_bold)
    else if sty == "Italic"
        card.cell(0, row, txt, text_color = col, text_size = txtSize, text_halign = halign, bgcolor = bg, text_formatting = text.format_italic)
    else if sty == "Bold + Italic"
        card.cell(0, row, txt, text_color = col, text_size = txtSize, text_halign = halign, bgcolor = bg, text_formatting = text.format_bold + text.format_italic)
    else
        card.cell(0, row, txt, text_color = col, text_size = txtSize, text_halign = halign, bgcolor = bg)
 
if barstate.islast
    key = f_key(timenow, time_tradingday)
    // Shuffle: TradingView reuses the result for a setting it has already seen, so a checkbox could
    // only flip between two verses. A number gives a new value, and a new verse, on every click.
    // Scrambled with the day so the shuffle order changes daily.
    p = f_entry(shuffleN > 0 ? (shuffleN * shuffleN * 7919 + shuffleN * 104729 + key * 31) % 1000003 : key)
    verse = showQuote ? "\"" + p.get(2) + "\"" : p.get(2)
    f_cell(0, f_header(p), cRef, hlRef ? cHlRef : cBg, styRef)
    f_cell(1, f_wrap(verse, wrapW), cVerse, hlVerse ? cHlVer : cBg, styVerse)
    f_cell(2, f_wrap(p.get(3), wrapW), cRefl, hlRefl ? cHlRefl : cBg, styRefl)
 
// ---------- Alert ----------
kBar = f_key(time, time_tradingday)
if alertOn and barstate.isrealtime and kBar != kBar[1]
    a = f_entry(kBar)
    alert(a.get(1) + " - \"" + a.get(2) + "\"  " + a.get(3), alert.freq_once_per_bar)

← 返回列表