Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check if price has touched an auto, custom drawn zone

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

    Check if price has touched an auto, custom drawn zone

    Is there a way to check if close[0] on a Calculate On Tick strategy is touching an auto, custom drawn zone with ninjascript?
    Thank you.

    #2
    Hello rbeckmann05,

    Thank you for your inquiry.

    Yes, you could determine the slope of the "boundaries" / lines of the zone based on the start and end anchor bars and the start and end anchor prices and then use the slope to project what the Y value would be at X location.

    Please see this forum post which has an example script demonstrating:

    https://forum.ninjatrader.com/forum/...ine#post828663

    This sample script draws a ray then calculates its slope and projects where the Y value would be for each subsequent bar by plotting a dot on the ray.

    If you have any questions, please let me know.

    Comment


      #3
      Awesome, just what I needed. Thank you very much

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X