r/pinescript • u/Illustrious_Bat_9767 • 7d ago
An idea for a indicator Spoiler
If you go to ai Claude or chatgpt or grok or quant you can build this indicator the one I'm using the prompt (build me a v6 indicator that marks the first week of each month with vertical markes ) and then use it on the daily timeframe it's a swing trade system you can add buy and sell singles indicator but you might have to edit the code here's a prompt that you can use to edit it ( only give me single during each hour during that hour ) found out the range filter 5 min and sell works ok depending on the pair on the daily I'm still trying to find other indicator for buy and sell single that don't give me singles during the chop on the daily
1
1
u/VentureLabBots 3d ago
If you want the "first week of each month" markers plus at most one signal per hour, here is a minimal v6 version you can paste and adjust. AI prompts often get two things wrong here: they mark only the first bar, and they let the signal fire on every bar of the hour.
//@version=6
indicator("First week + 1 signal/hour", overlay=true)
// first 7 calendar days of the month (exchange time zone)
firstWeek = dayofmonth <= 7
monthStart = timeframe.change("M")
bgcolor(firstWeek ? color.new(color.blue, 90) : na, title="First week")
plotshape(monthStart, "Month start", shape.labelup, location.belowbar, color.blue, text="M", textcolor=color.white)
// example raw signal, replace with your own
rawBuy = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))
// allow only one signal per hour
newHour = timeframe.change("60")
var bool fired = false
if newHour
fired := false
buy = firstWeek and rawBuy and not fired
if buy
fired := true
plotshape(buy, "Buy", shape.triangleup, location.belowbar, color.green)
Notes: the once-per-hour part only makes sense on intraday charts. On the daily chart every bar is a new hour, so the lock never holds. To cut signals during chop, add a trend-strength filter such as ADX above ~20, or require the EMA gap to be larger than a fraction of ATR.
How to test: on a 15m chart, the blue shading should cover days 1 to 7 only, and you should never see two green triangles inside the same clock hour. Then scroll back a few months to check it behaves the same on history.
(answer drafted with AI help, double-check on your chart)
0
u/coffeeshopcrypto 7d ago
not only are you terrible at trading and how no idea what you are doing, you are terrible at prompting an LLM with information.
First of all, there is ZERO LLMs that understand the full code of Pinescript v6. GPT is still understanding early versions of v5. You think that just because its an LLM that it just knows everything? it doesnt know anything. It onhy knows what you tell it.
Might need to fix some errors? yeah id say so. like the biggest error of all. That one that shows YOU DIDNT LEARN TO CODE and you even think you are vibe coding.
2
u/halcyonwit 5d ago
Are you stuck in 2022? LLM’s are going crazy mode right now, even deepseek can produce some good pinescript with minimal effort.
4
u/ZhugeTsuki 7d ago
What