Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar with a stem definition

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

    Bar with a stem definition

    Hi,
    I'm wandering if there is any ready formula to specify that the bar should have a stem e.g. bottom stem to be at least 50% of the body and upper stem not be bigger than 30% of the body?
    If so then could you please provide one?
    Thank you

    #2
    Hello Ludwik,

    Thank you for your post.

    You'd have to calculate that from the direction of the bar and the difference between the open/close and high/low depending on the bar direction.

    So something like this for a up bar:

    if (Close[0] > Open[0]
    && (Open[0] - Low[0]) >= (Close[0] - Open[0] * .5)
    && (High[0] - Close[0]) <= (Close[0] - Open[0] * .3))
    {
    // do something here
    }

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks a lot Kate, that's soo helpfull!!!

      Comment

      Latest Posts

      Collapse

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