Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about "touching" an indicator line

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

    Question about "touching" an indicator line

    I've got a fair bit of logic in a strategy that does a lot of CrossAbove and CrossBelow. I don't see anything in the official SDK that allows a trigger to fire "on touch" of that indicator line.

    I messed around with a couple of different ideas and they haven't worked well at all. I was wondering if anyone has a strategy or approach they could share?

    As an example here is what I'm talking about in picture form. The touch of that line would have been great here, as the CrossBelow didn't occur allowing the short to be closed.


    Thanks!

    Click image for larger version  Name:	linetouch.jpg Views:	0 Size:	266.2 KB ID:	1135262
    Attached Files

    #2
    Hello DogEars,

    Thanks for your post.

    If the line is below the price, you can check to see if the Low[0] of the bar is less than or equal to the line.

    Note: Indicator lines are calculated values and will not use the same values as the price so if you only check to see if they are equal they may never be exactly (logically) equal. For example, a price might be 3345.25 and the indicator line might be 3345.25000001 and as such, they would not be equal (from a logic perspective). This is why you would want to check for, Less or equal or greater or equal.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    91 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X