TradingView
AtulGoswami
7 Feb 2023 pukul 01.38

InsideBar2.0 

TATA CONSULTANCY SNSE

Deskripsi

Inside Bar: Inside Bar is defined as, " when candle body range falls within previous day candle body".
Some of us take the whole prices range . Here i have taken only the price range of the body of tehecandle.


I have created an indicator to identify Inside bras and draw target levels on both the sides. Traders can easily convert it into a strategy and checkout the success rate.


This script is written to identify InsideBar and then plot target 1 and target 2 irrespective the direction of following candles.


Inside Bar is here defined clearly when the whole body( Not high/Low, but Open and Close Only of the candle falls within the whole body of previous candle

Few static Variables are declared for one time use to store the following values


*MotherCandle Index

High and Low of MotherCandle

Target 1 equal to size of the body of mother candle

Target 2 equal twice the size of Mother Candle


Depending upon the direction of the trend and breakout of the MotherCandle boundaries, target lines and labels are drawn.

Line.delete function is used to delete all the previous lines to keep the chart clean and not draw line on all every inside-bar detected in the past.


Label.delete function is used to delete all the previous labels for Target levels to clearly show current target levels.

barcolor() function is used to change the inside bar candle changed to "Yellow" .

Catatan Rilis

changing variable name, making it small and efficient
Komentar
suvomoy17
Thank u .. Goswamider budhhi alada .. amar mamar bari goswami .. pandit family.. great work sir .. 💐💐
AtulGoswami
@suvomoy17, Thank you sir
aoyonc
Very cool :)
VishalSaxena
Excellent Indicator with High Accuracy
orlamitrade
thanks for this. can we also get inside bar indicator for a candle can the ranges close within the next candle to the right? is it possible?
JackHertz
Wow. Amazing indicator! Thanks.
flyer157
And pls let us know about stoploss because I have noticed many times that trend goes to other direction instead of target 1 and 2.. And from other direction it reverses and achive target 1 and 2..
AtulGoswami
@flyer157, Prices will keep oscillating in both the directions, important part is to keep a a stop loss which is based on the volatility of the stock.
flyer157
The provided code appears to be an implementation of an indicator called "InsideBar2.0" in the Pine Script language, which is used on the TradingView platform. However, the code does not contain any specific logic for calculating a stop-loss level. A stop-loss level is crucial for any trading strategy, as it helps protect against significant losses.

To determine the stop-loss level for this strategy, I would need additional information or a clear explanation of the rules or conditions used to trigger stop-losses in this particular strategy. Without this information, it is not possible to determine the stop-loss level from the given code alone.

In a trading strategy, the stop-loss level is typically determined based on various factors such as market conditions, volatility, risk tolerance, and specific rules set by the trader. If you have additional information or the rules for the stop-loss criteria, feel free to share them, and I'll be happy to implement your strategy further in calculating the stop-loss level.
Lebih lanjut