OPEN-SOURCE SCRIPT

Mark Structure

מעודכן
Mark Structure is building the market swing structure, minor and sub structure and marks all possible insignificant pivots
Building such structure is really complex task to do, that has a lot of obstacles and challenges. I'm doing my best to develop this indicator behaving in absolutely expectable and right way. Fill free to leave any comments or bug reports.
it supports:
- Marking all pivots with labels or join them continuously with trend lines.
- Marking minor and sub structured swings with labels or join them continuously with trend lines. Marking BOS or SMS BOS, which are mbos. Minor and substructure are structures inside swing structure and it can differ from the structure of lower timeframe
- Marking swings of swing structure with labels or join them continuously with trend lines. Marking BOS or SMS BOS of swing structure
- Changing bullish and bearish colors of each kind of structures
- Changing pivot labelings
- Changing colors of BOSs
Remarks:
- As I told you guys before, it has a lot of challenging cases. eg we have swing low and high on the same candle and in order to decide which pivot goes first I take lower time frame data to figure out what pivot is the first, but it happens that on lower time frame the same issue takes place, due to limitation of TradingView I can't go infinitely to lower timeframes to solve this issue, so I mark those cases with labels
- Another issue is very beginning of the trend its hard to detect swing structure there due to missing historical data. so skip a few waves in the very beginning
- Don't expect to have minor and sub structure in each swing waves, its totally fine when you don't have them at all
- Swing structure is the most significant structure and shows real price direction. Trend change is confirmed when for bull->bear the last HL<LL and LL-LH-LL are confirmed, for bear->bull LH>HH and HH-HL-HH are confirmed. You can change labelling for unconfirmed swing trend in the settings. By default its already done
הערות שחרור
- minor bug fixes
- added BOS line style
- in order to detect aggressive trend change the sms bos logic is added to the kernel
- added combining waves with swings number less than 4. 3 swings trend doesn't have enough swings to confirm real trend change. Thus I've added option to turn on the combination, by default its on
הערות שחרור
fixed issue - Add to Chart operation failed, reason: Script has too many local scopes: 618. The limit is 500
הערות שחרור
sometimes it happens that obvious 5 bars swing gets eliminated due to strict 5 bars condition, thus Ive added 4 bars hybrid option. its something in the middle between noisy 3 and strictly 5 bars patterns
3 bars pattern condition:
at least 1 candle from each side must be lower or higher for lows and highs correspondingly
4 bars pattern condition:
at least 1-2 candle(total conditioned candles must be 3 or more) from each side must be lower or higher for lows and highs correspondingly
5 bars pattern condition:
at least 2 candles from each side must be lower or higher for lows and highs correspondingly
הערות שחרור
minor fixes
הערות שחרור
This release expresses new feature and its all about BOS
Since v3.0 you can control how the swing structure is being built. The main sign of changing trend is the break of its structure(BOS) which has 2 behaviour classic and sms. Both versions are confirmed when pivots meet last LH or HL for classic BOS or first LL or HH for sms BOS meet candle on its horizontal level. That first candle can intercept that line either by body or by wick and now you can choose which interception behaviour you would like to use. More than that the price can build a lot of swings before intercepting classic BOS line and already have confirmed SMS BOS for this case you can set priority of finding BOS. SMS,BOS will confirm structure if SMS BOS happens prior to classic BOS. If you choose BOS,SMS then if both BOS types got detected then classic BOS will be used

So you have a lot of power to affect building structure in a way you would like to see it. Enjoy
הערות שחרור
bug fixes - bug with detecting swing low and high on the same candle, it didnt do it in a right way
הערות שחרור
This release (v4.0) adds new functionality detecting structure swing by body only. You can find it in Swing Structure section and it's called Mode with value named By Body.
This is very important for those who is paying attention to wicks as liquidity collection, thus updating swing by wicks is not necessarily changing the structure direction, its just engulfing liquidity unless it's confirmed by body.
This functionality blocks some of the settings such as BOS Mode, BOS Priority and Unconfirmed Swings. Those settings are categorised so that you not messed up
הערות שחרור
I have to rename all my scripts because first 2 laters started associating with geopolitical affairs. Im really sorry for inconvenience
הערות שחרור
- fixing bug when swing has a few absolutely the same wicks in the middle
הערות שחרור
minor fixes
הערות שחרור
fixed detecting sms bos with Swing By Body confirmation
BOSbreakofstructureCandlestick AnalysishighLOWpivotPivot PointsPivot points and levelsstructureswing

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?


Trade Smart Money? Check out our website link where we do all the heavy lifting for you, automate your analysis and keep you updated on every trading setup you’ve created.
גם על:

כתב ויתור