StrategyIntradayChartScript

Nifty Dip Buyer v3

Use on chart

Loading the chart…

Live chart with the strategy tester open. Change the symbol and timeframe inside the chart. 01 uses5 views0

About this strategy

i don't know man use like it says in dip i used ai to create it now its telling me write some words so be it

How to use it

  1. Click Use on chart. It opens the terminal with this strategy in the strategy tester.
  2. Pick your symbol and timeframe, then read the summary and the list of trades: net profit, drawdown, win rate.
  3. Change the inputs from the strategy settings and compare. Past results do not predict future ones.

Settings and what it draws

Settings

InputTypeDefault
Input 1Whole number200
Input 2Whole number2
Input 3Whole number20
Input 4Whole number65
Input 5Whole number14
Input 6Number1.5
Input 7Number3

Draws on the price chart

  • EMA 200Line

Source code

strategy("Nifty Dip Buyer v3", overlay=true, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
trendLen = input.int(200, "Trend EMA")
rsiLen = input.int(2, "RSI length")
rsiBuy = input.int(20, "RSI buy level")
rsiExit = input.int(65, "RSI exit level")
atrLen = input.int(14, "ATR length")
stopMult = input.float(1.5, "ATR stop mult")
tgtMult = input.float(3.0, "ATR target mult")

trend = ta.ema(close, trendLen)
r = ta.rsi(close, rsiLen)
atrv = ta.atr(atrLen)

buySig = close > trend and r < rsiBuy
exitSig = r > rsiExit

if buySig and strategy.position_size == 0
    strategy.entry("L", strategy.long)

if strategy.position_size > 0
    strategy.exit("XL", "L", stop=strategy.position_avg_price - stopMult * atrv, limit=strategy.position_avg_price + tgtMult * atrv)

if exitSig
    strategy.close("L")

plot(trend, "EMA 200", color=color.gray)

Comments (0)

    No comments yet. Be the first to say how it worked for you.