Adam-Szafranski

custom Bollinger bands with filters - indicator (AS)

-----------Description-------------
This indicator is basically Bollinger bands with many ways to customize. It uses highest and lowest values of upper and lower band for exits. I think something is wrong with the script but cant find any mistakes – most probably smoothing. The ATR filter is implemented but is working incorrectly. In code you can also turn it into strategy but I do not recommend it for now as it is not ready yet.
So this is my first script and I am looking for any advice, ideas to improve this script, sets of parameters, markets to apply, logical mistakes in code or any ideas that you may have. Indicator was initially designed for EURUSD 5MIN but I would be interested in other ideas.
-----------SETTINGS--------------
---START - In starting settings we can choose
Line 1: what parts to use BB/DC/ATR
Line 2: what parts to plot on chart
Line 3 Whether or not apply smoothing to BB or ATR filter
Line 4 Calculate deviation for BB from price or Moving average
Line 5 Fill colors and plot other parts for debug (overlay=false)
Line 6:( for strategy) – enable Long/Short Trades
---BB and DC – here we modify Bollinger bands and Donchian
Line 1: Length and type of BB middle line and also length of DC from BB
Line 2: Length and type of BB standard deviation and multiplier
Line 3: Length and type of BB smoothing and %width for BB filter
---ATR filter – (not ready fully yet)
Line 1: type and length of ATR
Line 2: threshold and smoothing value of ATR
---DATE and SESSION
Line 1: apply custom date or session?
Line 2: session hours settings
Line 3:Custom starting date
Line 4: Custom Ending date
-----------HOW TO USE--------------
We open Long if BB width is bigger than threshold and close when upper band is no longer highest in the period set. Exact opposite with Short
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟