Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ideas to help with plotting code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ideas to help with plotting code?

    Hello, does anyone have any ideas on a good, consistent way to check if the following plot is near a swing high/low? The closest I got was using ATR distance from recent swing high/low, however on large moves that still did not work. Attached is an example in which my efforts have particularly struggled, I would like both of these yellow highlights to be plotted as "near a swing high". Code is not necessary, just need some ideas. Thanks in advance!
    Attached Files

    #2
    Hello rbeckmann05,

    Thank you for your post.

    It's not clear to me from this picture if you are using plots or drawing objects, your arrows are pointing to rectangles.

    One idea is to calculate the distance between the current price (presumably where the plot is going to be set) and the recent swing high/low. You would need to decide what values you would consider a "close" distance between the two.

    This thread will also remain open for any other users who may want to share their ideas.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    51 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    128 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X