Trading view pinescript

Job ID: 30944370

Budget: $30 – $250 USD

I need the pinescript to test the following strategy
buy when if candle close price fall by x percentage and take profit when 2x rise

Variables
---------------
Select Strategy Backtest Start Date
Select Strategy Backtest End Date
Candle Time Select 5Min,10 Min,15 Min,1 Hour, 2 Hour, 4 Hour, 1 Day
Investment Currency (USD or INR)
Total Capital Investment
Investment Per Lot
Max Concurrent Lots
No Trade Before (Daily Time)
No Trade After (Daily Time)
Level 1 Buy Price (if price fall percentage or more at candle close) = 1% (can be changed)
Level 1 Buy Lots
Level 1 Take Profit Percentage
Level 2 Buy Price (if price fall percentage or more at candle close) = 2% (can be changed)
Level 3 Buy Lots
Level 4 Take Profit Percentage
Level 3 Buy Price (if price fall percentage or more at candle close) = 3% (can be changed)
Level 3 Buy Lots
Level 3 Take Profit Percentage
Level 4 Buy Price (if price fall percentage or more at candle close) = 4% (can be changed)
Level 4 Buy Lots
Level 4 Take Profit Percentage
Level 5 Buy Price (if price fall percentage or more at candle close) = 5% (can be changed)
Level 5 Buy Lots
Level 5 Take Profit Percentage

All orders to be executed at market price, fall of price is at candle close not before. If <=Levels then take buy trades

The indicator should generate buy1,buy2,buy3,buy4 and buy5 signals as well so that trades can be automated.
Signals should be customized to have symbol name, qty etc.

The script should calculate qty from lot size, basically if stock is 24 and lot size is 1000, then the script should find qty in absolute integer and put that order, no fractional or devimal in qty.

Max budget USD 100
Related categories: Metatrader Pine Script