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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      36 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      14 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      19 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X