its so easy if you want to paper trading or real trade with automation and dynamic pine script with syntax then you can use NextLevelBOT platform. I share below dynamic script according to NextLevelBot Platform and now you can easily fully automation paper trading with below pine script.
if you want to know more about automation paper trading pls watch this video click here!
strategy("cci Strategy", overlay=true)
length = input( 14 )
overSold = input( 100 )
overBought = input( -100 )
_1 = input(true,"══════════ ADD Value ══════════")
// long_syntax = input("", "ADD LONG SYNTAX", input.string)
// Short_syntax = input("", "ADD SHORT SYNTAX", input.string)
ts = input("ADD SYMBOL INPUT", "TRADE SYMBOL", input.string)
exchange = input("NSE", "EXCHANGE", options=["NSE","NFO","MCX","OTHER"])
qty = input("25", "Quantity Value", input.string)
longEntry = '[{"E":"'+ exchange +'","TS":"'+ ts +'","PRICE":"' +tostring(close)+ '","CLOSE":"CLOSE","AT":"TRADINGVIEW"},{"E":"'+ exchange +'","TS":"'+ ts +'","PRICE":"' +tostring(close)+ '","Q":"'+ qty +'","TT":"BUY","AT":"TRADINGVIEW"}]'
shortEntry = '[{"E":"'+ exchange +'","TS":"'+ ts +'","PRICE":"' +tostring(close)+ '","CLOSE":"CLOSE","AT":"TRADINGVIEW"},{"E":"'+ exchange +'","TS":"'+ ts +'","PRICE":"' +tostring(close)+ '","Q":"'+ qty +'","TT":"SELL","AT":"TRADINGVIEW"}]'
price = close
vrsi = cci(price, length)
co = crossover(vrsi, overSold)
cu = crossunder(vrsi, overBought)
if (not na(vrsi))
if (co)
strategy.entry("RsiLE", strategy.long, alert_message=longEntry)
if (cu)
strategy.entry("RsiSE", strategy.short, alert_message=shortEntry)
// plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
// {{strategy.order.alert_message}}
makesure add this in alert message {{strategy.order.alert_message}}