Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TiffanyMiller, Today, 10:19 PM
    0 responses
    2 views
    0 likes
    Last Post TiffanyMiller  
    Started by JackyP, 07-25-2023, 08:39 AM
    2 responses
    310 views
    0 likes
    Last Post j4trdr
    by j4trdr
     
    Started by algospoke, 05-13-2024, 06:53 PM
    12 responses
    132 views
    0 likes
    Last Post algospoke  
    Started by psangram, Today, 06:35 PM
    0 responses
    4 views
    0 likes
    Last Post psangram  
    Started by Alaina19, Yesterday, 04:38 PM
    2 responses
    16 views
    0 likes
    Last Post Alaina19  
    Working...
    X