Pine script strategy for opening range breakout and breakdown
Budget: ₹1,500 – ₹3,000 INR
I want pine script code which does backtesting strategy for following condition.
Please ensure script has comments to match with requirements listed here.
1. Chart timeframe is set to 5 min (and should be changeable in indicator setting)
2. when any candle bar breaksdown (closes below) below the low of first 5 min candle of the day, execute "Short" strategy.
3. When any candle bar breaks-out (closes above) above the high of first 5 min candle bar, execute "Long" strategy.
4. Strategy should be flexible to test this for any number of days. This should be changeable through input in settings options of indicator
5. Target points and stop loss should be configurable through settings input
6. Max 2 trades in a day
*** New requirements ***
8. When opening candle is green, check if top wick is bigger than candle body. if so, enter LONG when break out happens above wick (high). Else, enter LONG when breakout above close price of opening candle
9. When opening candle is red, check if bottom wick size is bigger than candle body. if so, enter SHORT when break down happens below low wick (opening candle low).
Else, enter SHORT when breakdown below close of opening candle
10. Trail stop loss when price is within 70 % of Target price. increment size of trailing SL should be configurable through settings.
11. DO NOT open new trade in last 20 minutes of trading window. In NSE of India stock market, it closes at 3:30 pm India time. So no new trades after 3:05 pm
12. Option to configure square off trades in last 15 min of trading hours i.e. by 3:15 pm
Please ensure script has comments to match with requirements listed here.
1. Chart timeframe is set to 5 min (and should be changeable in indicator setting)
2. when any candle bar breaksdown (closes below) below the low of first 5 min candle of the day, execute "Short" strategy.
3. When any candle bar breaks-out (closes above) above the high of first 5 min candle bar, execute "Long" strategy.
4. Strategy should be flexible to test this for any number of days. This should be changeable through input in settings options of indicator
5. Target points and stop loss should be configurable through settings input
6. Max 2 trades in a day
*** New requirements ***
8. When opening candle is green, check if top wick is bigger than candle body. if so, enter LONG when break out happens above wick (high). Else, enter LONG when breakout above close price of opening candle
9. When opening candle is red, check if bottom wick size is bigger than candle body. if so, enter SHORT when break down happens below low wick (opening candle low).
Else, enter SHORT when breakdown below close of opening candle
10. Trail stop loss when price is within 70 % of Target price. increment size of trailing SL should be configurable through settings.
11. DO NOT open new trade in last 20 minutes of trading window. In NSE of India stock market, it closes at 3:30 pm India time. So no new trades after 3:05 pm
12. Option to configure square off trades in last 15 min of trading hours i.e. by 3:15 pm