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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X