I want to make stock screener through trading view pine script code . So chat gpt you…
- User
I want to make stock screener through trading view pine script code .
So chat gpt you have to write trading view pine script code stock screener for Multi Timeframe and Multi Symbol analysis based on Supply and Demand zone
Important Definition
Unfilled Boring/Base candle: A candle where body of candle is less than 50% of the total length of the candle. Also the TR of this candle will be less than the ATR of this candle. ATR calculation is taken of last 14 candles. If multiple consecutive boring candles are present then rules will be applicable on all of those.
Filled Leg-in candle: Candle that comes just before the first Boring Candle, its Body should be more than 50% of its own total length and its TR should be greater than its ATR. ATR calculation is taken of last 14 candles. It should be bigger than the Boring candles that come just after it.
Filled Leg-out candle: Candle that comes just after the last Boring Candle(if there are multiple Boring candles then), its Body should be more than 50% of its own total length and its TR should be greater than its ATR. ATR calculation is taken of last 14 candles. It should be bigger than the Boring candles that come just before it. The length of the Filled Leg-out starts from the close price of the last boring candle and ends at the close price of the Single leg out(high for Demand zone buy trade and low for Supply zone Sell trade) candle or ends at the close price of the 3rd legout candle if 3 consecutive green/red candles are present.
User Inputs options in code:
👉 Point 1. Candlestick Timeframe Selection: 1 Min, 2 Min, 3 Min, 5 Min, 15 Min,30 Min, 1 Hr, 2 HR, 3 Hr, 4 Hr, 8 HR, 1 Day, 1 Week, 1 Month. Multiple Selection checkbox.
👉 Point 2. Symbol Selection: Comma separate list of Symbols to be accepted as Input. Multiple Symbols can be entered.
👉 Point 3. Ratio of Base/Boring Candle to Legin Candle: example 1:2, 1:3 etc accept the ratio in textbox, If there are multiple Boring candles all should adhere to this ratio.
👉 Point 4. Ratio of Base/Boring Candle to Legout Candle: example 1:4, 1:5 etc accept the ratio in textbox
, If there are multiple Boring candles all should adhere to this ratio.
👉 Point 5. Maximum Number of Base/Boring Candles Allowed: Textbox that allows Number from 1 to 4
👉 Point 6. Minimum Leg In Body To its own HighLow % : Accept percentage as a number so if we enter 60 then it means the body of the candle should be atleast 60% of the total length of that candle including the wick(high and low also). Optional paramter. Leg in candle is the Candle which is just before the Base/Boring Candle(s). If there are multiple boring/base candles then the candle which comes just before the first boring candle is called as Leg in Candle.
👉 Point 7. Minimum Leg Out Body To its own HighLow % : Accept percentage as a number so if we enter 60 then it means the body of the candle should be atleast 60% of the total length of that candle including the wick(high and low also). Optional paramter. Leg out candle is the Candle which is just after the Base/Boring Candle(s). If there are multiple boring/base candles then the candle which comes after the last boring candle is called as Leg out Candle.
- Assistant