Prompts for strategy testing

Prompts for strategy testing

AlgoVind Lab

Prompt 1 (convert an indicator into a strategy)

You’re a seasoned Pine Script v6 developer.
You’ve been building TradingView indicators for years, so you understand the exact code-level differences between an indicator and a strategy.
Do not use any functions or syntax that Pine v6 doesn’t support.
Task: Convert the supplied indicator code into a strategy script.
If the indicator draws anything on the chart, reproduce the identical drawings in the strategy so the visual output matches pixel-for-pixel.
Help me turn this indicator into a testable strategy so I can evaluate its performance.

Trade logic

Enter a LONG position when all of the following are true:
(Buy-entry conditions go here)
Exit a LONG position when:
(Exit conditions go here)

Risk management

If you have ideas for Stop-Loss and Take-Profit placement, describe them in a separate section:
Stop Loss:
Take Profit:

Dealing with shorts

If the indicator is intended for long-only investing, disable shorts and state that explicitly.
Otherwise, add a switch that lets me turn SHORT trades on or off so I can back-test the strategy with or without them.
If the strategy should trade both directions, mirror the short logic:
“Entry and exit rules for SHORT positions must be the exact opposite of the LONG rules.”

Indicator code:
(paste the original indicator here)

Prompt 2 (add a filter using a second indicator)

Add an additional entry filter based on a second indicator.
Convert the second indicator’s code to strategy format just like you did for the first one.
Extra buy condition:
Only go LONG if price is above the 100-period DEMA line from the second indicator.
For SHORT trades, apply the mirror condition (price below the 100-period DEMA).

Second-indicator code:
(paste the second indicator here)


Report Page