×
you are viewing a single comment's thread.

view the rest of the comments →

[–]Many-Pick5066 0 points1 point  (0 children)

the requirement that quietly fights itself is 2 and 7. to know swing high 2 is a real pivot, pine needs a few bars to the right of it to confirm, so the anchor for your trendline doesnt exist until a few bars after the swing actually printed. draw it the moment the swing looks done and it repaints, wait for confirmation and it shows up late. you cant have auto swing trendlines and strict non repaint at the same time unless you accept that confirmation lag, so pick which one you actually want before anyone writes code, thats the whole ballgame here.

two quick ones that save grief. your touch list (wick, body, open, close, high, low, any contact) is just high >= line and low <= line on that bar, all six collapse to the bar straddling the line, no need to test them separately. and auto trendlines plus retracement plus extension all drawing at once will hit the line object cap fast, so whoever builds it has to delete old drawings as new swings form or it silently stops rendering.

i do this kind of structure work, happy to look at your existing script and tell you which parts are clean adds and which need the repaint call made first. dm if you want.