Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to find if the close of candle bar hit the support and resistance zones?

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

    How to find if the close of candle bar hit the support and resistance zones?

    I have manually drawn few support and resistance zones(rectangle drawing objects) on a chart(spy, 3minute), and as the day session begins(9:30 AM est) - i would like to know if the price hits the support/resistance zones on close of a 3m candle bar. How do i write the code for it?

    If i have to go little deeper into my strategy - basically i need to first get all the rectangle zones drawn on the given chart(these zones are drawn manually), see if the closed candle bar(either wick or body) hit the zone and rejected or closed inside the zone or ripped through the zone and crossed the zone. how do i code for it?

    I am a developer by profession but just new to NinjaScript. So any inputs would be appreciated?

    Is there a similar script available anywhere that i can refer to?

    #2
    Hello psangram,

    Thanks for your post.

    To detect manually drawn objects on a chart and get information about those draw objects in a custom NinjaScript you would need to loop through the DrawObjects collection. You could then use the information you get from those draw objects for conditions in your script.

    I am not aware of a similar script available that accomplishes this specifically.

    Below is a help guide page you could view for more information and sample code demonstrating detecting manually drawn objects.

    DrawObjects: https://ninjatrader.com/support/help...ub=DrawObjects
    DrawingTool Objects: https://ninjatrader.com/support/help...rawingtool.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X