Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to detect pin bars?

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

    How to detect pin bars?

    Hey guys -
    Can anyone tell me how to detect bars like this (i.e. Open and Close in top 30% with long tail)?
    Thank you!
    Attached Files

    #2
    Hello PN720,

    You could use the bars OHLC values and some math to do that. To see how big the wick is in a percent against the next lowest value like the close or open you would have to calculate a percent based on the value of the Low and the close price.

    You could potentially do something like getting what percentage the wick is of the whole total of the bar. A total of a bar could be the high minus the low to give a total difference in price. You could then use the Close/open whichever was lowest and subtract the low to get the amount of lower wick. With those two values you could make a percent of the total:

    Code:
    double a = High[0] - Low[0];
    double b = Math.Min(Open[0], Close[0]) - Low[0];
    double c = b/a;
    double d = c*100;
    From quickly plotting this it appears to be working and showing greater percents for bars with long lower wicks. You could use this as a starting point at thinking of directions you wanted to go at determining that with greater accuracy.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    81 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    148 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    79 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    52 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    58 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X