NSE-Sectors Relative Strength

study(“NSE-Sectors Relative Strength”) //This indicator plots the normal distribution for the 10 sectors of the Nifty for the last X bars of the selected resolution, based on the selected comparative security. sym = input(title=”Comparative Security”, type=symbol, defval=”SPY”)res = input(title=”Resolution”, type=resolution, defval=”D”)a = security(sym, res, close)i = input(title=”Deviation”, type=integer, defval=200, minval=2, maxval=2000) XLB1 = security(“CNXPHARMA”,res,close)XLE1 = …

NSE-Sectors Relative Strength Read More »

Exponential Moving Average Crossover Strategy

//@version=5// Step 1. Define strategy settingsstrategy(title=”EMA Crossover”, overlay=true, pyramiding=0, initial_capital=100000, commission_type=strategy.commission.cash_per_order, commission_value=4, slippage=2) // SMA inputsfastMALen = input.int(20, title=”Fast EMA Length”)slowMALen = input.int(50, title=”Slow EMA Length”) // Stop loss inputsatrLen = input.int(10, title=”ATR Length”)stopOffset = input.float(4, title=”Stop Offset Multiple”, step=.25) // Position sizing inputsusePosSize = input.bool(true, title=”Use Position Sizing?”)maxRisk = input.float(2, title=”Max Position Risk %”, …

Exponential Moving Average Crossover Strategy Read More »