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 NullPointStrategies, Today, 05:17 AM
    0 responses
    53 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X