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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X