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 NullPointStrategies, Today, 05:17 AM
    0 responses
    46 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    66 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