Retext
Story Writing

Candlestick Reversal Pattern Detector in Pine Script Prompt

Sets the AI up as a TradingView Pine Script v5 developer. It's for writers, editors and content creators. Use it for a first draft, then edit the result in your own voice.

Installs as a snippet — type ;candlestick to paste this prompt anywhere on your Mac.
Prompt Template
Act as a TradingView Pine Script v5 developer. You are tasked with creating an indicator that automatically detects and plots candlestick reversal patterns on the price chart. 

Your task is to:
- Identify and label the following candlestick patterns:
  - Bullish: Morning Star, Hammer
  - Bearish: Evening Star, Bearish Engulfing
- For each detected pattern:
  - Plot a green upward arrow below the candle for bullish patterns with the text “BUY: Pattern Name”
  - Plot a red downward arrow above the candle for bearish patterns with the text “SELL: Pattern Name”
- Add optional trend confirmation using a moving average (user-selectable length).
  - Only show bullish signals above the MA and bearish signals below the MA (toggleable).
- Include an optional RSI panel:
  - RSI length input
  - Overbought and oversold levels
  - Allow RSI to be used as an additional filter for signals (on/off)
- Ensure the indicator overlays signals on the price chart and uses clear labels and arrows 
- Allow user inputs to enable/disable each candlestick pattern individually
- Make sure the script is clean, optimized, and fully compatible with TradingView.

Source: awesome-chatgpt-prompts (CC0).

How to use this prompt

  1. 1

    Copy the prompt

    Use the copy button, or type its Retext trigger in any app to paste it.

  2. 2

    Open your AI assistant

    Start a new chat in ChatGPT, Claude, Gemini or the assistant you use.

  3. 3

    Fill in the details

    Replace any [bracketed] parts with your own details.

  4. 4

    Check and refine

    Read the answer, then reply with one change at a time.

Tips for better results

  • •To steer the TradingView Pine Script v5 developer, add one line after the prompt about your situation: your level, your goal and anything to avoid.
  • •Paste a short sample of writing you like and ask it to match that tone; it beats describing the tone in adjectives.
  • •Ask for one revision at a time and quote the part you want changed; broad "make it better" requests tend to rewrite everything.

Get the free prompt pack

Our best writing prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.

Variations

Context first

Add this line at the end: Before you start, ask me up to three questions about what I need from the TradingView Pine Script v5 developer and wait for my answers.

Second opinion

Add this line: After your answer, list two things a skeptical TradingView Pine Script v5 developer would question about it, and how you would address them.

Save it as a Retext snippet

Retext is a free text expander for Mac. Save this prompt once, then type ;candlestick in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.

  1. Click Add to Retext. The prompt installs as a snippet with the trigger ;candlestick.
  2. Change the trigger in Retext if you prefer a different one.
  3. Type the trigger wherever you want the prompt, then fill in the brackets.

Frequently asked questions

What does the Candlestick Reversal Pattern Detector in Pine Script prompt do?

Sets the AI up as a TradingView Pine Script v5 developer. It's written for writers, editors and content creators.

Which AI tools does it work with?

It's plain text, so it works in any chat assistant, including ChatGPT, Claude and Gemini. Paste it as the first message of a new chat.

Can I save this prompt as a snippet?

Yes. Click Add to Retext and it installs as a snippet with the trigger ;candlestick. Type that in any Mac app to paste the full prompt.

Related Templates

Get the free prompt pack

Our best writing prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.